class BottleRocketImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.BottleRocketImage |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#BottleRocketImage |
Java | software.amazon.awscdk.services.ecs.BottleRocketImage |
Python | aws_cdk.aws_ecs.BottleRocketImage |
TypeScript (source) | aws-cdk-lib » aws_ecs » BottleRocketImage |
Implements
IMachine
Construct an Bottlerocket image from the latest AMI published in SSM.
Example
declare const cluster: ecs.Cluster;
cluster.addCapacity('bottlerocket-asg', {
minCapacity: 2,
instanceType: new ec2.InstanceType('c5.large'),
machineImage: new ecs.BottleRocketImage(),
});
Initializer
new BottleRocketImage(props?: BottleRocketImageProps)
Parameters
- props
Bottle
Rocket Image Props
Constructs a new instance of the BottleRocketImage class.
Methods
Name | Description |
---|---|
get | Return the correct image. |
static is | Return whether the given object is a BottleRocketImage. |
getImage(scope)
public getImage(scope: Construct): MachineImageConfig
Parameters
- scope
Construct
Returns
Return the correct image.
static isBottleRocketImage(x)
public static isBottleRocketImage(x: any): boolean
Parameters
- x
any
Returns
boolean
Return whether the given object is a BottleRocketImage.