Package @pulumi/spotinst

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-spotinst repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-spotinst repo.

var spotinst = require("@pulumi/spotinst");
import * as spotinst from "@pulumi/spotinst";

Modules

Resources

Others

Resources

Resource Provider

class Provider extends ProviderResource

The provider type for the spotinst package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

This content is derived from https://github.com/terraform-providers/terraform-provider-spotinst/blob/master/website/docs/index.html.markdown.

constructor

new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Provider

Returns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method register

static register(provider: ProviderResource | undefined): Promise<string | undefined>

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Subscription

class Subscription extends CustomResource

Provides a Spotinst subscription resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";

// Create a Subscription
const defaultSubscription = new spotinst.Subscription("default-subscription", {
    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,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-spotinst/blob/master/website/docs/r/subscription.html.markdown.

constructor

new Subscription(name: string, args: SubscriptionArgs, opts?: pulumi.CustomResourceOptions)

Create a Subscription resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SubscriptionState, opts?: pulumi.CustomResourceOptions): Subscription

Get an existing Subscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Subscription

Returns true if the given object is an instance of Subscription. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property endpoint

public endpoint: pulumi.Output<string>;

The endpoint the notification will be sent to: url in case of "http"/"https", email address in case of "email"/"email-json", sns-topic-arn in case of "aws-sns".

property eventType

public eventType: pulumi.Output<string>;

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_UNHEALTHY_IN_ELB", "GROUP_ROLL_FAILED", "GROUP_ROLL_FINISHED", "CANT_SCALE_UP_GROUP_MAX_CAPACITY", "GROUP_UPDATED", "AWS_EC2_CANT_SPIN_OD", "AWS_EMR_PROVISION_TIMEOUT", "AWS_EC2_INSTANCE_READY_SIGNAL_TIMEOUT".

property format

public format: pulumi.Output<{[key: string]: any} | undefined>;

The format of the notification content (JSON Format - Key+Value). Valid values: "%instance-id%", "%event%", "%resource-id%", "%resource-name%".

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property protocol

public protocol: pulumi.Output<string>;

The protocol to send the notification. Valid values: "http", "https", "email", "email-json", "aws-sns", "web".

property resourceId

public resourceId: pulumi.Output<string>;

Spotinst Resource ID (Elastigroup ID).

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

function getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

function getVersion

getVersion(): string

interface ProviderArgs

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property account

account?: pulumi.Input<string>;

Spotinst Account ID

property token

token?: pulumi.Input<string>;

Spotinst Personal API Access Token

interface SubscriptionArgs

interface SubscriptionArgs

The set of arguments for constructing a Subscription resource.

property endpoint

endpoint: pulumi.Input<string>;

The endpoint the notification will be sent to: url in case of "http"/"https", email address in case of "email"/"email-json", sns-topic-arn in case of "aws-sns".

property eventType

eventType: pulumi.Input<string>;

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_UNHEALTHY_IN_ELB", "GROUP_ROLL_FAILED", "GROUP_ROLL_FINISHED", "CANT_SCALE_UP_GROUP_MAX_CAPACITY", "GROUP_UPDATED", "AWS_EC2_CANT_SPIN_OD", "AWS_EMR_PROVISION_TIMEOUT", "AWS_EC2_INSTANCE_READY_SIGNAL_TIMEOUT".

property format

format?: pulumi.Input<{[key: string]: any}>;

The format of the notification content (JSON Format - Key+Value). Valid values: "%instance-id%", "%event%", "%resource-id%", "%resource-name%".

property protocol

protocol: pulumi.Input<string>;

The protocol to send the notification. Valid values: "http", "https", "email", "email-json", "aws-sns", "web".

property resourceId

resourceId: pulumi.Input<string>;

Spotinst Resource ID (Elastigroup ID).

interface SubscriptionState

interface SubscriptionState

Input properties used for looking up and filtering Subscription resources.

property endpoint

endpoint?: pulumi.Input<string>;

The endpoint the notification will be sent to: url in case of "http"/"https", email address in case of "email"/"email-json", sns-topic-arn in case of "aws-sns".

property eventType

eventType?: pulumi.Input<string>;

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_UNHEALTHY_IN_ELB", "GROUP_ROLL_FAILED", "GROUP_ROLL_FINISHED", "CANT_SCALE_UP_GROUP_MAX_CAPACITY", "GROUP_UPDATED", "AWS_EC2_CANT_SPIN_OD", "AWS_EMR_PROVISION_TIMEOUT", "AWS_EC2_INSTANCE_READY_SIGNAL_TIMEOUT".

property format

format?: pulumi.Input<{[key: string]: any}>;

The format of the notification content (JSON Format - Key+Value). Valid values: "%instance-id%", "%event%", "%resource-id%", "%resource-name%".

property protocol

protocol?: pulumi.Input<string>;

The protocol to send the notification. Valid values: "http", "https", "email", "email-json", "aws-sns", "web".

property resourceId

resourceId?: pulumi.Input<string>;

Spotinst Resource ID (Elastigroup ID).