InitFileOptions Struct
Options for InitFile.
Example
ts
declare const myBucket: s3.Bucket;
const handle = new ec2.InitServiceRestartHandle();
ec2.CloudFormationInit.fromElements(
ec2.InitFile.fromString('/etc/nginx/nginx.conf', '...', { serviceRestartHandles: [handle] }),
ec2.InitSource.fromS3Object('/var/www/html', myBucket, 'html.zip', { serviceRestartHandles: [handle] }),
ec2.InitService.enable('nginx', {
serviceRestartHandle: handle,
})
);
Properties
base64Encodedoptionalbooleanbase64_encodedoptionalboolbase64EncodedoptionalBooleanBase64EncodedoptionalboolBase64Encodedoptional*bool= false#True if the inlined content (from a string or file) should be treated as base64 encoded.
Only applicable for inlined string and file content.
groupoptionalstringgroupoptionalstrgroupoptionalStringGroupoptionalstringGroupoptional*string= 'root'#The name of the owning group for this file.
Not supported for Windows systems.
A six-digit octal value representing the mode for this file.
notes
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.
owneroptionalstringowneroptionalstrowneroptionalStringOwneroptionalstringOwneroptional*string= 'root'#The name of the owning user for this file.
Not supported for Windows systems.
serviceRestartHandlesoptionalInitServiceRestartHandle[]service_restart_handlesoptionaltyping.List[InitServiceRestartHandle]serviceRestartHandlesoptionalList<InitServiceRestartHandle>ServiceRestartHandlesoptionalInitServiceRestartHandle[]ServiceRestartHandlesoptional*[]InitServiceRestartHandle#Restart the given service after this file has been written.
Default: Do not restart any service