Show / Hide Table of Contents

Class CfnInstance

A CloudFormation AWS::OpsWorks::Instance.

Inheritance
System.Object
Construct
CfnElement
CfnRefElement
CfnResource
CfnInstance
Implements
IConstruct
Constructs.IConstruct
IDependable
IInspectable
Inherited Members
CfnResource.IsCfnResource(IConstruct)
CfnResource.AddDeletionOverride(String)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(String, Object)
CfnResource.AddOverride(String, Object)
CfnResource.AddPropertyDeletionOverride(String)
CfnResource.AddPropertyOverride(String, Object)
CfnResource.ApplyRemovalPolicy(Nullable<RemovalPolicy>, IRemovalPolicyOptions)
CfnResource.GetAtt(String)
CfnResource.GetMetadata(String)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(Object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnRefElement.Ref
CfnElement.IsCfnElement(Object)
CfnElement.OverrideLogicalId(String)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.AWS.OpsWorks.dll
Syntax (csharp)
public class CfnInstance : CfnResource, IConstruct, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnInstance
    Inherits CfnResource
    Implements IConstruct, IConstruct, IDependable, IInspectable
Remarks

Creates an instance in a specified stack. For more information, see Adding an Instance to a Layer .

Required Permissions : To use this action, an IAM user must have a Manage permissions level for the stack, or an attached policy that explicitly grants permissions. For more information on user permissions, see Managing User Permissions .

CloudformationResource: AWS::OpsWorks::Instance

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html

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;

CfnInstance cfnInstance = new CfnInstance(this, "MyCfnInstance", new CfnInstanceProps {
    InstanceType = "instanceType",
    LayerIds = new [] { "layerIds" },
    StackId = "stackId",

    // the properties below are optional
    AgentVersion = "agentVersion",
    AmiId = "amiId",
    Architecture = "architecture",
    AutoScalingType = "autoScalingType",
    AvailabilityZone = "availabilityZone",
    BlockDeviceMappings = new [] { new BlockDeviceMappingProperty {
        DeviceName = "deviceName",
        Ebs = new EbsBlockDeviceProperty {
            DeleteOnTermination = false,
            Iops = 123,
            SnapshotId = "snapshotId",
            VolumeSize = 123,
            VolumeType = "volumeType"
        },
        NoDevice = "noDevice",
        VirtualName = "virtualName"
    } },
    EbsOptimized = false,
    ElasticIps = new [] { "elasticIps" },
    Hostname = "hostname",
    InstallUpdatesOnBoot = false,
    Os = "os",
    RootDeviceType = "rootDeviceType",
    SshKeyName = "sshKeyName",
    SubnetId = "subnetId",
    Tenancy = "tenancy",
    TimeBasedAutoScaling = new TimeBasedAutoScalingProperty {
        Friday = new Dictionary<string, string> {
            { "fridayKey", "friday" }
        },
        Monday = new Dictionary<string, string> {
            { "mondayKey", "monday" }
        },
        Saturday = new Dictionary<string, string> {
            { "saturdayKey", "saturday" }
        },
        Sunday = new Dictionary<string, string> {
            { "sundayKey", "sunday" }
        },
        Thursday = new Dictionary<string, string> {
            { "thursdayKey", "thursday" }
        },
        Tuesday = new Dictionary<string, string> {
            { "tuesdayKey", "tuesday" }
        },
        Wednesday = new Dictionary<string, string> {
            { "wednesdayKey", "wednesday" }
        }
    },
    VirtualizationType = "virtualizationType",
    Volumes = new [] { "volumes" }
});

Synopsis

Constructors

CfnInstance(Construct, String, ICfnInstanceProps)

Create a new AWS::OpsWorks::Instance.

CfnInstance(ByRefValue)

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

CfnInstance(DeputyBase.DeputyProps)

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

Properties

AgentVersion

The default AWS OpsWorks Stacks agent version. You have the following options:.

AmiId

A custom AMI ID to be used to create the instance.

Architecture

The instance architecture.

AttrAvailabilityZone

The Availability Zone of the AWS OpsWorks instance, such as us-east-2a .

AttrPrivateDnsName

The private DNS name of the AWS OpsWorks instance.

AttrPrivateIp

The private IP address of the AWS OpsWorks instance, such as 192.0.2.0 .

AttrPublicDnsName

The public DNS name of the AWS OpsWorks instance.

AttrPublicIp

The public IP address of the AWS OpsWorks instance, such as 192.0.2.0 .

AutoScalingType

For load-based or time-based instances, the type.

AvailabilityZone

The Availability Zone of the AWS OpsWorks instance, such as us-east-2a .

BlockDeviceMappings

An array of BlockDeviceMapping objects that specify the instance's block devices.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties
EbsOptimized

Whether to create an Amazon EBS-optimized instance.

ElasticIps

A list of Elastic IP addresses to associate with the instance.

Hostname

The instance host name. The following are character limits for instance host names.

InstallUpdatesOnBoot

Whether to install operating system and package updates when the instance boots.

InstanceType

The instance type, such as t2.micro . For a list of supported instance types, open the stack in the console, choose Instances , and choose + Instance . The Size list contains the currently supported types. For more information, see Instance Families and Types . The parameter values that you use to specify the various types are in the API Name column of the Available Instance Types table.

LayerIds

An array that contains the instance's layer IDs.

Os

The instance's operating system, which must be set to one of the following.

RootDeviceType

The instance root device type.

SshKeyName

The instance's Amazon EC2 key-pair name.

StackId

The stack ID.

SubnetId

The ID of the instance's subnet.

Tenancy

The instance's tenancy option.

TimeBasedAutoScaling

The time-based scaling configuration for the instance.

VirtualizationType

The instance's virtualization type, paravirtual or hvm .

Volumes

A list of AWS OpsWorks volume IDs to associate with the instance.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<String, Object>)

Constructors

CfnInstance(Construct, String, ICfnInstanceProps)

Create a new AWS::OpsWorks::Instance.

public CfnInstance(Construct scope, string id, ICfnInstanceProps props)
Parameters
scope Construct
  • scope in which this resource is defined.
id System.String
  • scoped id of the resource.
props ICfnInstanceProps
  • resource properties.

CfnInstance(ByRefValue)

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

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

The Javascript-owned object reference

CfnInstance(DeputyBase.DeputyProps)

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

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

The deputy props

Properties

AgentVersion

The default AWS OpsWorks Stacks agent version. You have the following options:.

public virtual string AgentVersion { get; set; }
Property Value

System.String

Remarks

    The default setting is INHERIT . To specify an agent version, you must use the complete version number, not the abbreviated number shown on the console. For a list of available agent version numbers, call DescribeAgentVersions . AgentVersion cannot be set to Chef 12.2.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-agentversion

    AmiId

    A custom AMI ID to be used to create the instance.

    public virtual string AmiId { get; set; }
    Property Value

    System.String

    Remarks

    The AMI should be based on one of the supported operating systems. For more information, see Using Custom AMIs .

    If you specify a custom AMI, you must set Os to Custom .

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-amiid

    Architecture

    The instance architecture.

    public virtual string Architecture { get; set; }
    Property Value

    System.String

    Remarks

    The default option is x86_64 . Instance types do not necessarily support both architectures. For a list of the architectures that are supported by the different instance types, see Instance Families and Types .

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-architecture

    AttrAvailabilityZone

    The Availability Zone of the AWS OpsWorks instance, such as us-east-2a .

    public virtual string AttrAvailabilityZone { get; }
    Property Value

    System.String

    Remarks

    CloudformationAttribute: AvailabilityZone

    AttrPrivateDnsName

    The private DNS name of the AWS OpsWorks instance.

    public virtual string AttrPrivateDnsName { get; }
    Property Value

    System.String

    Remarks

    CloudformationAttribute: PrivateDnsName

    AttrPrivateIp

    The private IP address of the AWS OpsWorks instance, such as 192.0.2.0 .

    public virtual string AttrPrivateIp { get; }
    Property Value

    System.String

    Remarks

    CloudformationAttribute: PrivateIp

    AttrPublicDnsName

    The public DNS name of the AWS OpsWorks instance.

    public virtual string AttrPublicDnsName { get; }
    Property Value

    System.String

    Remarks

    CloudformationAttribute: PublicDnsName

    AttrPublicIp

    The public IP address of the AWS OpsWorks instance, such as 192.0.2.0 .

    public virtual string AttrPublicIp { get; }
    Property Value

    System.String

    Remarks

    Use this attribute only when the AWS OpsWorks instance is in an AWS OpsWorks layer that auto-assigns public IP addresses.

    CloudformationAttribute: PublicIp

    AutoScalingType

    For load-based or time-based instances, the type.

    public virtual string AutoScalingType { get; set; }
    Property Value

    System.String

    Remarks

    Windows stacks can use only time-based instances.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-autoscalingtype

    AvailabilityZone

    The Availability Zone of the AWS OpsWorks instance, such as us-east-2a .

    public virtual string AvailabilityZone { get; set; }
    Property Value

    System.String

    Remarks

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-availabilityzone

    BlockDeviceMappings

    An array of BlockDeviceMapping objects that specify the instance's block devices.

    public virtual object BlockDeviceMappings { get; set; }
    Property Value

    System.Object

    Remarks

    For more information, see Block Device Mapping . Note that block device mappings are not supported for custom AMIs.

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-blockdevicemappings

    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
    CfnResource.CfnProperties

    EbsOptimized

    Whether to create an Amazon EBS-optimized instance.

    public virtual object EbsOptimized { get; set; }
    Property Value

    System.Object

    Remarks

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-ebsoptimized

    ElasticIps

    A list of Elastic IP addresses to associate with the instance.

    public virtual string[] ElasticIps { get; set; }
    Property Value

    System.String[]

    Remarks

    Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-elasticips

    Hostname

    The instance host name. The following are character limits for instance host names.

    public virtual string Hostname { get; set; }
    Property Value

    System.String

    Remarks

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-hostname

      InstallUpdatesOnBoot

      Whether to install operating system and package updates when the instance boots.

      public virtual object InstallUpdatesOnBoot { get; set; }
      Property Value

      System.Object

      Remarks

      The default value is true . To control when updates are installed, set this value to false . You must then update your instances manually by using CreateDeployment to run the update_dependencies stack command or by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

      We strongly recommend using the default value of true to ensure that your instances have the latest security updates.

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-installupdatesonboot

      InstanceType

      The instance type, such as t2.micro . For a list of supported instance types, open the stack in the console, choose Instances , and choose + Instance . The Size list contains the currently supported types. For more information, see Instance Families and Types . The parameter values that you use to specify the various types are in the API Name column of the Available Instance Types table.

      public virtual string InstanceType { get; set; }
      Property Value

      System.String

      Remarks

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-instancetype

      LayerIds

      An array that contains the instance's layer IDs.

      public virtual string[] LayerIds { get; set; }
      Property Value

      System.String[]

      Remarks

      Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-layerids

      Os

      The instance's operating system, which must be set to one of the following.

      public virtual string Os { get; set; }
      Property Value

      System.String

      Remarks

        Not all operating systems are supported with all versions of Chef. For more information about the supported operating systems, see AWS OpsWorks Stacks Operating Systems .

        The default option is the current Amazon Linux version. If you set this parameter to Custom , you must use the CreateInstance action's AmiId parameter to specify the custom AMI that you want to use. Block device mappings are not supported if the value is Custom . For more information about how to use custom AMIs with AWS OpsWorks Stacks, see Using Custom AMIs .

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-os

        RootDeviceType

        The instance root device type.

        public virtual string RootDeviceType { get; set; }
        Property Value

        System.String

        Remarks

        For more information, see Storage for the Root Device .

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-rootdevicetype

        SshKeyName

        The instance's Amazon EC2 key-pair name.

        public virtual string SshKeyName { get; set; }
        Property Value

        System.String

        Remarks

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-sshkeyname

        StackId

        The stack ID.

        public virtual string StackId { get; set; }
        Property Value

        System.String

        Remarks

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-stackid

        SubnetId

        The ID of the instance's subnet.

        public virtual string SubnetId { get; set; }
        Property Value

        System.String

        Remarks

        If the stack is running in a VPC, you can use this parameter to override the stack's default subnet ID value and direct AWS OpsWorks Stacks to launch the instance in a different subnet.

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-subnetid

        Tenancy

        The instance's tenancy option.

        public virtual string Tenancy { get; set; }
        Property Value

        System.String

        Remarks

        The default option is no tenancy, or if the instance is running in a VPC, inherit tenancy settings from the VPC. The following are valid values for this parameter: dedicated , default , or host . Because there are costs associated with changes in tenancy options, we recommend that you research tenancy options before choosing them for your instances. For more information about dedicated hosts, see Dedicated Hosts Overview and Amazon EC2 Dedicated Hosts . For more information about dedicated instances, see Dedicated Instances and Amazon EC2 Dedicated Instances .

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-tenancy

        TimeBasedAutoScaling

        The time-based scaling configuration for the instance.

        public virtual object TimeBasedAutoScaling { get; set; }
        Property Value

        System.Object

        Remarks

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-timebasedautoscaling

        VirtualizationType

        The instance's virtualization type, paravirtual or hvm .

        public virtual string VirtualizationType { get; set; }
        Property Value

        System.String

        Remarks

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-virtualizationtype

        Volumes

        A list of AWS OpsWorks volume IDs to associate with the instance.

        public virtual string[] Volumes { get; set; }
        Property Value

        System.String[]

        Remarks

        For more information, see AWS::OpsWorks::Volume .

        Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html#cfn-opsworks-instance-volumes

        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>

        Overrides
        CfnResource.RenderProperties(IDictionary<String, Object>)

        Implements

        IConstruct
        Constructs.IConstruct
        IDependable
        IInspectable
        Back to top Generated by DocFX