@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.407Z") @Stability(value=Stable) public class CloudFormationInit extends software.amazon.jsii.JsiiObject
Example:
// Example automatically generated from non-compiling source. May contain errors.
Bucket myBucket;
InitServiceRestartHandle handle = new InitServiceRestartHandle();
CloudFormationInit.fromElements(InitFile.fromString("/etc/nginx/nginx.conf", "...", InitFileOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitSource.fromS3Object("/var/www/html", myBucket, "html.zip", InitSourceOptions.builder().serviceRestartHandles(List.of(handle)).build()), InitService.enable("nginx", InitServiceOptions.builder()
.serviceRestartHandle(handle)
.build()));
| Modifier | Constructor and Description |
|---|---|
protected |
CloudFormationInit(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CloudFormationInit(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConfig(String configName,
InitConfig config)
Add a config with the given name to this CloudFormationInit object.
|
void |
addConfigSet(String configSetName)
Add a config set with the given name to this CloudFormationInit object.
|
void |
addConfigSet(String configSetName,
List<String> configNames)
Add a config set with the given name to this CloudFormationInit object.
|
void |
attach(CfnResource attachedResource,
AttachInitOptions attachOptions)
Attach the CloudFormation Init config to the given resource.
|
static CloudFormationInit |
fromConfig(InitConfig config)
Use an existing InitConfig object as the default and only config.
|
static CloudFormationInit |
fromConfigSets(ConfigSetProps props)
Build a CloudFormationInit from config sets.
|
static CloudFormationInit |
fromElements(InitElement... elements)
Build a new config from a set of Init Elements.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected CloudFormationInit(software.amazon.jsii.JsiiObjectRef objRef)
protected CloudFormationInit(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static CloudFormationInit fromConfig(@NotNull InitConfig config)
config - This parameter is required.@Stability(value=Stable) @NotNull public static CloudFormationInit fromConfigSets(@NotNull ConfigSetProps props)
props - This parameter is required.@Stability(value=Stable) @NotNull public static CloudFormationInit fromElements(@NotNull InitElement... elements)
elements - This parameter is required.@Stability(value=Stable)
public void addConfig(@NotNull
String configName,
@NotNull
InitConfig config)
configName - This parameter is required.config - This parameter is required.@Stability(value=Stable)
public void addConfigSet(@NotNull
String configSetName,
@Nullable
List<String> configNames)
The new configset will reference the given configs in the given order.
configSetName - This parameter is required.configNames - @Stability(value=Stable)
public void addConfigSet(@NotNull
String configSetName)
The new configset will reference the given configs in the given order.
configSetName - This parameter is required.@Stability(value=Stable)
public void attach(@NotNull
CfnResource attachedResource,
@NotNull
AttachInitOptions attachOptions)
As an app builder, use instance.applyCloudFormationInit() or
autoScalingGroup.applyCloudFormationInit() to trigger this method.
This method does the following:
AWS::CloudFormation::Init object to the given resource's
metadata, potentially adding a AWS::CloudFormation::Authentication object
next to it if required.cfn-init and cfn-signal to work, and potentially add permissions to download
referenced asset and bucket resources.cfn-init script.attachedResource - This parameter is required.attachOptions - This parameter is required.Copyright © 2022. All rights reserved.