Interface ICfnInstanceProps
Properties for defining a CfnInstance
.
Namespace: Amazon.CDK.AWS.OpsWorks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnInstanceProps
Syntax (vb)
Public Interface ICfnInstanceProps
Remarks
See: 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;
var cfnInstanceProps = 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
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. |
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 |
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 |
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. |
Properties
AgentVersion
The default AWS OpsWorks Stacks agent version. You have the following options:.
virtual string AgentVersion { get; }
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.
AmiId
A custom AMI ID to be used to create the instance.
virtual string AmiId { get; }
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
.
Architecture
The instance architecture.
virtual string Architecture { get; }
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 .
AutoScalingType
For load-based or time-based instances, the type.
virtual string AutoScalingType { get; }
Property Value
System.String
Remarks
Windows stacks can use only time-based instances.
AvailabilityZone
The Availability Zone of the AWS OpsWorks instance, such as us-east-2a
.
virtual string AvailabilityZone { get; }
Property Value
System.String
Remarks
BlockDeviceMappings
An array of BlockDeviceMapping
objects that specify the instance's block devices.
virtual object BlockDeviceMappings { get; }
Property Value
System.Object
Remarks
For more information, see Block Device Mapping . Note that block device mappings are not supported for custom AMIs.
EbsOptimized
Whether to create an Amazon EBS-optimized instance.
virtual object EbsOptimized { get; }
Property Value
System.Object
Remarks
ElasticIps
A list of Elastic IP addresses to associate with the instance.
virtual string[] ElasticIps { get; }
Property Value
System.String[]
Remarks
Hostname
The instance host name. The following are character limits for instance host names.
virtual string Hostname { get; }
Property Value
System.String
Remarks
InstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots.
virtual object InstallUpdatesOnBoot { get; }
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.
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.
string InstanceType { get; }
Property Value
System.String
Remarks
LayerIds
An array that contains the instance's layer IDs.
string[] LayerIds { get; }
Property Value
System.String[]
Remarks
Os
The instance's operating system, which must be set to one of the following.
virtual string Os { get; }
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 .
RootDeviceType
The instance root device type.
virtual string RootDeviceType { get; }
Property Value
System.String
Remarks
SshKeyName
The instance's Amazon EC2 key-pair name.
virtual string SshKeyName { get; }
Property Value
System.String
Remarks
StackId
The stack ID.
string StackId { get; }
Property Value
System.String
Remarks
SubnetId
The ID of the instance's subnet.
virtual string SubnetId { get; }
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.
Tenancy
The instance's tenancy option.
virtual string Tenancy { get; }
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 .
TimeBasedAutoScaling
The time-based scaling configuration for the instance.
virtual object TimeBasedAutoScaling { get; }
Property Value
System.Object
Remarks
VirtualizationType
The instance's virtualization type, paravirtual
or hvm
.
virtual string VirtualizationType { get; }
Property Value
System.String
Remarks
Volumes
A list of AWS OpsWorks volume IDs to associate with the instance.
virtual string[] Volumes { get; }
Property Value
System.String[]