OceanLaunchSpec

Provides a custom Spotinst Ocean AWS Launch Spec resource.

Example Usage

using Pulumi;
using SpotInst = Pulumi.SpotInst;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new SpotInst.Aws.OceanLaunchSpec("example", new SpotInst.Aws.OceanLaunchSpecArgs
        {
            AutoscaleHeadrooms = 
            {
                new SpotInst.Aws.Inputs.OceanLaunchSpecAutoscaleHeadroomArgs
                {
                    CpuPerUnit = 1000,
                    GpuPerUnit = 0,
                    MemoryPerUnit = 2048,
                    NumOfUnits = 5,
                },
            },
            ElasticIpPools = 
            {
                new SpotInst.Aws.Inputs.OceanLaunchSpecElasticIpPoolArgs
                {
                    TagSelector = new SpotInst.Aws.Inputs.OceanLaunchSpecElasticIpPoolTagSelectorArgs
                    {
                        TagKey = "key",
                        TagValue = "value",
                    },
                },
            },
            IamInstanceProfile = "iam-profile",
            ImageId = "ami-123456",
            Labels = 
            {
                new SpotInst.Aws.Inputs.OceanLaunchSpecLabelArgs
                {
                    Key = "fakeKey",
                    Value = "fakeValue",
                },
            },
            OceanId = "o-123456",
            ResourceLimits = 
            {
                new SpotInst.Aws.Inputs.OceanLaunchSpecResourceLimitArgs
                {
                    MaxInstanceCount = 4,
                },
            },
            RootVolumeSize = 30,
            SecurityGroups = 
            {
                "sg-987654321",
            },
            SubnetIds = 
            {
                "subnet-1234",
            },
            Tags = 
            {
                new SpotInst.Aws.Inputs.OceanLaunchSpecTagArgs
                {
                    Key = "Env",
                    Value = "production",
                },
            },
            Taints = 
            {
                new SpotInst.Aws.Inputs.OceanLaunchSpecTaintArgs
                {
                    Effect = "NoExecute",
                    Key = "taint key updated",
                    Value = "taint value updated",
                },
            },
            UserData = "echo hello world",
        });
    }

}

Coming soon!

import pulumi
import pulumi_spotinst as spotinst

example = spotinst.aws.OceanLaunchSpec("example",
    autoscale_headrooms=[{
        "cpuPerUnit": 1000,
        "gpuPerUnit": 0,
        "memoryPerUnit": 2048,
        "numOfUnits": 5,
    }],
    elastic_ip_pools=[{
        "tagSelector": {
            "tagKey": "key",
            "tagValue": "value",
        },
    }],
    iam_instance_profile="iam-profile",
    image_id="ami-123456",
    labels=[{
        "key": "fakeKey",
        "value": "fakeValue",
    }],
    ocean_id="o-123456",
    resource_limits=[{
        "maxInstanceCount": 4,
    }],
    root_volume_size=30,
    security_groups=["sg-987654321"],
    subnet_ids=["subnet-1234"],
    tags=[{
        "key": "Env",
        "value": "production",
    }],
    taints=[{
        "effect": "NoExecute",
        "key": "taint key updated",
        "value": "taint value updated",
    }],
    user_data="echo hello world")
import * as pulumi from "@pulumi/pulumi";
import * as spotinst from "@pulumi/spotinst";

const example = new spotinst.aws.OceanLaunchSpec("example", {
    autoscaleHeadrooms: [{
        cpuPerUnit: 1000,
        gpuPerUnit: 0,
        memoryPerUnit: 2048,
        numOfUnits: 5,
    }],
    elasticIpPools: [{
        tagSelector: {
            tagKey: "key",
            tagValue: "value",
        },
    }],
    iamInstanceProfile: "iam-profile",
    imageId: "ami-123456",
    labels: [{
        key: "fakeKey",
        value: "fakeValue",
    }],
    oceanId: "o-123456",
    resourceLimits: [{
        maxInstanceCount: 4,
    }],
    rootVolumeSize: 30,
    securityGroups: ["sg-987654321"],
    subnetIds: ["subnet-1234"],
    tags: [{
        key: "Env",
        value: "production",
    }],
    taints: [{
        effect: "NoExecute",
        key: "taint key updated",
        value: "taint value updated",
    }],
    userData: "echo hello world",
});

Create a OceanLaunchSpec Resource

def OceanLaunchSpec(resource_name, opts=None, autoscale_headrooms=None, elastic_ip_pools=None, iam_instance_profile=None, image_id=None, labels=None, name=None, ocean_id=None, resource_limits=None, root_volume_size=None, security_groups=None, subnet_ids=None, tags=None, taints=None, user_data=None, __props__=None);
name string
The unique name of the resource.
args OceanLaunchSpecArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args OceanLaunchSpecArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args OceanLaunchSpecArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

OceanLaunchSpec Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The OceanLaunchSpec resource accepts the following input properties:

OceanId string

The ocean cluster you wish to

AutoscaleHeadrooms List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecAutoscaleHeadroomArgs>

Set custom headroom per launch spec. provide list of headrooms object.

ElasticIpPools List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecElasticIpPoolArgs>

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

IamInstanceProfile string

The ARN or name of an IAM instance profile to associate with launched instances.

ImageId string

ID of the image used to launch the instances.

Labels List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecLabelArgs>

Optionally adds labels to instances launched in an Ocean cluster.

Name string

Set Launch Specification name

ResourceLimits List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecResourceLimitArgs>
RootVolumeSize int

Set root volume size (in GB).

SecurityGroups List<string>

Optionally adds security group IDs.

SubnetIds List<string>

Set subnets in launchSpec. Each element in array should be subnet ID.

Tags List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecTagArgs>

A key/value mapping of tags to assign to the resource.

Taints List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecTaintArgs>

Optionally adds labels to instances launched in an Ocean cluster.

UserData string

Base64-encoded MIME user data to make available to the instances.

OceanId string

The ocean cluster you wish to

AutoscaleHeadrooms []OceanLaunchSpecAutoscaleHeadroom

Set custom headroom per launch spec. provide list of headrooms object.

ElasticIpPools []OceanLaunchSpecElasticIpPool

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

IamInstanceProfile string

The ARN or name of an IAM instance profile to associate with launched instances.

ImageId string

ID of the image used to launch the instances.

Labels []OceanLaunchSpecLabel

Optionally adds labels to instances launched in an Ocean cluster.

Name string

Set Launch Specification name

ResourceLimits []OceanLaunchSpecResourceLimit
RootVolumeSize int

Set root volume size (in GB).

SecurityGroups []string

Optionally adds security group IDs.

SubnetIds []string

Set subnets in launchSpec. Each element in array should be subnet ID.

Tags []OceanLaunchSpecTag

A key/value mapping of tags to assign to the resource.

Taints []OceanLaunchSpecTaint

Optionally adds labels to instances launched in an Ocean cluster.

UserData string

Base64-encoded MIME user data to make available to the instances.

oceanId string

The ocean cluster you wish to

autoscaleHeadrooms OceanLaunchSpecAutoscaleHeadroom[]

Set custom headroom per launch spec. provide list of headrooms object.

elasticIpPools OceanLaunchSpecElasticIpPool[]

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

iamInstanceProfile string

The ARN or name of an IAM instance profile to associate with launched instances.

imageId string

ID of the image used to launch the instances.

labels OceanLaunchSpecLabel[]

Optionally adds labels to instances launched in an Ocean cluster.

name string

Set Launch Specification name

resourceLimits OceanLaunchSpecResourceLimit[]
rootVolumeSize number

Set root volume size (in GB).

securityGroups string[]

Optionally adds security group IDs.

subnetIds string[]

Set subnets in launchSpec. Each element in array should be subnet ID.

tags OceanLaunchSpecTag[]

A key/value mapping of tags to assign to the resource.

taints OceanLaunchSpecTaint[]

Optionally adds labels to instances launched in an Ocean cluster.

userData string

Base64-encoded MIME user data to make available to the instances.

ocean_id str

The ocean cluster you wish to

autoscale_headrooms List[OceanLaunchSpecAutoscaleHeadroom]

Set custom headroom per launch spec. provide list of headrooms object.

elastic_ip_pools List[OceanLaunchSpecElasticIpPool]

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

iam_instance_profile str

The ARN or name of an IAM instance profile to associate with launched instances.

image_id str

ID of the image used to launch the instances.

labels List[OceanLaunchSpecLabel]

Optionally adds labels to instances launched in an Ocean cluster.

name str

Set Launch Specification name

resource_limits List[OceanLaunchSpecResourceLimit]
root_volume_size float

Set root volume size (in GB).

security_groups List[str]

Optionally adds security group IDs.

subnet_ids List[str]

Set subnets in launchSpec. Each element in array should be subnet ID.

tags List[OceanLaunchSpecTag]

A key/value mapping of tags to assign to the resource.

taints List[OceanLaunchSpecTaint]

Optionally adds labels to instances launched in an Ocean cluster.

user_data str

Base64-encoded MIME user data to make available to the instances.

Outputs

All input properties are implicitly available as output properties. Additionally, the OceanLaunchSpec resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing OceanLaunchSpec Resource

Get an existing OceanLaunchSpec 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?: OceanLaunchSpecState, opts?: CustomResourceOptions): OceanLaunchSpec
static get(resource_name, id, opts=None, autoscale_headrooms=None, elastic_ip_pools=None, iam_instance_profile=None, image_id=None, labels=None, name=None, ocean_id=None, resource_limits=None, root_volume_size=None, security_groups=None, subnet_ids=None, tags=None, taints=None, user_data=None, __props__=None);
func GetOceanLaunchSpec(ctx *Context, name string, id IDInput, state *OceanLaunchSpecState, opts ...ResourceOption) (*OceanLaunchSpec, error)
public static OceanLaunchSpec Get(string name, Input<string> id, OceanLaunchSpecState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

AutoscaleHeadrooms List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecAutoscaleHeadroomArgs>

Set custom headroom per launch spec. provide list of headrooms object.

ElasticIpPools List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecElasticIpPoolArgs>

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

IamInstanceProfile string

The ARN or name of an IAM instance profile to associate with launched instances.

ImageId string

ID of the image used to launch the instances.

Labels List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecLabelArgs>

Optionally adds labels to instances launched in an Ocean cluster.

Name string

Set Launch Specification name

OceanId string

The ocean cluster you wish to

ResourceLimits List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecResourceLimitArgs>
RootVolumeSize int

Set root volume size (in GB).

SecurityGroups List<string>

Optionally adds security group IDs.

SubnetIds List<string>

Set subnets in launchSpec. Each element in array should be subnet ID.

Tags List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecTagArgs>

A key/value mapping of tags to assign to the resource.

Taints List<Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecTaintArgs>

Optionally adds labels to instances launched in an Ocean cluster.

UserData string

Base64-encoded MIME user data to make available to the instances.

AutoscaleHeadrooms []OceanLaunchSpecAutoscaleHeadroom

Set custom headroom per launch spec. provide list of headrooms object.

ElasticIpPools []OceanLaunchSpecElasticIpPool

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

IamInstanceProfile string

The ARN or name of an IAM instance profile to associate with launched instances.

ImageId string

ID of the image used to launch the instances.

Labels []OceanLaunchSpecLabel

Optionally adds labels to instances launched in an Ocean cluster.

Name string

Set Launch Specification name

OceanId string

The ocean cluster you wish to

ResourceLimits []OceanLaunchSpecResourceLimit
RootVolumeSize int

Set root volume size (in GB).

SecurityGroups []string

Optionally adds security group IDs.

SubnetIds []string

Set subnets in launchSpec. Each element in array should be subnet ID.

Tags []OceanLaunchSpecTag

A key/value mapping of tags to assign to the resource.

Taints []OceanLaunchSpecTaint

Optionally adds labels to instances launched in an Ocean cluster.

UserData string

Base64-encoded MIME user data to make available to the instances.

autoscaleHeadrooms OceanLaunchSpecAutoscaleHeadroom[]

Set custom headroom per launch spec. provide list of headrooms object.

elasticIpPools OceanLaunchSpecElasticIpPool[]

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

iamInstanceProfile string

The ARN or name of an IAM instance profile to associate with launched instances.

imageId string

ID of the image used to launch the instances.

labels OceanLaunchSpecLabel[]

Optionally adds labels to instances launched in an Ocean cluster.

name string

Set Launch Specification name

oceanId string

The ocean cluster you wish to

resourceLimits OceanLaunchSpecResourceLimit[]
rootVolumeSize number

Set root volume size (in GB).

securityGroups string[]

Optionally adds security group IDs.

subnetIds string[]

Set subnets in launchSpec. Each element in array should be subnet ID.

tags OceanLaunchSpecTag[]

A key/value mapping of tags to assign to the resource.

taints OceanLaunchSpecTaint[]

Optionally adds labels to instances launched in an Ocean cluster.

userData string

Base64-encoded MIME user data to make available to the instances.

autoscale_headrooms List[OceanLaunchSpecAutoscaleHeadroom]

Set custom headroom per launch spec. provide list of headrooms object.

elastic_ip_pools List[OceanLaunchSpecElasticIpPool]

Assign an Elastic IP to the instances spun by the launch spec. Can be null.

iam_instance_profile str

The ARN or name of an IAM instance profile to associate with launched instances.

image_id str

ID of the image used to launch the instances.

labels List[OceanLaunchSpecLabel]

Optionally adds labels to instances launched in an Ocean cluster.

name str

Set Launch Specification name

ocean_id str

The ocean cluster you wish to

resource_limits List[OceanLaunchSpecResourceLimit]
root_volume_size float

Set root volume size (in GB).

security_groups List[str]

Optionally adds security group IDs.

subnet_ids List[str]

Set subnets in launchSpec. Each element in array should be subnet ID.

tags List[OceanLaunchSpecTag]

A key/value mapping of tags to assign to the resource.

taints List[OceanLaunchSpecTaint]

Optionally adds labels to instances launched in an Ocean cluster.

user_data str

Base64-encoded MIME user data to make available to the instances.

Supporting Types

OceanLaunchSpecAutoscaleHeadroom

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

NumOfUnits int

The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

CpuPerUnit int

Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

GpuPerUnit int

Optionally configure the number of GPUS to allocate for each headroom unit.

MemoryPerUnit int

Optionally configure the amount of memory (MiB) to allocate for each headroom unit.

NumOfUnits int

The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

CpuPerUnit int

Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

GpuPerUnit int

Optionally configure the number of GPUS to allocate for each headroom unit.

MemoryPerUnit int

Optionally configure the amount of memory (MiB) to allocate for each headroom unit.

numOfUnits number

The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

cpuPerUnit number

Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

gpuPerUnit number

Optionally configure the number of GPUS to allocate for each headroom unit.

memoryPerUnit number

Optionally configure the amount of memory (MiB) to allocate for each headroom unit.

numOfUnits float

The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.

cpuPerUnit float

Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.

gpuPerUnit float

Optionally configure the number of GPUS to allocate for each headroom unit.

memoryPerUnit float

Optionally configure the amount of memory (MiB) to allocate for each headroom unit.

OceanLaunchSpecElasticIpPool

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

TagSelector Pulumi.SpotInst.Aws.Inputs.OceanLaunchSpecElasticIpPoolTagSelectorArgs

Key-value object, which defines an Elastic IP from the customer pool. Can be null.

TagSelector OceanLaunchSpecElasticIpPoolTagSelector

Key-value object, which defines an Elastic IP from the customer pool. Can be null.

tagSelector OceanLaunchSpecElasticIpPoolTagSelector

Key-value object, which defines an Elastic IP from the customer pool. Can be null.

tagSelector Dict[OceanLaunchSpecElasticIpPoolTagSelector]

Key-value object, which defines an Elastic IP from the customer pool. Can be null.

OceanLaunchSpecElasticIpPoolTagSelector

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

TagKey string

Elastic IP tag key. The launch spec will consider all elastic IPs tagged with this tag as a part of the elastic IP pool to use.

TagValue string

Elastic IP tag value. Can be null.

TagKey string

Elastic IP tag key. The launch spec will consider all elastic IPs tagged with this tag as a part of the elastic IP pool to use.

TagValue string

Elastic IP tag value. Can be null.

tagKey string

Elastic IP tag key. The launch spec will consider all elastic IPs tagged with this tag as a part of the elastic IP pool to use.

tagValue string

Elastic IP tag value. Can be null.

tagKey str

Elastic IP tag key. The launch spec will consider all elastic IPs tagged with this tag as a part of the elastic IP pool to use.

tagValue str

Elastic IP tag value. Can be null.

OceanLaunchSpecLabel

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

The tag key.

Value string

The tag value.

Key string

The tag key.

Value string

The tag value.

key string

The tag key.

value string

The tag value.

key str

The tag key.

value str

The tag value.

OceanLaunchSpecResourceLimit

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MaxInstanceCount int

set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.

MaxInstanceCount int

set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.

maxInstanceCount number

set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.

maxInstanceCount float

set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.

OceanLaunchSpecTag

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Key string

The tag key.

Value string

The tag value.

Key string

The tag key.

Value string

The tag value.

key string

The tag key.

value string

The tag value.

key str

The tag key.

value str

The tag value.

OceanLaunchSpecTaint

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Effect string

The effect of the taint. Valid values: "NoSchedule", "PreferNoSchedule", "NoExecute".

Key string

The tag key.

Value string

The tag value.

Effect string

The effect of the taint. Valid values: "NoSchedule", "PreferNoSchedule", "NoExecute".

Key string

The tag key.

Value string

The tag value.

effect string

The effect of the taint. Valid values: "NoSchedule", "PreferNoSchedule", "NoExecute".

key string

The tag key.

value string

The tag value.

effect str

The effect of the taint. Valid values: "NoSchedule", "PreferNoSchedule", "NoExecute".

key str

The tag key.

value str

The tag value.

Package Details

Repository
https://github.com/pulumi/pulumi-spotinst
License
Apache-2.0
Notes
This Pulumi package is based on the spotinst Terraform Provider.