Show / Hide Table of Contents

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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Subscription
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.SpotInst
Assembly: Pulumi.SpotInst.dll
Syntax
public class Subscription : CustomResource

Constructors

View Source

Subscription(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 Source

Endpoint

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>
View Source

EventType

The event to send the notification when triggered. Valid values: &quot;AWS_EC2_INSTANCE_TERMINATE&quot;, &quot;AWS_EC2_INSTANCE_TERMINATED&quot;, &quot;AWS_EC2_INSTANCE_LAUNCH&quot;, &quot;AWS_EC2_INSTANCE_READY_SIGNAL_TIMEOUT&quot;, &quot;AWS_EC2_CANT_SPIN_OD&quot;, &quot;AWS_EC2_INSTANCE_UNHEALTHY_IN_ELB&quot;, &quot;GROUP_ROLL_FAILED&quot;, &quot;GROUP_ROLL_FINISHED&quot;, &quot;CANT_SCALE_UP_GROUP_MAX_CAPACITY&quot;, &quot;GROUP_UPDATED&quot;, &quot;AWS_EMR_PROVISION_TIMEOUT&quot;, &quot;GROUP_BEANSTALK_INIT_READY&quot;, &quot;AZURE_VM_TERMINATED&quot;, &quot;AZURE_VM_TERMINATE&quot;, &quot;AWS_EC2_MANAGED_INSTANCE_PAUSING&quot;, &quot;AWS_EC2_MANAGED_INSTANCE_RESUMING&quot;, &quot;AWS_EC2_MANAGED_INSTANCE_RECYCLING&quot;,&quot;AWS_EC2_MANAGED_INSTANCE_DELETING&quot;. Ocean Events:&quot;CLUSTER_ROLL_FINISHED&quot;,&quot;GROUP_ROLL_FAILED&quot;.

Declaration
public Output<string> EventType { get; }
Property Value
Type Description
Output<System.String>
View Source

Format

The format of the notification content (JSON Format - Key+Value). Valid Values : &quot;instance-id&quot;, &quot;event&quot;, &quot;resource-id&quot;, &quot;resource-name&quot;, &quot;subnet-id&quot;, &quot;availability-zone&quot;, &quot;reason&quot;, &quot;private-ip&quot;, &quot;launchspec-id&quot; Example: {"event": &quot;event&quot;, &quot;resourceId&quot;: &quot;resource-id&quot;, &quot;resourceName&quot;: &quot;resource-name&quot;", &quot;myCustomKey&quot;: &quot;My content is set here&quot; } Default: {&quot;event&quot;: &quot;&lt;event>&quot;, &quot;instanceId&quot;: &quot;&lt;instance-id>&quot;, &quot;resourceId&quot;: &quot;&lt;resource-id>&quot;, &quot;resourceName&quot;: &quot;&lt;resource-name>&quot; }.

Declaration
public Output<ImmutableDictionary<string, object>> Format { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Protocol

The protocol to send the notification. Valid values: &quot;email&quot;, &quot;email-json&quot;, &quot;aws-sns&quot;, &quot;web&quot;. The following values are deprecated: &quot;http&quot; , &quot;https&quot; You can use the generic &quot;web&quot; protocol instead. &quot;aws-sns&quot; is only supported with AWS provider

Declaration
public Output<string> Protocol { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceId

Spotinst Resource id (Elastigroup or Ocean ID).

Declaration
public Output<string> ResourceId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.