Class CfnInstance
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnInstance : CfnResource, IInspectable
Syntax (vb)
Public Class CfnInstance
Inherits CfnResource
Implements IInspectable
Remarks
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html
CloudformationResource: AWS::OpsWorks::Instance
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 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(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 |
CfnInstance(Construct, String, ICfnInstanceProps) |
Properties
AgentVersion | The default AWS OpsWorks Stacks agent version. |
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 |
AttrId | |
AttrPrivateDnsName | The private DNS name of the AWS OpsWorks instance. |
AttrPrivateIp | The private IP address of the AWS OpsWorks instance, such as |
AttrPublicDnsName | The public DNS name of the AWS OpsWorks instance. |
AttrPublicIp | The public IP address of the AWS OpsWorks instance, such as |
AutoScalingType | For load-based or time-based instances, the type. |
AvailabilityZone | The Availability Zone of the AWS OpsWorks instance, such as |
BlockDeviceMappings | An array of |
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. |
InstallUpdatesOnBoot | Whether to install operating system and package updates when the instance boots. |
InstanceType | The instance type, such as |
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, |
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(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
CfnInstance(Construct, String, ICfnInstanceProps)
public CfnInstance(Construct scope, string id, ICfnInstanceProps 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 ICfnInstanceProps
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:.
AmiId
A custom AMI ID to be used to create the instance.
public virtual string AmiId { get; set; }
Property Value
System.String
Architecture
The instance architecture.
public virtual string Architecture { get; set; }
Property Value
System.String
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
AttrId
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
AvailabilityZone
The Availability Zone of the AWS OpsWorks instance, such as us-east-2a
.
public virtual string AvailabilityZone { get; set; }
Property Value
System.String
BlockDeviceMappings
An array of BlockDeviceMapping
objects that specify the instance's block devices.
public virtual object BlockDeviceMappings { get; set; }
Property Value
System.Object
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
EbsOptimized
Whether to create an Amazon EBS-optimized instance.
public virtual object EbsOptimized { get; set; }
Property Value
System.Object
ElasticIps
A list of Elastic IP addresses to associate with the instance.
public virtual string[] ElasticIps { get; set; }
Property Value
System.String[]
Hostname
The instance host name.
public virtual string Hostname { get; set; }
Property Value
System.String
Remarks
The following are character limits for instance host names.
InstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots.
public virtual object InstallUpdatesOnBoot { get; set; }
Property Value
System.Object
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
LayerIds
An array that contains the instance's layer IDs.
public virtual string[] LayerIds { get; set; }
Property Value
System.String[]
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
RootDeviceType
The instance root device type.
public virtual string RootDeviceType { get; set; }
Property Value
System.String
SshKeyName
The instance's Amazon EC2 key-pair name.
public virtual string SshKeyName { get; set; }
Property Value
System.String
StackId
The stack ID.
public virtual string StackId { get; set; }
Property Value
System.String
SubnetId
The ID of the instance's subnet.
public virtual string SubnetId { get; set; }
Property Value
System.String
Tenancy
The instance's tenancy option.
public virtual string Tenancy { get; set; }
Property Value
System.String
TimeBasedAutoScaling
The time-based scaling configuration for the instance.
public virtual object TimeBasedAutoScaling { get; set; }
Property Value
System.Object
VirtualizationType
The instance's virtualization type, paravirtual
or hvm
.
public virtual string VirtualizationType { get; set; }
Property Value
System.String
Volumes
A list of AWS OpsWorks volume IDs to associate with the instance.
public virtual string[] Volumes { 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>