This page documents the language specification for the spotinst package. If you're looking for help working with the inputs, outputs, or functions of spotinst resources in a Pulumi program, please see the resource documentation for examples and API reference.
ecs¶
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.
- class
pulumi_spotinst.ecs.Ocean(resource_name, opts=None, associate_public_ip_address=None, autoscaler=None, cluster_name=None, desired_capacity=None, draining_timeout=None, ebs_optimized=None, iam_instance_profile=None, image_id=None, key_pair=None, max_size=None, min_size=None, monitoring=None, name=None, region=None, scheduled_tasks=None, security_group_ids=None, subnet_ids=None, tags=None, update_policy=None, user_data=None, utilize_reserved_instances=None, whitelists=None, __props__=None, __name__=None, __opts__=None)¶ Create a Ocean resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] associate_public_ip_address: Configure public IP address allocation. :param pulumi.Input[str] cluster_name: The ocean cluster name. :param pulumi.Input[float] desired_capacity: The number of instances to launch and maintain in the cluster. :param pulumi.Input[float] draining_timeout: The time in seconds, the instance is allowed to run while detached from the ELB. This is to allow the instance time to be drained from incoming TCP connections before terminating it, during a scale down operation. :param pulumi.Input[bool] ebs_optimized: Enable EBS optimized for cluster. Flag will enable optimized capacity for high bandwidth connectivity to the EB service for non EBS optimized instance types. For instances that are EBS optimized this flag will be ignored. :param pulumi.Input[str] iam_instance_profile: The instance profile iam role. :param pulumi.Input[str] image_id: ID of the image used to launch the instances. :param pulumi.Input[str] key_pair: The key pair to attach the instances. :param pulumi.Input[float] max_size: The upper limit of instances the cluster can scale up to. :param pulumi.Input[float] min_size: The lower limit of instances the cluster can scale down to. :param pulumi.Input[bool] monitoring: Enable detailed monitoring for cluster. Flag will enable Cloud Watch detailed detailed monitoring (one minute increments). Note: there are additional hourly costs for this service based on the region used. :param pulumi.Input[str] name: The Ocean cluster name. :param pulumi.Input[str] region: The region the cluster will run in. :param pulumi.Input[list] security_group_ids: One or more security group ids. :param pulumi.Input[list] subnet_ids: A comma-separated list of subnet identifiers for the Ocean cluster. Subnet IDs should be configured with auto assign public ip. :param pulumi.Input[list] tags: Optionally adds tags to instances launched in an Ocean cluster. :param pulumi.Input[str] user_data: Base64-encoded MIME user data to make available to the instances. :param pulumi.Input[bool] utilize_reserved_instances: If Reserved instances exist, OCean will utilize them before launching Spot instances. :param pulumi.Input[list] whitelists: Instance types allowed in the Ocean cluster, Cannot be configured if blacklist is configured.
The autoscaler object supports the following:
cooldown(pulumi.Input[float])down(pulumi.Input[dict])maxScaleDownPercentage(pulumi.Input[float])
headroom(pulumi.Input[dict])cpuPerUnit(pulumi.Input[float])memoryPerUnit(pulumi.Input[float])numOfUnits(pulumi.Input[float])
isAutoConfig(pulumi.Input[bool])isEnabled(pulumi.Input[bool])resource_limits(pulumi.Input[dict])maxMemoryGib(pulumi.Input[float])maxVcpu(pulumi.Input[float])
The scheduled_tasks object supports the following:
shutdownHours(pulumi.Input[dict])isEnabled(pulumi.Input[bool])timeWindows(pulumi.Input[list])
tasks(pulumi.Input[list])cronExpression(pulumi.Input[str])isEnabled(pulumi.Input[bool])taskType(pulumi.Input[str])
The tags object supports the following:
key(pulumi.Input[str]) - The tag key.value(pulumi.Input[str]) - The tag value.
The update_policy object supports the following:
rollConfig(pulumi.Input[dict])batchSizePercentage(pulumi.Input[float])
shouldRoll(pulumi.Input[bool])
associate_public_ip_address: pulumi.Output[bool] = None¶Configure public IP address allocation.
cluster_name: pulumi.Output[str] = None¶The ocean cluster name.
desired_capacity: pulumi.Output[float] = None¶The number of instances to launch and maintain in the cluster.
draining_timeout: pulumi.Output[float] = None¶The time in seconds, the instance is allowed to run while detached from the ELB. This is to allow the instance time to be drained from incoming TCP connections before terminating it, during a scale down operation.
ebs_optimized: pulumi.Output[bool] = None¶Enable EBS optimized for cluster. Flag will enable optimized capacity for high bandwidth connectivity to the EB service for non EBS optimized instance types. For instances that are EBS optimized this flag will be ignored.
iam_instance_profile: pulumi.Output[str] = None¶The instance profile iam role.
image_id: pulumi.Output[str] = None¶ID of the image used to launch the instances.
key_pair: pulumi.Output[str] = None¶The key pair to attach the instances.
max_size: pulumi.Output[float] = None¶The upper limit of instances the cluster can scale up to.
min_size: pulumi.Output[float] = None¶The lower limit of instances the cluster can scale down to.
monitoring: pulumi.Output[bool] = None¶Enable detailed monitoring for cluster. Flag will enable Cloud Watch detailed detailed monitoring (one minute increments). Note: there are additional hourly costs for this service based on the region used.
name: pulumi.Output[str] = None¶The Ocean cluster name.
region: pulumi.Output[str] = None¶The region the cluster will run in.
security_group_ids: pulumi.Output[list] = None¶One or more security group ids.
subnet_ids: pulumi.Output[list] = None¶A comma-separated list of subnet identifiers for the Ocean cluster. Subnet IDs should be configured with auto assign public ip.
Optionally adds tags to instances launched in an Ocean cluster.
key(str) - The tag key.value(str) - The tag value.
user_data: pulumi.Output[str] = None¶Base64-encoded MIME user data to make available to the instances.
utilize_reserved_instances: pulumi.Output[bool] = None¶If Reserved instances exist, OCean will utilize them before launching Spot instances.
whitelists: pulumi.Output[list] = None¶Instance types allowed in the Ocean cluster, Cannot be configured if blacklist is configured.
- static
get(resource_name, id, opts=None, associate_public_ip_address=None, autoscaler=None, cluster_name=None, desired_capacity=None, draining_timeout=None, ebs_optimized=None, iam_instance_profile=None, image_id=None, key_pair=None, max_size=None, min_size=None, monitoring=None, name=None, region=None, scheduled_tasks=None, security_group_ids=None, subnet_ids=None, tags=None, update_policy=None, user_data=None, utilize_reserved_instances=None, whitelists=None)¶ Get an existing Ocean resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
associate_public_ip_address (pulumi.Input[bool]) – Configure public IP address allocation.
cluster_name (pulumi.Input[str]) – The ocean cluster name.
desired_capacity (pulumi.Input[float]) – The number of instances to launch and maintain in the cluster.
draining_timeout (pulumi.Input[float]) – The time in seconds, the instance is allowed to run while detached from the ELB. This is to allow the instance time to be drained from incoming TCP connections before terminating it, during a scale down operation.
ebs_optimized (pulumi.Input[bool]) – Enable EBS optimized for cluster. Flag will enable optimized capacity for high bandwidth connectivity to the EB service for non EBS optimized instance types. For instances that are EBS optimized this flag will be ignored.
iam_instance_profile (pulumi.Input[str]) – The instance profile iam role.
image_id (pulumi.Input[str]) – ID of the image used to launch the instances.
key_pair (pulumi.Input[str]) – The key pair to attach the instances.
max_size (pulumi.Input[float]) – The upper limit of instances the cluster can scale up to.
min_size (pulumi.Input[float]) – The lower limit of instances the cluster can scale down to.
monitoring (pulumi.Input[bool]) – Enable detailed monitoring for cluster. Flag will enable Cloud Watch detailed detailed monitoring (one minute increments). Note: there are additional hourly costs for this service based on the region used.
name (pulumi.Input[str]) – The Ocean cluster name.
region (pulumi.Input[str]) – The region the cluster will run in.
security_group_ids (pulumi.Input[list]) – One or more security group ids.
subnet_ids (pulumi.Input[list]) – A comma-separated list of subnet identifiers for the Ocean cluster. Subnet IDs should be configured with auto assign public ip.
tags (pulumi.Input[list]) – Optionally adds tags to instances launched in an Ocean cluster.
user_data (pulumi.Input[str]) – Base64-encoded MIME user data to make available to the instances.
utilize_reserved_instances (pulumi.Input[bool]) – If Reserved instances exist, OCean will utilize them before launching Spot instances.
whitelists (pulumi.Input[list]) – Instance types allowed in the Ocean cluster, Cannot be configured if blacklist is configured.
The autoscaler object supports the following:
cooldown(pulumi.Input[float])down(pulumi.Input[dict])maxScaleDownPercentage(pulumi.Input[float])
headroom(pulumi.Input[dict])cpuPerUnit(pulumi.Input[float])memoryPerUnit(pulumi.Input[float])numOfUnits(pulumi.Input[float])
isAutoConfig(pulumi.Input[bool])isEnabled(pulumi.Input[bool])resource_limits(pulumi.Input[dict])maxMemoryGib(pulumi.Input[float])maxVcpu(pulumi.Input[float])
The scheduled_tasks object supports the following:
shutdownHours(pulumi.Input[dict])isEnabled(pulumi.Input[bool])timeWindows(pulumi.Input[list])
tasks(pulumi.Input[list])cronExpression(pulumi.Input[str])isEnabled(pulumi.Input[bool])taskType(pulumi.Input[str])
The tags object supports the following:
key(pulumi.Input[str]) - The tag key.value(pulumi.Input[str]) - The tag value.
The update_policy object supports the following:
rollConfig(pulumi.Input[dict])batchSizePercentage(pulumi.Input[float])
shouldRoll(pulumi.Input[bool])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_spotinst.ecs.OceanLaunchSpec(resource_name, opts=None, attributes=None, autoscale_headrooms=None, iam_instance_profile=None, image_id=None, name=None, ocean_id=None, security_group_ids=None, tags=None, user_data=None, __props__=None, __name__=None, __opts__=None)¶ Provides a custom Spotinst Ocean ECS Launch Spec resource.
import pulumi import pulumi_spotinst as spotinst example = spotinst.ecs.OceanLaunchSpec("example", attributes=[{ "key": "fakeKey", "value": "fakeValue", }], autoscale_headrooms=[{ "cpuPerUnit": 1000, "memoryPerUnit": 2048, "numOfUnits": 5, }], iam_instance_profile="iam-profile", image_id="ami-123456", ocean_id="o-123456", security_group_ids=["awseb-12345"], tags=[{ "key": "Env", "value": "production", }], user_data="echo hello world")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
attributes (pulumi.Input[list]) – Optionally adds labels to instances launched in an Ocean cluster.
autoscale_headrooms (pulumi.Input[list]) – Set custom headroom per launch spec. provide list of headrooms object.
iam_instance_profile (pulumi.Input[str]) – The ARN or name of an IAM instance profile to associate with launched instances.
image_id (pulumi.Input[str]) – ID of the image used to launch the instances.
name (pulumi.Input[str]) – The Ocean Launch Specification name.
ocean_id (pulumi.Input[str]) – The Ocean cluster ID .
security_group_ids (pulumi.Input[list]) – One or more security group ids.
tags (pulumi.Input[list]) – A key/value mapping of tags to assign to the resource.
user_data (pulumi.Input[str]) – Base64-encoded MIME user data to make available to the instances.
The attributes object supports the following:
key(pulumi.Input[str]) - The label key.value(pulumi.Input[str]) - The label value.
The autoscale_headrooms object supports the following:
cpuPerUnit(pulumi.Input[float]) - Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in CPU units, where 1024 units = 1 vCPU.memoryPerUnit(pulumi.Input[float]) - Optionally configure the amount of memory (MiB) to allocate for each headroom unit.numOfUnits(pulumi.Input[float]) - The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
The tags object supports the following:
key(pulumi.Input[str]) - The label key.value(pulumi.Input[str]) - The label value.
attributes: pulumi.Output[list] = None¶Optionally adds labels to instances launched in an Ocean cluster.
key(str) - The label key.value(str) - The label value.
autoscale_headrooms: pulumi.Output[list] = None¶Set custom headroom per launch spec. provide list of headrooms object.
cpuPerUnit(float) - Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in CPU units, where 1024 units = 1 vCPU.memoryPerUnit(float) - 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 and memory.
iam_instance_profile: pulumi.Output[str] = None¶The ARN or name of an IAM instance profile to associate with launched instances.
image_id: pulumi.Output[str] = None¶ID of the image used to launch the instances.
name: pulumi.Output[str] = None¶The Ocean Launch Specification name.
ocean_id: pulumi.Output[str] = None¶The Ocean cluster ID .
security_group_ids: pulumi.Output[list] = None¶One or more security group ids.
A key/value mapping of tags to assign to the resource.
key(str) - The label key.value(str) - The label value.
user_data: pulumi.Output[str] = None¶Base64-encoded MIME user data to make available to the instances.
- static
get(resource_name, id, opts=None, attributes=None, autoscale_headrooms=None, iam_instance_profile=None, image_id=None, name=None, ocean_id=None, security_group_ids=None, tags=None, user_data=None)¶ Get an existing OceanLaunchSpec resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
attributes (pulumi.Input[list]) – Optionally adds labels to instances launched in an Ocean cluster.
autoscale_headrooms (pulumi.Input[list]) – Set custom headroom per launch spec. provide list of headrooms object.
iam_instance_profile (pulumi.Input[str]) – The ARN or name of an IAM instance profile to associate with launched instances.
image_id (pulumi.Input[str]) – ID of the image used to launch the instances.
name (pulumi.Input[str]) – The Ocean Launch Specification name.
ocean_id (pulumi.Input[str]) – The Ocean cluster ID .
security_group_ids (pulumi.Input[list]) – One or more security group ids.
tags (pulumi.Input[list]) – A key/value mapping of tags to assign to the resource.
user_data (pulumi.Input[str]) – Base64-encoded MIME user data to make available to the instances.
The attributes object supports the following:
key(pulumi.Input[str]) - The label key.value(pulumi.Input[str]) - The label value.
The autoscale_headrooms object supports the following:
cpuPerUnit(pulumi.Input[float]) - Optionally configure the number of CPUs to allocate for each headroom unit. CPUs are denoted in CPU units, where 1024 units = 1 vCPU.memoryPerUnit(pulumi.Input[float]) - Optionally configure the amount of memory (MiB) to allocate for each headroom unit.numOfUnits(pulumi.Input[float]) - The number of units to retain as headroom, where each unit has the defined headroom CPU and memory.
The tags object supports the following:
key(pulumi.Input[str]) - The label key.value(pulumi.Input[str]) - The label value.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str