Show / Hide Table of Contents

Class CloudFormationInit

A CloudFormation-init configuration.

Inheritance
System.Object
CloudFormationInit
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CloudFormationInit : DeputyBase
Syntax (vb)
Public Class CloudFormationInit
    Inherits DeputyBase
Remarks

ExampleMetadata: infused

Examples
Bucket myBucket;


InitServiceRestartHandle handle = new InitServiceRestartHandle();

CloudFormationInit.FromElements(InitFile.FromString("/etc/nginx/nginx.conf", "...", new InitFileOptions { ServiceRestartHandles = new [] { handle } }), InitSource.FromS3Object("/var/www/html", myBucket, "html.zip", new InitSourceOptions { ServiceRestartHandles = new [] { handle } }), InitService.Enable("nginx", new InitServiceOptions {
    ServiceRestartHandle = handle
}));

Synopsis

Constructors

CloudFormationInit(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

CloudFormationInit(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

Methods

AddConfig(String, InitConfig)

Add a config with the given name to this CloudFormationInit object.

AddConfigSet(String, String[])

Add a config set with the given name to this CloudFormationInit object.

Attach(CfnResource, IAttachInitOptions)

Attach the CloudFormation Init config to the given resource.

FromConfig(InitConfig)

Use an existing InitConfig object as the default and only config.

FromConfigSets(IConfigSetProps)

Build a CloudFormationInit from config sets.

FromElements(InitElement[])

Build a new config from a set of Init Elements.

Constructors

CloudFormationInit(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected CloudFormationInit(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

CloudFormationInit(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected CloudFormationInit(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

Methods

AddConfig(String, InitConfig)

Add a config with the given name to this CloudFormationInit object.

public virtual void AddConfig(string configName, InitConfig config)
Parameters
configName System.String
config InitConfig

AddConfigSet(String, String[])

Add a config set with the given name to this CloudFormationInit object.

public virtual void AddConfigSet(string configSetName, string[] configNames = null)
Parameters
configSetName System.String
configNames System.String[]
Remarks

The new configset will reference the given configs in the given order.

Attach(CfnResource, IAttachInitOptions)

Attach the CloudFormation Init config to the given resource.

public virtual void Attach(CfnResource attachedResource, IAttachInitOptions attachOptions)
Parameters
attachedResource CfnResource
attachOptions IAttachInitOptions
Remarks

As an app builder, use instance.applyCloudFormationInit() or autoScalingGroup.applyCloudFormationInit() to trigger this method.

This method does the following:

    FromConfig(InitConfig)

    Use an existing InitConfig object as the default and only config.

    public static CloudFormationInit FromConfig(InitConfig config)
    Parameters
    config InitConfig
    Returns

    CloudFormationInit

    FromConfigSets(IConfigSetProps)

    Build a CloudFormationInit from config sets.

    public static CloudFormationInit FromConfigSets(IConfigSetProps props)
    Parameters
    props IConfigSetProps
    Returns

    CloudFormationInit

    FromElements(InitElement[])

    Build a new config from a set of Init Elements.

    public static CloudFormationInit FromElements(params InitElement[] elements)
    Parameters
    elements InitElement[]
    Returns

    CloudFormationInit

    Back to top Generated by DocFX