UserData

class aws_cdk.aws_ec2.UserData

Bases: object

Instance User Data.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Return type

None

Methods

add_commands(*commands)

Add one or more commands to the user data.

Parameters

commands (str) –

Return type

None

render()

Render the UserData for use in a construct.

Return type

str

Static Methods

classmethod custom(content)

Create a userdata object with custom content.

Parameters

content (str) –

Return type

UserData

classmethod for_linux(*, shebang=None)

Create a userdata object for Linux hosts.

Parameters
  • options

  • shebang (Optional[str]) – Shebang for the UserData script. Default: “#!/bin/bash”

Return type

UserData

classmethod for_operating_system(os)
Parameters

os (OperatingSystemType) –

Return type

UserData

classmethod for_windows()

Create a userdata object for Windows hosts.

Return type

UserData