WindowsUserDataOptions

class aws_cdk.aws_ec2.WindowsUserDataOptions(*, persist=None)

Bases: object

Options when constructing UserData for Windows.

Parameters

persist (Optional[bool]) – Set to true to set this userdata to persist through an instance reboot; allowing it to run on every instance start. By default, UserData is run only once during the first instance launch. For more information, see: https://aws.amazon.com/premiumsupport/knowledge-center/execute-user-data-ec2/ https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html#user-data-scripts Default: false

ExampleMetadata

fixture=_generated

Example:

# 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

windows_user_data_options = ec2.WindowsUserDataOptions(
    persist=False
)

Attributes

persist

Set to true to set this userdata to persist through an instance reboot;

allowing it to run on every instance start. By default, UserData is run only once during the first instance launch.

For more information, see: https://aws.amazon.com/premiumsupport/knowledge-center/execute-user-data-ec2/ https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html#user-data-scripts

Default

false