InstanceInitiatedShutdownBehavior
- class aws_cdk.aws_ec2.InstanceInitiatedShutdownBehavior(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Provides the options for specifying the instance initiated shutdown behavior.
- See:
- ExampleMetadata:
infused
Example:
# vpc: ec2.Vpc ec2.Instance(self, "Instance", vpc=vpc, instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.NANO), machine_image=ec2.AmazonLinuxImage(generation=ec2.AmazonLinuxGeneration.AMAZON_LINUX_2), instance_initiated_shutdown_behavior=ec2.InstanceInitiatedShutdownBehavior.TERMINATE )
Attributes
- STOP
The instance will stop when it initiates a shutdown.
- TERMINATE
The instance will be terminated when it initiates a shutdown.