InitFileOptions
- class aws_cdk.aws_ec2.InitFileOptions(*, base64_encoded=None, group=None, mode=None, owner=None, service_restart_handles=None)
Bases:
object
Options for InitFile.
- Parameters:
base64_encoded (
Optional
[bool
]) – True if the inlined content (from a string or file) should be treated as base64 encoded. Only applicable for inlined string and file content. Default: falsegroup (
Optional
[str
]) – The name of the owning group for this file. Not supported for Windows systems. Default: ‘root’mode (
Optional
[str
]) – A six-digit octal value representing the mode for this file. Use the first three digits for symlinks and the last three digits for setting permissions. To create a symlink, specify 120xxx, where xxx defines the permissions of the target file. To specify permissions for a file, use the last three digits, such as 000644. Not supported for Windows systems. Default: ‘000644’owner (
Optional
[str
]) – The name of the owning user for this file. Not supported for Windows systems. Default: ‘root’service_restart_handles (
Optional
[Sequence
[InitServiceRestartHandle
]]) – Restart the given service after this file has been written. Default: - Do not restart any service
- ExampleMetadata:
infused
Example:
# my_bucket: s3.Bucket handle = ec2.InitServiceRestartHandle() ec2.CloudFormationInit.from_elements( ec2.InitFile.from_string("/etc/nginx/nginx.conf", "...", service_restart_handles=[handle]), ec2.InitSource.from_s3_object("/var/www/html", my_bucket, "html.zip", service_restart_handles=[handle]), ec2.InitService.enable("nginx", service_restart_handle=handle ))
Attributes
- base64_encoded
True if the inlined content (from a string or file) should be treated as base64 encoded.
Only applicable for inlined string and file content.
- Default:
false
- group
The name of the owning group for this file.
Not supported for Windows systems.
- Default:
‘root’
- mode
A six-digit octal value representing the mode for this file.
Use the first three digits for symlinks and the last three digits for setting permissions. To create a symlink, specify 120xxx, where xxx defines the permissions of the target file. To specify permissions for a file, use the last three digits, such as 000644.
Not supported for Windows systems.
- Default:
‘000644’
- owner
The name of the owning user for this file.
Not supported for Windows systems.
- Default:
‘root’
- service_restart_handles
Restart the given service after this file has been written.
- Default:
Do not restart any service