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 HealthCheck

class HealthCheck extends CustomResource

Provides a Spotinst Health Check resource.

Example Usage

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

const httpCheck = new spotinst.HealthCheck("httpCheck", {
    check: {
        endpoint: "http://endpoint.com",
        healthy: 1,
        interval: 10,
        port: 1337,
        protocol: "http",
        timeout: 10,
        unhealthy: 1,
    },
    proxyAddress: "http://proxy.com",
    proxyPort: 80,
    resourceId: "sig-123",
});

constructor

new HealthCheck(name: string, args: HealthCheckArgs, opts?: pulumi.CustomResourceOptions)

Create a HealthCheck 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?: HealthCheckState, opts?: pulumi.CustomResourceOptions): HealthCheck

Get an existing HealthCheck 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 HealthCheck

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

property check

public check: pulumi.Output<HealthCheckCheck | undefined>;

Describes the check to execute.

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 name

public name: pulumi.Output<string>;

The name of the health check.

property proxyAddress

public proxyAddress: pulumi.Output<string>;

property proxyPort

public proxyPort: pulumi.Output<number | undefined>;

property resourceId

public resourceId: pulumi.Output<string>;

The ID of the resource to check.

property urn

urn: Output<URN>;

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

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.

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

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"/"web", email address in case of "email"/"email-json" and 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_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".

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", "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>" }.

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: "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

property resourceId

public resourceId: pulumi.Output<string>;

Spotinst Resource id (Elastigroup or Ocean 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 HealthCheckArgs

interface HealthCheckArgs

The set of arguments for constructing a HealthCheck resource.

property check

check?: pulumi.Input<HealthCheckCheck>;

Describes the check to execute.

property name

name?: pulumi.Input<string>;

The name of the health check.

property proxyAddress

proxyAddress: pulumi.Input<string>;

property proxyPort

proxyPort?: pulumi.Input<number>;

property resourceId

resourceId: pulumi.Input<string>;

The ID of the resource to check.

interface HealthCheckState

interface HealthCheckState

Input properties used for looking up and filtering HealthCheck resources.

property check

check?: pulumi.Input<HealthCheckCheck>;

Describes the check to execute.

property name

name?: pulumi.Input<string>;

The name of the health check.

property proxyAddress

proxyAddress?: pulumi.Input<string>;

property proxyPort

proxyPort?: pulumi.Input<number>;

property resourceId

resourceId?: pulumi.Input<string>;

The ID of the resource to check.

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"/"web", email address in case of "email"/"email-json" and 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_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".

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", "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>" }.

property protocol

protocol: pulumi.Input<string>;

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

property resourceId

resourceId: pulumi.Input<string>;

Spotinst Resource id (Elastigroup or Ocean 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"/"web", email address in case of "email"/"email-json" and 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_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".

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", "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>" }.

property protocol

protocol?: pulumi.Input<string>;

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

property resourceId

resourceId?: pulumi.Input<string>;

Spotinst Resource id (Elastigroup or Ocean ID).