InstanceMarketOptionsProperty Struct
Specifies the market (purchasing) option for an instance.
InstanceMarketOptions is a property of the AWS::EC2::LaunchTemplate LaunchTemplateData .
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const instanceMarketOptionsProperty: ec2.CfnLaunchTemplate.InstanceMarketOptionsProperty = {
marketType: 'marketType',
spotOptions: {
blockDurationMinutes: 123,
instanceInterruptionBehavior: 'instanceInterruptionBehavior',
maxPrice: 'maxPrice',
spotInstanceType: 'spotInstanceType',
validUntil: 'validUntil',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
instance_market_options_property = ec2.CfnLaunchTemplate.InstanceMarketOptionsProperty(
market_type="marketType",
spot_options=ec2.CfnLaunchTemplate.SpotOptionsProperty(
block_duration_minutes=123,
instance_interruption_behavior="instanceInterruptionBehavior",
max_price="maxPrice",
spot_instance_type="spotInstanceType",
valid_until="validUntil"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
InstanceMarketOptionsProperty instanceMarketOptionsProperty = InstanceMarketOptionsProperty.builder()
.marketType("marketType")
.spotOptions(SpotOptionsProperty.builder()
.blockDurationMinutes(123)
.instanceInterruptionBehavior("instanceInterruptionBehavior")
.maxPrice("maxPrice")
.spotInstanceType("spotInstanceType")
.validUntil("validUntil")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var instanceMarketOptionsProperty = new InstanceMarketOptionsProperty {
MarketType = "marketType",
SpotOptions = new SpotOptionsProperty {
BlockDurationMinutes = 123,
InstanceInterruptionBehavior = "instanceInterruptionBehavior",
MaxPrice = "maxPrice",
SpotInstanceType = "spotInstanceType",
ValidUntil = "validUntil"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
instanceMarketOptionsProperty := &InstanceMarketOptionsProperty{
MarketType: jsii.String("marketType"),
SpotOptions: &SpotOptionsProperty{
BlockDurationMinutes: jsii.Number(123),
InstanceInterruptionBehavior: jsii.String("instanceInterruptionBehavior"),
MaxPrice: jsii.String("maxPrice"),
SpotInstanceType: jsii.String("spotInstanceType"),
ValidUntil: jsii.String("validUntil"),
},
}
Properties
marketTypeoptionalstringmarket_typeoptionalstrmarketTypeoptionalStringMarketTypeoptionalstringMarketTypeoptional*string #The market type.
spotOptionsoptionalIResolvable | CfnLaunchTemplate.spot_optionsoptionaltyping.Union[IResolvable, SpotOptionsProperty]spotOptionsoptionalIResolvableSpotOptionsoptionalIResolvableSpotOptionsoptionalinterface{} #The options for Spot Instances.