Data Types

AmazonRequestEc2SpotInstancesParameters Object

Description

Parameters for the Amazon Request EC2 Spot Instances action.

Properties

availabilityZone

Availability zone in which to launch the requested EC2 instances.

Type: string

Required: No

cancelTimeInSeconds

Time (in seconds) after the request is made when it will be cancelled.

Type: integer

Required: No

credentialIds

Registered credentials to use with the action. One and only one credential must be specified.

Type: Array of string

Required: Yes

elasticIp

Elastic IP address to assign to the launched EC2 instance. If more than one EC2 instance is launched, only one will receive the elastic IP address.

Type: string

Required: No

iamInstanceProfile

IAM instance profile to assign to the launched EC2 instances.

Type: string

Required: No

imageDescriptionComparison

Comparison to use when identifying images by description. Required when imageIdentificationMethod is by-image-description.

Type: AmiImageDescriptionComparison object.

Required: Conditional

imageId

Image ID of the AMI image to use for the spot instance request. Required when imageIdentificationMethod is by-image-id.

Type: string

Required: Conditional

imageIdentificationMethod

Method of identifying the AMI image to use.

Type: string

Valid Values:

  • all-images

  • by-image-id

  • by-image-name

  • by-image-description

  • by-image-name-tag

  • by-resource-tag

Required: Yes

imageNameComparison

Comparison to use when identifying images by name. Required when imageIdentificationMethod is by-image-name.

Type: AmiImageNameComparison object.

Required: Conditional

instanceType

EC2 Instance type to use with the request.

Type: string

Required: Yes

keyPair

Name of the key pair to assign to the EC2 instances.

Type: string

Required: No

maxInstanceCount

Maximum number of instances to request.

Type: integer

Required: Yes

maxSpotPriceUsd

Maximum spot price to use for the request.

Type: decimal

Required: Yes

nameTagComparison

Comparison to use when identifying images by the Name tag. Required when imageIdentificationMethod is by-image-name-tag.

Type: NameTagComparison object.

Required: Conditional

regionNames

Region to use with the action. One and only one region must be specified.

Type: Array of string

Required: Yes

resourceTagComparison

Comparison to use when identifying images by resource tag. Required when imageIdentificationMethod is by-resource-tag.

Type: ResourceTagComparison object.

Required: Conditional

securityGroup

Security group to attach to the EC2 instances.

Type: string

Required: No

terminateTimeFrame

Time frame determining when the EC2 instances will be terminated. Required when terminateTimeInSeconds is set.

Type: string

Valid Values:

  • from-action-start

  • from-instance-launch

Required: Conditional

terminateTimeInSeconds

Time (in seconds) after which the EC2 instances will be terminated.

Type: integer

Required: No

userData

User data which will be used by the EC2 instances.

Type: string

Required: No

userDataFormat

Format of the text in the UserData field. Required when UserData is specified.

Type: string

Valid Values:

  • text

  • base64-encoded

Required: Conditional

vpcSubnetId

ID of the VPC subnet in which the EC2 instances should be launched.

Type: string

Required: No

Sample JSON

{
"credentialIds": [
"cred-00000001"
],
"regionNames": [
"us-east-1"
],
"ImageIdentificationMethod": "by-image-name",
"ImageNameComparison": {
"compareType": "starts-with",
"imageName": "prod-"
},
"MaxSpotPriceUsd": 0.25,
"MaxInstanceCount": 1,
"InstanceType": "t2.micro",
"vpcSubnetId": "subnet-00000000",
"cancelTimeInSeconds": 300,
"terminateTimeInSeconds": 300,
"TerminateTimeFrame": "from-instance-launch"
}