Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.ess.getNotifications
Explore with Pulumi AI
This data source provides available notification resources.
NOTE: Available in 1.72.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ds = alicloud.ess.getNotifications({
scalingGroupId: "scaling_group_id",
});
export const firstNotification = ds.then(ds => ds.notifications?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ds = alicloud.ess.get_notifications(scaling_group_id="scaling_group_id")
pulumi.export("firstNotification", ds.notifications[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ds, err := ess.GetNotifications(ctx, &ess.GetNotificationsArgs{
ScalingGroupId: "scaling_group_id",
}, nil)
if err != nil {
return err
}
ctx.Export("firstNotification", ds.Notifications[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ds = AliCloud.Ess.GetNotifications.Invoke(new()
{
ScalingGroupId = "scaling_group_id",
});
return new Dictionary<string, object?>
{
["firstNotification"] = ds.Apply(getNotificationsResult => getNotificationsResult.Notifications[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ess.EssFunctions;
import com.pulumi.alicloud.ess.inputs.GetNotificationsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var ds = EssFunctions.getNotifications(GetNotificationsArgs.builder()
.scalingGroupId("scaling_group_id")
.build());
ctx.export("firstNotification", ds.applyValue(getNotificationsResult -> getNotificationsResult.notifications()[0].id()));
}
}
variables:
ds:
fn::invoke:
Function: alicloud:ess:getNotifications
Arguments:
scalingGroupId: scaling_group_id
outputs:
firstNotification: ${ds.notifications[0].id}
Using getNotifications
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNotifications(args: GetNotificationsArgs, opts?: InvokeOptions): Promise<GetNotificationsResult>
function getNotificationsOutput(args: GetNotificationsOutputArgs, opts?: InvokeOptions): Output<GetNotificationsResult>
def get_notifications(ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
scaling_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNotificationsResult
def get_notifications_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
scaling_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNotificationsResult]
func GetNotifications(ctx *Context, args *GetNotificationsArgs, opts ...InvokeOption) (*GetNotificationsResult, error)
func GetNotificationsOutput(ctx *Context, args *GetNotificationsOutputArgs, opts ...InvokeOption) GetNotificationsResultOutput
> Note: This function is named GetNotifications
in the Go SDK.
public static class GetNotifications
{
public static Task<GetNotificationsResult> InvokeAsync(GetNotificationsArgs args, InvokeOptions? opts = null)
public static Output<GetNotificationsResult> Invoke(GetNotificationsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNotificationsResult> getNotifications(GetNotificationsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:ess/getNotifications:getNotifications
arguments:
# arguments dictionary
The following arguments are supported:
- Scaling
Group stringId - Scaling group id the notifications belong to.
- Ids List<string>
- A list of notification ids.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Scaling
Group stringId - Scaling group id the notifications belong to.
- Ids []string
- A list of notification ids.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- scaling
Group StringId - Scaling group id the notifications belong to.
- ids List<String>
- A list of notification ids.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- scaling
Group stringId - Scaling group id the notifications belong to.
- ids string[]
- A list of notification ids.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- scaling_
group_ strid - Scaling group id the notifications belong to.
- ids Sequence[str]
- A list of notification ids.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- scaling
Group StringId - Scaling group id the notifications belong to.
- ids List<String>
- A list of notification ids.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getNotifications Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Notifications
List<Pulumi.
Ali Cloud. Ess. Outputs. Get Notifications Notification> - A list of notifications. Each element contains the following attributes:
- Scaling
Group stringId - ID of the scaling group.
- Ids List<string>
- A list of notification ids.
- Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Notifications
[]Get
Notifications Notification - A list of notifications. Each element contains the following attributes:
- Scaling
Group stringId - ID of the scaling group.
- Ids []string
- A list of notification ids.
- Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- notifications
List<Get
Notifications Notification> - A list of notifications. Each element contains the following attributes:
- scaling
Group StringId - ID of the scaling group.
- ids List<String>
- A list of notification ids.
- output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- notifications
Get
Notifications Notification[] - A list of notifications. Each element contains the following attributes:
- scaling
Group stringId - ID of the scaling group.
- ids string[]
- A list of notification ids.
- output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- notifications
Sequence[Get
Notifications Notification] - A list of notifications. Each element contains the following attributes:
- scaling_
group_ strid - ID of the scaling group.
- ids Sequence[str]
- A list of notification ids.
- output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- notifications List<Property Map>
- A list of notifications. Each element contains the following attributes:
- scaling
Group StringId - ID of the scaling group.
- ids List<String>
- A list of notification ids.
- output
File String
Supporting Types
GetNotificationsNotification
- Id string
- ID of the notification.
- Notification
Arn string - The Alibaba Cloud Resource Name (ARN) for the notification object.
- Notification
Types List<string> - The notification types of Auto Scaling events and resource changes.
- Scaling
Group stringId - Scaling group id the notifications belong to.
- Id string
- ID of the notification.
- Notification
Arn string - The Alibaba Cloud Resource Name (ARN) for the notification object.
- Notification
Types []string - The notification types of Auto Scaling events and resource changes.
- Scaling
Group stringId - Scaling group id the notifications belong to.
- id String
- ID of the notification.
- notification
Arn String - The Alibaba Cloud Resource Name (ARN) for the notification object.
- notification
Types List<String> - The notification types of Auto Scaling events and resource changes.
- scaling
Group StringId - Scaling group id the notifications belong to.
- id string
- ID of the notification.
- notification
Arn string - The Alibaba Cloud Resource Name (ARN) for the notification object.
- notification
Types string[] - The notification types of Auto Scaling events and resource changes.
- scaling
Group stringId - Scaling group id the notifications belong to.
- id str
- ID of the notification.
- notification_
arn str - The Alibaba Cloud Resource Name (ARN) for the notification object.
- notification_
types Sequence[str] - The notification types of Auto Scaling events and resource changes.
- scaling_
group_ strid - Scaling group id the notifications belong to.
- id String
- ID of the notification.
- notification
Arn String - The Alibaba Cloud Resource Name (ARN) for the notification object.
- notification
Types List<String> - The notification types of Auto Scaling events and resource changes.
- scaling
Group StringId - Scaling group id the notifications belong to.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.