interface InitSourceOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.InitSourceOptions |
Java | software.amazon.awscdk.services.ec2.InitSourceOptions |
Python | aws_cdk.aws_ec2.InitSourceOptions |
TypeScript (source) | @aws-cdk/aws-ec2 » InitSourceOptions |
Additional options for an InitSource.
Example
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
Name | Type | Description |
---|---|---|
service | Init [] | Restart the given services after this archive has been extracted. |
serviceRestartHandles?
Type:
Init
[]
(optional, default: Do not restart any service)
Restart the given services after this archive has been extracted.