flexibleengine.AsNotification
Explore with Pulumi AI
Manages an AS notification resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const config = new pulumi.Config();
const scalingGroupId = config.requireObject("scalingGroupId");
const topicUrn = config.requireObject("topicUrn");
const events = config.requireObject<Array<string>>("events");
const test = new flexibleengine.AsNotification("test", {
scalingGroupId: scalingGroupId,
topicUrn: topicUrn,
events: events,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
config = pulumi.Config()
scaling_group_id = config.require_object("scalingGroupId")
topic_urn = config.require_object("topicUrn")
events = config.require_object("events")
test = flexibleengine.AsNotification("test",
scaling_group_id=scaling_group_id,
topic_urn=topic_urn,
events=events)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
scalingGroupId := cfg.RequireObject("scalingGroupId")
topicUrn := cfg.RequireObject("topicUrn")
events := cfg.Require("events")
_, err := flexibleengine.NewAsNotification(ctx, "test", &flexibleengine.AsNotificationArgs{
ScalingGroupId: pulumi.Any(scalingGroupId),
TopicUrn: pulumi.Any(topicUrn),
Events: events,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var scalingGroupId = config.RequireObject<dynamic>("scalingGroupId");
var topicUrn = config.RequireObject<dynamic>("topicUrn");
var events = config.RequireObject<string[]>("events");
var test = new Flexibleengine.AsNotification("test", new()
{
ScalingGroupId = scalingGroupId,
TopicUrn = topicUrn,
Events = events,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.AsNotification;
import com.pulumi.flexibleengine.AsNotificationArgs;
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 config = ctx.config();
final var scalingGroupId = config.get("scalingGroupId");
final var topicUrn = config.get("topicUrn");
final var events = config.get("events");
var test = new AsNotification("test", AsNotificationArgs.builder()
.scalingGroupId(scalingGroupId)
.topicUrn(topicUrn)
.events(events)
.build());
}
}
configuration:
scalingGroupId:
type: dynamic
topicUrn:
type: dynamic
events:
type: list(string)
resources:
test:
type: flexibleengine:AsNotification
properties:
scalingGroupId: ${scalingGroupId}
topicUrn: ${topicUrn}
events: ${events}
Create AsNotification Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AsNotification(name: string, args: AsNotificationArgs, opts?: CustomResourceOptions);
@overload
def AsNotification(resource_name: str,
args: AsNotificationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AsNotification(resource_name: str,
opts: Optional[ResourceOptions] = None,
events: Optional[Sequence[str]] = None,
scaling_group_id: Optional[str] = None,
topic_urn: Optional[str] = None,
as_notification_id: Optional[str] = None,
region: Optional[str] = None)
func NewAsNotification(ctx *Context, name string, args AsNotificationArgs, opts ...ResourceOption) (*AsNotification, error)
public AsNotification(string name, AsNotificationArgs args, CustomResourceOptions? opts = null)
public AsNotification(String name, AsNotificationArgs args)
public AsNotification(String name, AsNotificationArgs args, CustomResourceOptions options)
type: flexibleengine:AsNotification
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AsNotificationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AsNotificationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AsNotificationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AsNotificationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AsNotificationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var asNotificationResource = new Flexibleengine.AsNotification("asNotificationResource", new()
{
Events = new[]
{
"string",
},
ScalingGroupId = "string",
TopicUrn = "string",
AsNotificationId = "string",
Region = "string",
});
example, err := flexibleengine.NewAsNotification(ctx, "asNotificationResource", &flexibleengine.AsNotificationArgs{
Events: pulumi.StringArray{
pulumi.String("string"),
},
ScalingGroupId: pulumi.String("string"),
TopicUrn: pulumi.String("string"),
AsNotificationId: pulumi.String("string"),
Region: pulumi.String("string"),
})
var asNotificationResource = new AsNotification("asNotificationResource", AsNotificationArgs.builder()
.events("string")
.scalingGroupId("string")
.topicUrn("string")
.asNotificationId("string")
.region("string")
.build());
as_notification_resource = flexibleengine.AsNotification("asNotificationResource",
events=["string"],
scaling_group_id="string",
topic_urn="string",
as_notification_id="string",
region="string")
const asNotificationResource = new flexibleengine.AsNotification("asNotificationResource", {
events: ["string"],
scalingGroupId: "string",
topicUrn: "string",
asNotificationId: "string",
region: "string",
});
type: flexibleengine:AsNotification
properties:
asNotificationId: string
events:
- string
region: string
scalingGroupId: string
topicUrn: string
AsNotification Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AsNotification resource accepts the following input properties:
- Events List<string>
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - Scaling
Group stringId - Specifies the AS group ID. Changing this creates a new AS notification.
- Topic
Urn string - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- As
Notification stringId - The unique topic URN in SMN.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Events []string
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - Scaling
Group stringId - Specifies the AS group ID. Changing this creates a new AS notification.
- Topic
Urn string - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- As
Notification stringId - The unique topic URN in SMN.
- Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- events List<String>
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - scaling
Group StringId - Specifies the AS group ID. Changing this creates a new AS notification.
- topic
Urn String - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as
Notification StringId - The unique topic URN in SMN.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- events string[]
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - scaling
Group stringId - Specifies the AS group ID. Changing this creates a new AS notification.
- topic
Urn string - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as
Notification stringId - The unique topic URN in SMN.
- region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- events Sequence[str]
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - scaling_
group_ strid - Specifies the AS group ID. Changing this creates a new AS notification.
- topic_
urn str - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as_
notification_ strid - The unique topic URN in SMN.
- region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- events List<String>
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - scaling
Group StringId - Specifies the AS group ID. Changing this creates a new AS notification.
- topic
Urn String - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as
Notification StringId - The unique topic URN in SMN.
- region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the AsNotification resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- topic_
name str - The topic name in SMN.
Look up Existing AsNotification Resource
Get an existing AsNotification resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AsNotificationState, opts?: CustomResourceOptions): AsNotification
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
as_notification_id: Optional[str] = None,
events: Optional[Sequence[str]] = None,
region: Optional[str] = None,
scaling_group_id: Optional[str] = None,
topic_name: Optional[str] = None,
topic_urn: Optional[str] = None) -> AsNotification
func GetAsNotification(ctx *Context, name string, id IDInput, state *AsNotificationState, opts ...ResourceOption) (*AsNotification, error)
public static AsNotification Get(string name, Input<string> id, AsNotificationState? state, CustomResourceOptions? opts = null)
public static AsNotification get(String name, Output<String> id, AsNotificationState state, CustomResourceOptions options)
resources: _: type: flexibleengine:AsNotification get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- As
Notification stringId - The unique topic URN in SMN.
- Events List<string>
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Scaling
Group stringId - Specifies the AS group ID. Changing this creates a new AS notification.
- Topic
Name string - The topic name in SMN.
- Topic
Urn string - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- As
Notification stringId - The unique topic URN in SMN.
- Events []string
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - Region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- Scaling
Group stringId - Specifies the AS group ID. Changing this creates a new AS notification.
- Topic
Name string - The topic name in SMN.
- Topic
Urn string - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as
Notification StringId - The unique topic URN in SMN.
- events List<String>
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- scaling
Group StringId - Specifies the AS group ID. Changing this creates a new AS notification.
- topic
Name String - The topic name in SMN.
- topic
Urn String - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as
Notification stringId - The unique topic URN in SMN.
- events string[]
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - region string
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- scaling
Group stringId - Specifies the AS group ID. Changing this creates a new AS notification.
- topic
Name string - The topic name in SMN.
- topic
Urn string - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as_
notification_ strid - The unique topic URN in SMN.
- events Sequence[str]
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - region str
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- scaling_
group_ strid - Specifies the AS group ID. Changing this creates a new AS notification.
- topic_
name str - The topic name in SMN.
- topic_
urn str - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
- as
Notification StringId - The unique topic URN in SMN.
- events List<String>
- Specifies the topic scene of AS group. The events include
SCALING_UP
,SCALING_UP_FAIL
,SCALING_DOWN
,SCALING_DOWN_FAIL
,SCALING_GROUP_ABNORMAL
. - region String
- Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
- scaling
Group StringId - Specifies the AS group ID. Changing this creates a new AS notification.
- topic
Name String - The topic name in SMN.
- topic
Urn String - Specifies the unique topic URN of the SMN. Changing this creates a new AS notification.
Import
The as notification can be imported using scaling_group_id
, topic_urn
, separated by a slash, e.g.
bash
$ pulumi import flexibleengine:index/asNotification:AsNotification test <scaling_group_id>/<topic_urn>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.