Class CfnStack
Inherited Members
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnStack : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnStack
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-stack.html
CloudformationResource: AWS::OpsWorks::Stack
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.OpsWorks;
var customJson;
var cfnStack = new CfnStack(this, "MyCfnStack", new CfnStackProps {
DefaultInstanceProfileArn = "defaultInstanceProfileArn",
Name = "name",
ServiceRoleArn = "serviceRoleArn",
// the properties below are optional
AgentVersion = "agentVersion",
Attributes = new Dictionary<string, string> {
{ "attributesKey", "attributes" }
},
ChefConfiguration = new ChefConfigurationProperty {
BerkshelfVersion = "berkshelfVersion",
ManageBerkshelf = false
},
CloneAppIds = new [] { "cloneAppIds" },
ClonePermissions = false,
ConfigurationManager = new StackConfigurationManagerProperty {
Name = "name",
Version = "version"
},
CustomCookbooksSource = new SourceProperty {
Password = "password",
Revision = "revision",
SshKey = "sshKey",
Type = "type",
Url = "url",
Username = "username"
},
CustomJson = customJson,
DefaultAvailabilityZone = "defaultAvailabilityZone",
DefaultOs = "defaultOs",
DefaultRootDeviceType = "defaultRootDeviceType",
DefaultSshKeyName = "defaultSshKeyName",
DefaultSubnetId = "defaultSubnetId",
EcsClusterArn = "ecsClusterArn",
ElasticIps = new [] { new ElasticIpProperty {
Ip = "ip",
// the properties below are optional
Name = "name"
} },
HostnameTheme = "hostnameTheme",
RdsDbInstances = new [] { new RdsDbInstanceProperty {
DbPassword = "dbPassword",
DbUser = "dbUser",
RdsDbInstanceArn = "rdsDbInstanceArn"
} },
SourceStackId = "sourceStackId",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
UseCustomCookbooks = false,
UseOpsworksSecurityGroups = false,
VpcId = "vpcId"
});
Synopsis
Constructors
CfnStack(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnStack(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnStack(Construct, String, ICfnStackProps) |
Properties
AgentVersion | The default AWS OpsWorks Stacks agent version. |
Attributes | One or more user-defined key-value pairs to be added to the stack attributes. |
AttrId | |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ChefConfiguration | A |
CloneAppIds | If you're cloning an AWS OpsWorks stack, a list of AWS OpsWorks application stack IDs from the source stack to include in the cloned stack. |
ClonePermissions | If you're cloning an AWS OpsWorks stack, indicates whether to clone the source stack's permissions. |
ConfigurationManager | The configuration manager. |
CustomCookbooksSource | Contains the information required to retrieve an app or cookbook from a repository. |
CustomJson | A string that contains user-defined, custom JSON. |
DefaultAvailabilityZone | The stack's default Availability Zone, which must be in the specified region. |
DefaultInstanceProfileArn | The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances. |
DefaultOs | The stack's default operating system, which is installed on every instance unless you specify a different operating system when you create the instance. |
DefaultRootDeviceType | The default root device type. |
DefaultSshKeyName | A default Amazon EC2 key pair name. |
DefaultSubnetId | The stack's default subnet ID. |
EcsClusterArn | The Amazon Resource Name (ARN) of the Amazon Elastic Container Service ( Amazon ECS ) cluster to register with the AWS OpsWorks stack. |
ElasticIps | A list of Elastic IP addresses to register with the AWS OpsWorks stack. |
HostnameTheme | The stack's host name theme, with spaces replaced by underscores. |
Name | The stack name. |
RdsDbInstances | The Amazon Relational Database Service ( Amazon RDS ) database instance to register with the AWS OpsWorks stack. |
ServiceRoleArn | The stack's IAM role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf. |
SourceStackId | If you're cloning an AWS OpsWorks stack, the stack ID of the source AWS OpsWorks stack to clone. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | A map that contains tag keys and tag values that are attached to a stack or layer. |
UseCustomCookbooks | Whether the stack uses custom cookbooks. |
UseOpsworksSecurityGroups | Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers. |
VpcId | The ID of the VPC that the stack is to be launched into. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnStack(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnStack(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnStack(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnStack(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnStack(Construct, String, ICfnStackProps)
public CfnStack(Construct scope, string id, ICfnStackProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnStackProps
Resource properties.
Properties
AgentVersion
The default AWS OpsWorks Stacks agent version.
public virtual string AgentVersion { get; set; }
Property Value
System.String
Remarks
You have the following options:.
Attributes
One or more user-defined key-value pairs to be added to the stack attributes.
public virtual object Attributes { get; set; }
Property Value
System.Object
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
ChefConfiguration
A ChefConfiguration
object that specifies whether to enable Berkshelf and the Berkshelf version on Chef 11.10 stacks. For more information, see Create a New Stack .
public virtual object ChefConfiguration { get; set; }
Property Value
System.Object
CloneAppIds
If you're cloning an AWS OpsWorks stack, a list of AWS OpsWorks application stack IDs from the source stack to include in the cloned stack.
public virtual string[] CloneAppIds { get; set; }
Property Value
System.String[]
ClonePermissions
If you're cloning an AWS OpsWorks stack, indicates whether to clone the source stack's permissions.
public virtual object ClonePermissions { get; set; }
Property Value
System.Object
ConfigurationManager
The configuration manager.
public virtual object ConfigurationManager { get; set; }
Property Value
System.Object
CustomCookbooksSource
Contains the information required to retrieve an app or cookbook from a repository.
public virtual object CustomCookbooksSource { get; set; }
Property Value
System.Object
CustomJson
A string that contains user-defined, custom JSON.
public virtual object CustomJson { get; set; }
Property Value
System.Object
DefaultAvailabilityZone
The stack's default Availability Zone, which must be in the specified region.
public virtual string DefaultAvailabilityZone { get; set; }
Property Value
System.String
DefaultInstanceProfileArn
The Amazon Resource Name (ARN) of an IAM profile that is the default profile for all of the stack's EC2 instances.
public virtual string DefaultInstanceProfileArn { get; set; }
Property Value
System.String
DefaultOs
The stack's default operating system, which is installed on every instance unless you specify a different operating system when you create the instance.
public virtual string DefaultOs { get; set; }
Property Value
System.String
DefaultRootDeviceType
The default root device type.
public virtual string DefaultRootDeviceType { get; set; }
Property Value
System.String
DefaultSshKeyName
A default Amazon EC2 key pair name.
public virtual string DefaultSshKeyName { get; set; }
Property Value
System.String
DefaultSubnetId
The stack's default subnet ID.
public virtual string DefaultSubnetId { get; set; }
Property Value
System.String
EcsClusterArn
The Amazon Resource Name (ARN) of the Amazon Elastic Container Service ( Amazon ECS ) cluster to register with the AWS OpsWorks stack.
public virtual string EcsClusterArn { get; set; }
Property Value
System.String
ElasticIps
A list of Elastic IP addresses to register with the AWS OpsWorks stack.
public virtual object ElasticIps { get; set; }
Property Value
System.Object
HostnameTheme
The stack's host name theme, with spaces replaced by underscores.
public virtual string HostnameTheme { get; set; }
Property Value
System.String
Name
The stack name.
public virtual string Name { get; set; }
Property Value
System.String
RdsDbInstances
The Amazon Relational Database Service ( Amazon RDS ) database instance to register with the AWS OpsWorks stack.
public virtual object RdsDbInstances { get; set; }
Property Value
System.Object
ServiceRoleArn
The stack's IAM role, which allows AWS OpsWorks Stacks to work with AWS resources on your behalf.
public virtual string ServiceRoleArn { get; set; }
Property Value
System.String
SourceStackId
If you're cloning an AWS OpsWorks stack, the stack ID of the source AWS OpsWorks stack to clone.
public virtual string SourceStackId { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
A map that contains tag keys and tag values that are attached to a stack or layer.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
UseCustomCookbooks
Whether the stack uses custom cookbooks.
public virtual object UseCustomCookbooks { get; set; }
Property Value
System.Object
UseOpsworksSecurityGroups
Whether to associate the AWS OpsWorks Stacks built-in security groups with the stack's layers.
public virtual object UseOpsworksSecurityGroups { get; set; }
Property Value
System.Object
VpcId
The ID of the VPC that the stack is to be launched into.
public virtual string VpcId { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>