public static final class CfnInstance.Builder
extends java.lang.Object
CfnInstance
.Modifier and Type | Method and Description |
---|---|
CfnInstance.Builder |
agentVersion(java.lang.String agentVersion)
The default AWS OpsWorks Stacks agent version.
|
CfnInstance.Builder |
amiId(java.lang.String amiId)
A custom AMI ID to be used to create the instance.
|
CfnInstance.Builder |
architecture(java.lang.String architecture)
The instance architecture.
|
CfnInstance.Builder |
autoScalingType(java.lang.String autoScalingType)
For load-based or time-based instances, the type.
|
CfnInstance.Builder |
availabilityZone(java.lang.String availabilityZone)
The Availability Zone of the AWS OpsWorks instance, such as `us-east-2a` .
|
CfnInstance.Builder |
blockDeviceMappings(IResolvable blockDeviceMappings)
An array of `BlockDeviceMapping` objects that specify the instance's block devices.
|
CfnInstance.Builder |
blockDeviceMappings(java.util.List<? extends java.lang.Object> blockDeviceMappings)
An array of `BlockDeviceMapping` objects that specify the instance's block devices.
|
CfnInstance |
build() |
static CfnInstance.Builder |
create(Construct scope,
java.lang.String id) |
CfnInstance.Builder |
ebsOptimized(java.lang.Boolean ebsOptimized)
Whether to create an Amazon EBS-optimized instance.
|
CfnInstance.Builder |
ebsOptimized(IResolvable ebsOptimized)
Whether to create an Amazon EBS-optimized instance.
|
CfnInstance.Builder |
elasticIps(java.util.List<java.lang.String> elasticIps)
A list of Elastic IP addresses to associate with the instance.
|
CfnInstance.Builder |
hostname(java.lang.String hostname)
The instance host name.
|
CfnInstance.Builder |
installUpdatesOnBoot(java.lang.Boolean installUpdatesOnBoot)
Whether to install operating system and package updates when the instance boots.
|
CfnInstance.Builder |
installUpdatesOnBoot(IResolvable installUpdatesOnBoot)
Whether to install operating system and package updates when the instance boots.
|
CfnInstance.Builder |
instanceType(java.lang.String instanceType)
The instance type, such as `t2.micro` .
|
CfnInstance.Builder |
layerIds(java.util.List<java.lang.String> layerIds)
An array that contains the instance's layer IDs.
|
CfnInstance.Builder |
os(java.lang.String os)
The instance's operating system, which must be set to one of the following.
|
CfnInstance.Builder |
rootDeviceType(java.lang.String rootDeviceType)
The instance root device type.
|
CfnInstance.Builder |
sshKeyName(java.lang.String sshKeyName)
The instance's Amazon EC2 key-pair name.
|
CfnInstance.Builder |
stackId(java.lang.String stackId)
The stack ID.
|
CfnInstance.Builder |
subnetId(java.lang.String subnetId)
The ID of the instance's subnet.
|
CfnInstance.Builder |
tenancy(java.lang.String tenancy)
The instance's tenancy option.
|
CfnInstance.Builder |
timeBasedAutoScaling(CfnInstance.TimeBasedAutoScalingProperty timeBasedAutoScaling)
The time-based scaling configuration for the instance.
|
CfnInstance.Builder |
timeBasedAutoScaling(IResolvable timeBasedAutoScaling)
The time-based scaling configuration for the instance.
|
CfnInstance.Builder |
virtualizationType(java.lang.String virtualizationType)
The instance's virtualization type, `paravirtual` or `hvm` .
|
CfnInstance.Builder |
volumes(java.util.List<java.lang.String> volumes)
A list of AWS OpsWorks volume IDs to associate with the instance.
|
public static CfnInstance.Builder create(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.CfnInstance.BlockDeviceMappingProperty.Builder
.public CfnInstance.Builder instanceType(java.lang.String instanceType)
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](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) . The parameter values that you use to specify the various types are in the *API Name* column of the *Available Instance Types* table. This parameter is required.this
public CfnInstance.Builder layerIds(java.util.List<java.lang.String> layerIds)
layerIds
- An array that contains the instance's layer IDs. This parameter is required.this
public CfnInstance.Builder stackId(java.lang.String stackId)
stackId
- The stack ID. This parameter is required.this
public CfnInstance.Builder agentVersion(java.lang.String agentVersion)
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.
agentVersion
- The default AWS OpsWorks Stacks agent version. You have the following options:. This parameter is required.this
public CfnInstance.Builder amiId(java.lang.String amiId)
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
toCustom
.
amiId
- A custom AMI ID to be used to create the instance. This parameter is required.this
public CfnInstance.Builder architecture(java.lang.String architecture)
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 .
architecture
- The instance architecture. This parameter is required.this
public CfnInstance.Builder autoScalingType(java.lang.String autoScalingType)
Windows stacks can use only time-based instances.
autoScalingType
- For load-based or time-based instances, the type. This parameter is required.this
public CfnInstance.Builder availabilityZone(java.lang.String availabilityZone)
availabilityZone
- The Availability Zone of the AWS OpsWorks instance, such as `us-east-2a` . This parameter is required.this
public CfnInstance.Builder blockDeviceMappings(IResolvable blockDeviceMappings)
For more information, see Block Device Mapping . Note that block device mappings are not supported for custom AMIs.
blockDeviceMappings
- An array of `BlockDeviceMapping` objects that specify the instance's block devices. This parameter is required.this
public CfnInstance.Builder blockDeviceMappings(java.util.List<? extends java.lang.Object> blockDeviceMappings)
For more information, see Block Device Mapping . Note that block device mappings are not supported for custom AMIs.
blockDeviceMappings
- An array of `BlockDeviceMapping` objects that specify the instance's block devices. This parameter is required.this
public CfnInstance.Builder ebsOptimized(java.lang.Boolean ebsOptimized)
ebsOptimized
- Whether to create an Amazon EBS-optimized instance. This parameter is required.this
public CfnInstance.Builder ebsOptimized(IResolvable ebsOptimized)
ebsOptimized
- Whether to create an Amazon EBS-optimized instance. This parameter is required.this
public CfnInstance.Builder elasticIps(java.util.List<java.lang.String> elasticIps)
elasticIps
- A list of Elastic IP addresses to associate with the instance. This parameter is required.this
public CfnInstance.Builder hostname(java.lang.String hostname)
hostname
- The instance host name. The following are character limits for instance host names. This parameter is required.this
public CfnInstance.Builder installUpdatesOnBoot(java.lang.Boolean installUpdatesOnBoot)
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.
installUpdatesOnBoot
- Whether to install operating system and package updates when the instance boots. This parameter is required.this
public CfnInstance.Builder installUpdatesOnBoot(IResolvable installUpdatesOnBoot)
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.
installUpdatesOnBoot
- Whether to install operating system and package updates when the instance boots. This parameter is required.this
public CfnInstance.Builder os(java.lang.String os)
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 7
Red Hat Enterprise Linux 7
Microsoft 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 .
os
- The instance's operating system, which must be set to one of the following. This parameter is required.this
public CfnInstance.Builder rootDeviceType(java.lang.String rootDeviceType)
For more information, see Storage for the Root Device .
rootDeviceType
- The instance root device type. This parameter is required.this
public CfnInstance.Builder sshKeyName(java.lang.String sshKeyName)
sshKeyName
- The instance's Amazon EC2 key-pair name. This parameter is required.this
public CfnInstance.Builder subnetId(java.lang.String subnetId)
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.
subnetId
- The ID of the instance's subnet. This parameter is required.this
public CfnInstance.Builder tenancy(java.lang.String tenancy)
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 .
tenancy
- The instance's tenancy option. This parameter is required.this
public CfnInstance.Builder timeBasedAutoScaling(IResolvable timeBasedAutoScaling)
timeBasedAutoScaling
- The time-based scaling configuration for the instance. This parameter is required.this
public CfnInstance.Builder timeBasedAutoScaling(CfnInstance.TimeBasedAutoScalingProperty timeBasedAutoScaling)
timeBasedAutoScaling
- The time-based scaling configuration for the instance. This parameter is required.this
public CfnInstance.Builder virtualizationType(java.lang.String virtualizationType)
virtualizationType
- The instance's virtualization type, `paravirtual` or `hvm` . This parameter is required.this
public CfnInstance.Builder volumes(java.util.List<java.lang.String> volumes)
For more information, see AWS::OpsWorks::Volume
.
volumes
- A list of AWS OpsWorks volume IDs to associate with the instance. This parameter is required.this
public CfnInstance build()