@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.132Z") @Stability(value=Stable) public interface CfnInstanceProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.opsworks.*;
CfnInstanceProps cfnInstanceProps = CfnInstanceProps.builder()
.instanceType("instanceType")
.layerIds(List.of("layerIds"))
.stackId("stackId")
// the properties below are optional
.agentVersion("agentVersion")
.amiId("amiId")
.architecture("architecture")
.autoScalingType("autoScalingType")
.availabilityZone("availabilityZone")
.blockDeviceMappings(List.of(BlockDeviceMappingProperty.builder()
.deviceName("deviceName")
.ebs(EbsBlockDeviceProperty.builder()
.deleteOnTermination(false)
.iops(123)
.snapshotId("snapshotId")
.volumeSize(123)
.volumeType("volumeType")
.build())
.noDevice("noDevice")
.virtualName("virtualName")
.build()))
.ebsOptimized(false)
.elasticIps(List.of("elasticIps"))
.hostname("hostname")
.installUpdatesOnBoot(false)
.os("os")
.rootDeviceType("rootDeviceType")
.sshKeyName("sshKeyName")
.subnetId("subnetId")
.tenancy("tenancy")
.timeBasedAutoScaling(TimeBasedAutoScalingProperty.builder()
.friday(Map.of(
"fridayKey", "friday"))
.monday(Map.of(
"mondayKey", "monday"))
.saturday(Map.of(
"saturdayKey", "saturday"))
.sunday(Map.of(
"sundayKey", "sunday"))
.thursday(Map.of(
"thursdayKey", "thursday"))
.tuesday(Map.of(
"tuesdayKey", "tuesday"))
.wednesday(Map.of(
"wednesdayKey", "wednesday"))
.build())
.virtualizationType("virtualizationType")
.volumes(List.of("volumes"))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnInstanceProps.Builder
A builder for
CfnInstanceProps |
static class |
CfnInstanceProps.Jsii$Proxy
An implementation for
CfnInstanceProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnInstanceProps.Builder |
builder() |
default String |
getAgentVersion()
The default AWS OpsWorks Stacks agent version.
|
default String |
getAmiId()
A custom AMI ID to be used to create the instance.
|
default String |
getArchitecture()
The instance architecture.
|
default String |
getAutoScalingType()
For load-based or time-based instances, the type.
|
default String |
getAvailabilityZone()
The Availability Zone of the AWS OpsWorks instance, such as `us-east-2a` .
|
default Object |
getBlockDeviceMappings()
An array of `BlockDeviceMapping` objects that specify the instance's block devices.
|
default Object |
getEbsOptimized()
Whether to create an Amazon EBS-optimized instance.
|
default List<String> |
getElasticIps()
A list of Elastic IP addresses to associate with the instance.
|
default String |
getHostname()
The instance host name.
|
default Object |
getInstallUpdatesOnBoot()
Whether to install operating system and package updates when the instance boots.
|
String |
getInstanceType()
The instance type, such as `t2.micro` .
|
List<String> |
getLayerIds()
An array that contains the instance's layer IDs.
|
default String |
getOs()
The instance's operating system, which must be set to one of the following.
|
default String |
getRootDeviceType()
The instance root device type.
|
default String |
getSshKeyName()
The instance's Amazon EC2 key-pair name.
|
String |
getStackId()
The stack ID.
|
default String |
getSubnetId()
The ID of the instance's subnet.
|
default String |
getTenancy()
The instance's tenancy option.
|
default Object |
getTimeBasedAutoScaling()
The time-based scaling configuration for the instance.
|
default String |
getVirtualizationType()
The instance's virtualization type, `paravirtual` or `hvm` .
|
default List<String> |
getVolumes()
A list of AWS OpsWorks volume IDs to associate with the instance.
|
@Stability(value=Stable) @NotNull String getInstanceType()
@Stability(value=Stable) @NotNull List<String> getLayerIds()
@Stability(value=Stable) @NotNull String getStackId()
@Stability(value=Stable) @Nullable default String getAgentVersion()
INHERIT - Use the stack's default agent version setting.
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.
@Stability(value=Stable) @Nullable default String getAmiId()
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
OstoCustom.
@Stability(value=Stable) @Nullable default String getArchitecture()
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 .
@Stability(value=Stable) @Nullable default String getAutoScalingType()
Windows stacks can use only time-based instances.
@Stability(value=Stable) @Nullable default String getAvailabilityZone()
@Stability(value=Stable) @Nullable default Object getBlockDeviceMappings()
For more information, see Block Device Mapping . Note that block device mappings are not supported for custom AMIs.
@Stability(value=Stable) @Nullable default Object getEbsOptimized()
@Stability(value=Stable) @Nullable default List<String> getElasticIps()
@Stability(value=Stable) @Nullable default String getHostname()
@Stability(value=Stable) @Nullable default Object getInstallUpdatesOnBoot()
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
trueto ensure that your instances have the latest security updates.
@Stability(value=Stable) @Nullable default String getOs()
Amazon Linux 2 , Amazon Linux 2018.03 , Amazon Linux 2017.09 , Amazon Linux 2017.03 , Amazon Linux 2016.09 , Amazon Linux 2016.03 , Amazon Linux 2015.09 , or Amazon Linux 2015.03 .Ubuntu 18.04 LTS , Ubuntu 16.04 LTS , Ubuntu 14.04 LTS , or Ubuntu 12.04 LTS .CentOS Linux 7Red Hat Enterprise Linux 7Microsoft Windows Server 2012 R2 Base , Microsoft Windows Server 2012 R2 with SQL Server Express , Microsoft Windows Server 2012 R2 with SQL Server Standard , or Microsoft Windows Server 2012 R2 with SQL Server Web .Custom .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 .
@Stability(value=Stable) @Nullable default String getRootDeviceType()
For more information, see Storage for the Root Device .
@Stability(value=Stable) @Nullable default String getSshKeyName()
@Stability(value=Stable) @Nullable default String getSubnetId()
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.
@Stability(value=Stable) @Nullable default String getTenancy()
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 .
@Stability(value=Stable) @Nullable default Object getTimeBasedAutoScaling()
@Stability(value=Stable) @Nullable default String getVirtualizationType()
@Stability(value=Stable) @Nullable default List<String> getVolumes()
For more information, see AWS::OpsWorks::Volume .
@Stability(value=Stable) static CfnInstanceProps.Builder builder()
CfnInstanceProps.Builder of CfnInstancePropsCopyright © 2022. All rights reserved.