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
new OceanLaunchSpec(name: string, args: OceanLaunchSpecArgs, opts?: CustomResourceOptions);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);func NewOceanLaunchSpec(ctx *Context, name string, args OceanLaunchSpecArgs, opts ...ResourceOption) (*OceanLaunchSpec, error)public OceanLaunchSpec(string name, OceanLaunchSpecArgs args, CustomResourceOptions? opts = null)- 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:
- Ocean
Id string The ocean cluster you wish to
- Autoscale
Headrooms List<Pulumi.Spot Inst. Aws. Inputs. Ocean Launch Spec Autoscale Headroom Args> Set custom headroom per launch spec. provide list of headrooms object.
- Elastic
Ip List<Pulumi.Pools Spot Inst. Aws. Inputs. Ocean Launch Spec Elastic Ip Pool Args> Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- Iam
Instance stringProfile The ARN or name of an IAM instance profile to associate with launched instances.
- Image
Id string ID of the image used to launch the instances.
- Labels
List<Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Label Args> Optionally adds labels to instances launched in an Ocean cluster.
- Name string
Set Launch Specification name
- Resource
Limits List<Pulumi.Spot Inst. Aws. Inputs. Ocean Launch Spec Resource Limit Args> - Root
Volume intSize Set root volume size (in GB).
- Security
Groups List<string> Optionally adds security group IDs.
- Subnet
Ids List<string> Set subnets in launchSpec. Each element in array should be subnet ID.
-
List<Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Tag Args> A key/value mapping of tags to assign to the resource.
- Taints
List<Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Taint Args> Optionally adds labels to instances launched in an Ocean cluster.
- User
Data string Base64-encoded MIME user data to make available to the instances.
- Ocean
Id string The ocean cluster you wish to
- Autoscale
Headrooms []OceanLaunch Spec Autoscale Headroom Set custom headroom per launch spec. provide list of headrooms object.
- Elastic
Ip []OceanPools Launch Spec Elastic Ip Pool Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- Iam
Instance stringProfile The ARN or name of an IAM instance profile to associate with launched instances.
- Image
Id string ID of the image used to launch the instances.
- Labels
[]Ocean
Launch Spec Label Optionally adds labels to instances launched in an Ocean cluster.
- Name string
Set Launch Specification name
- Resource
Limits []OceanLaunch Spec Resource Limit - Root
Volume intSize Set root volume size (in GB).
- Security
Groups []string Optionally adds security group IDs.
- Subnet
Ids []string Set subnets in launchSpec. Each element in array should be subnet ID.
-
[]Ocean
Launch Spec Tag A key/value mapping of tags to assign to the resource.
- Taints
[]Ocean
Launch Spec Taint Optionally adds labels to instances launched in an Ocean cluster.
- User
Data string Base64-encoded MIME user data to make available to the instances.
- ocean
Id string The ocean cluster you wish to
- autoscale
Headrooms OceanLaunch Spec Autoscale Headroom[] Set custom headroom per launch spec. provide list of headrooms object.
- elastic
Ip OceanPools Launch Spec Elastic Ip Pool[] Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- iam
Instance stringProfile The ARN or name of an IAM instance profile to associate with launched instances.
- image
Id string ID of the image used to launch the instances.
- labels
Ocean
Launch Spec Label[] Optionally adds labels to instances launched in an Ocean cluster.
- name string
Set Launch Specification name
- resource
Limits OceanLaunch Spec Resource Limit[] - root
Volume numberSize Set root volume size (in GB).
- security
Groups string[] Optionally adds security group IDs.
- subnet
Ids string[] Set subnets in launchSpec. Each element in array should be subnet ID.
-
Ocean
Launch Spec Tag[] A key/value mapping of tags to assign to the resource.
- taints
Ocean
Launch Spec Taint[] Optionally adds labels to instances launched in an Ocean cluster.
- user
Data string Base64-encoded MIME user data to make available to the instances.
- ocean_
id str The ocean cluster you wish to
- autoscale_
headrooms List[OceanLaunch Spec Autoscale Headroom] Set custom headroom per launch spec. provide list of headrooms object.
- elastic_
ip_ List[Oceanpools Launch Spec Elastic Ip Pool] Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- iam_
instance_ strprofile 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[Ocean
Launch Spec Label] Optionally adds labels to instances launched in an Ocean cluster.
- name str
Set Launch Specification name
- resource_
limits List[OceanLaunch Spec Resource Limit] - root_
volume_ floatsize 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.
-
List[Ocean
Launch Spec Tag] A key/value mapping of tags to assign to the resource.
- taints
List[Ocean
Launch Spec Taint] 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:
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): OceanLaunchSpecstatic 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:
- Autoscale
Headrooms List<Pulumi.Spot Inst. Aws. Inputs. Ocean Launch Spec Autoscale Headroom Args> Set custom headroom per launch spec. provide list of headrooms object.
- Elastic
Ip List<Pulumi.Pools Spot Inst. Aws. Inputs. Ocean Launch Spec Elastic Ip Pool Args> Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- Iam
Instance stringProfile The ARN or name of an IAM instance profile to associate with launched instances.
- Image
Id string ID of the image used to launch the instances.
- Labels
List<Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Label Args> Optionally adds labels to instances launched in an Ocean cluster.
- Name string
Set Launch Specification name
- Ocean
Id string The ocean cluster you wish to
- Resource
Limits List<Pulumi.Spot Inst. Aws. Inputs. Ocean Launch Spec Resource Limit Args> - Root
Volume intSize Set root volume size (in GB).
- Security
Groups List<string> Optionally adds security group IDs.
- Subnet
Ids List<string> Set subnets in launchSpec. Each element in array should be subnet ID.
-
List<Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Tag Args> A key/value mapping of tags to assign to the resource.
- Taints
List<Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Taint Args> Optionally adds labels to instances launched in an Ocean cluster.
- User
Data string Base64-encoded MIME user data to make available to the instances.
- Autoscale
Headrooms []OceanLaunch Spec Autoscale Headroom Set custom headroom per launch spec. provide list of headrooms object.
- Elastic
Ip []OceanPools Launch Spec Elastic Ip Pool Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- Iam
Instance stringProfile The ARN or name of an IAM instance profile to associate with launched instances.
- Image
Id string ID of the image used to launch the instances.
- Labels
[]Ocean
Launch Spec Label Optionally adds labels to instances launched in an Ocean cluster.
- Name string
Set Launch Specification name
- Ocean
Id string The ocean cluster you wish to
- Resource
Limits []OceanLaunch Spec Resource Limit - Root
Volume intSize Set root volume size (in GB).
- Security
Groups []string Optionally adds security group IDs.
- Subnet
Ids []string Set subnets in launchSpec. Each element in array should be subnet ID.
-
[]Ocean
Launch Spec Tag A key/value mapping of tags to assign to the resource.
- Taints
[]Ocean
Launch Spec Taint Optionally adds labels to instances launched in an Ocean cluster.
- User
Data string Base64-encoded MIME user data to make available to the instances.
- autoscale
Headrooms OceanLaunch Spec Autoscale Headroom[] Set custom headroom per launch spec. provide list of headrooms object.
- elastic
Ip OceanPools Launch Spec Elastic Ip Pool[] Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- iam
Instance stringProfile The ARN or name of an IAM instance profile to associate with launched instances.
- image
Id string ID of the image used to launch the instances.
- labels
Ocean
Launch Spec Label[] Optionally adds labels to instances launched in an Ocean cluster.
- name string
Set Launch Specification name
- ocean
Id string The ocean cluster you wish to
- resource
Limits OceanLaunch Spec Resource Limit[] - root
Volume numberSize Set root volume size (in GB).
- security
Groups string[] Optionally adds security group IDs.
- subnet
Ids string[] Set subnets in launchSpec. Each element in array should be subnet ID.
-
Ocean
Launch Spec Tag[] A key/value mapping of tags to assign to the resource.
- taints
Ocean
Launch Spec Taint[] Optionally adds labels to instances launched in an Ocean cluster.
- user
Data string Base64-encoded MIME user data to make available to the instances.
- autoscale_
headrooms List[OceanLaunch Spec Autoscale Headroom] Set custom headroom per launch spec. provide list of headrooms object.
- elastic_
ip_ List[Oceanpools Launch Spec Elastic Ip Pool] Assign an Elastic IP to the instances spun by the launch spec. Can be null.
- iam_
instance_ strprofile 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[Ocean
Launch Spec Label] 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[OceanLaunch Spec Resource Limit] - root_
volume_ floatsize 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.
-
List[Ocean
Launch Spec Tag] A key/value mapping of tags to assign to the resource.
- taints
List[Ocean
Launch Spec Taint] 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
- Num
Of intUnits The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.
- Cpu
Per intUnit Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.
- Gpu
Per intUnit Optionally configure the number of GPUS to allocate for each headroom unit.
- Memory
Per intUnit Optionally configure the amount of memory (MiB) to allocate for each headroom unit.
- Num
Of intUnits The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.
- Cpu
Per intUnit Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.
- Gpu
Per intUnit Optionally configure the number of GPUS to allocate for each headroom unit.
- Memory
Per intUnit Optionally configure the amount of memory (MiB) to allocate for each headroom unit.
- num
Of numberUnits The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.
- cpu
Per numberUnit Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.
- gpu
Per numberUnit Optionally configure the number of GPUS to allocate for each headroom unit.
- memory
Per numberUnit Optionally configure the amount of memory (MiB) to allocate for each headroom unit.
- num
Of floatUnits The number of units to retain as headroom, where each unit has the defined headroom CPU, memory and GPU.
- cpu
Per floatUnit Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in millicores, where 1000 millicores = 1 vCPU.
- gpu
Per floatUnit Optionally configure the number of GPUS to allocate for each headroom unit.
- memory
Per floatUnit Optionally configure the amount of memory (MiB) to allocate for each headroom unit.
OceanLaunchSpecElasticIpPool
-
Pulumi.
Spot Inst. Aws. Inputs. Ocean Launch Spec Elastic Ip Pool Tag Selector Args Key-value object, which defines an Elastic IP from the customer pool. Can be null.
-
Ocean
Launch Spec Elastic Ip Pool Tag Selector Key-value object, which defines an Elastic IP from the customer pool. Can be null.
-
Ocean
Launch Spec Elastic Ip Pool Tag Selector Key-value object, which defines an Elastic IP from the customer pool. Can be null.
-
Dict[Ocean
Launch Spec Elastic Ip Pool Tag Selector] Key-value object, which defines an Elastic IP from the customer pool. Can be null.
OceanLaunchSpecElasticIpPoolTagSelector
OceanLaunchSpecLabel
OceanLaunchSpecResourceLimit
- Max
Instance intCount set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.
- Max
Instance intCount set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.
- max
Instance numberCount set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.
- max
Instance floatCount set a maximum number of instances per launch specification. Can be null. If set, value must be greater than or equal to 0.
OceanLaunchSpecTag
OceanLaunchSpecTaint
Package Details
- Repository
- https://github.com/pulumi/pulumi-spotinst
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
spotinstTerraform Provider.