Class Subscription
Provides a Spotinst subscription resource.
Example Usage
using Pulumi;
using SpotInst = Pulumi.SpotInst;
class MyStack : Stack
{
public MyStack()
{
// Create a Subscription
var default_subscription = new SpotInst.Subscription("default-subscription", new SpotInst.SubscriptionArgs
{
Endpoint = "http://endpoint.com",
EventType = "AWS_EC2_INSTANCE_LAUNCH",
Format =
{
{ "event", "%event%" },
{ "instance_id", "%instance-id%" },
{ "resource_id", "%resource-id%" },
{ "resource_name", "%resource-name%" },
{ "tags", "foo,baz,baz" },
},
Protocol = "http",
ResourceId = spotinst_elastigroup_aws.My_eg.Id,
});
}
}
Inherited Members
Namespace: Pulumi.SpotInst
Assembly: Pulumi.SpotInst.dll
Syntax
public class Subscription : CustomResource
Constructors
View SourceSubscription(String, SubscriptionArgs, CustomResourceOptions)
Create a Subscription resource with the given unique name, arguments, and options.
Declaration
public Subscription(string name, SubscriptionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SubscriptionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEndpoint
The endpoint the notification will be sent to. url in case of "http"/"https"/"web", email address in case of "email"/"email-json" and sns-topic-arn in case of "aws-sns".
Declaration
public Output<string> Endpoint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EventType
The event to send the notification when triggered. Valid values: "AWS_EC2_INSTANCE_TERMINATE", "AWS_EC2_INSTANCE_TERMINATED", "AWS_EC2_INSTANCE_LAUNCH", "AWS_EC2_INSTANCE_READY_SIGNAL_TIMEOUT", "AWS_EC2_CANT_SPIN_OD", "AWS_EC2_INSTANCE_UNHEALTHY_IN_ELB", "GROUP_ROLL_FAILED", "GROUP_ROLL_FINISHED",
"CANT_SCALE_UP_GROUP_MAX_CAPACITY",
"GROUP_UPDATED",
"AWS_EMR_PROVISION_TIMEOUT",
"GROUP_BEANSTALK_INIT_READY",
"AZURE_VM_TERMINATED",
"AZURE_VM_TERMINATE",
"AWS_EC2_MANAGED_INSTANCE_PAUSING",
"AWS_EC2_MANAGED_INSTANCE_RESUMING",
"AWS_EC2_MANAGED_INSTANCE_RECYCLING","AWS_EC2_MANAGED_INSTANCE_DELETING".
Ocean Events:"CLUSTER_ROLL_FINISHED","GROUP_ROLL_FAILED".
Declaration
public Output<string> EventType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Format
The format of the notification content (JSON Format - Key+Value). Valid Values : "instance-id", "event", "resource-id", "resource-name", "subnet-id", "availability-zone", "reason", "private-ip", "launchspec-id"
Example: {"event": "event", "resourceId": "resource-id", "resourceName": "resource-name"", "myCustomKey": "My content is set here" }
Default: {"event": "<event>", "instanceId": "<instance-id>", "resourceId": "<resource-id>", "resourceName": "<resource-name>" }.
Declaration
public Output<ImmutableDictionary<string, object>> Format { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Protocol
The protocol to send the notification. Valid values: "email", "email-json", "aws-sns", "web".
The following values are deprecated: "http" , "https"
You can use the generic "web" protocol instead.
"aws-sns" is only supported with AWS provider
Declaration
public Output<string> Protocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceId
Spotinst Resource id (Elastigroup or Ocean ID).
Declaration
public Output<string> ResourceId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SubscriptionState, CustomResourceOptions)
Get an existing Subscription resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Subscription Get(string name, Input<string> id, SubscriptionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SubscriptionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Subscription |