Class CfnInstance
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.opsworks.CfnInstance
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-24T10:56:35.484Z")
@Stability(Stable)
public class CfnInstance
extends CfnResource
implements IInspectable
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-instance.html.
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.*; CfnInstance cfnInstance = CfnInstance.Builder.create(this, "MyCfnInstance") .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();
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Example:static final class
A fluent builder forCfnInstance
.static interface
Example:static interface
Example:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnInstance
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnInstance
(software.amazon.jsii.JsiiObjectRef objRef) CfnInstance
(software.constructs.Construct scope, String id, CfnInstanceProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe default AWS OpsWorks Stacks agent version.getAmiId()
A custom AMI ID to be used to create the instance.The instance architecture.The Availability Zone of the AWS OpsWorks instance, such asus-east-2a
.The private DNS name of the AWS OpsWorks instance.The private IP address of the AWS OpsWorks instance, such as192.0.2.0
.The public DNS name of the AWS OpsWorks instance.The public IP address of the AWS OpsWorks instance, such as192.0.2.0
.For load-based or time-based instances, the type.The Availability Zone of the AWS OpsWorks instance, such asus-east-2a
.An array ofBlockDeviceMapping
objects that specify the instance's block devices.Whether to create an Amazon EBS-optimized instance.A list of Elastic IP addresses to associate with the instance.The instance host name.Whether to install operating system and package updates when the instance boots.The instance type, such ast2.micro
.An array that contains the instance's layer IDs.getOs()
The instance's operating system, which must be set to one of the following.The instance root device type.The instance's Amazon EC2 key-pair name.The stack ID.The ID of the instance's subnet.The instance's tenancy option.The time-based scaling configuration for the instance.The instance's virtualization type,paravirtual
orhvm
.A list of AWS OpsWorks volume IDs to associate with the instance.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAgentVersion
(String value) The default AWS OpsWorks Stacks agent version.void
A custom AMI ID to be used to create the instance.void
setArchitecture
(String value) The instance architecture.void
setAutoScalingType
(String value) For load-based or time-based instances, the type.void
setAvailabilityZone
(String value) The Availability Zone of the AWS OpsWorks instance, such asus-east-2a
.void
setBlockDeviceMappings
(List<Object> value) An array ofBlockDeviceMapping
objects that specify the instance's block devices.void
An array ofBlockDeviceMapping
objects that specify the instance's block devices.void
setEbsOptimized
(Boolean value) Whether to create an Amazon EBS-optimized instance.void
setEbsOptimized
(IResolvable value) Whether to create an Amazon EBS-optimized instance.void
setElasticIps
(List<String> value) A list of Elastic IP addresses to associate with the instance.void
setHostname
(String value) The instance host name.void
setInstallUpdatesOnBoot
(Boolean value) Whether to install operating system and package updates when the instance boots.void
Whether to install operating system and package updates when the instance boots.void
setInstanceType
(String value) The instance type, such ast2.micro
.void
setLayerIds
(List<String> value) An array that contains the instance's layer IDs.void
The instance's operating system, which must be set to one of the following.void
setRootDeviceType
(String value) The instance root device type.void
setSshKeyName
(String value) The instance's Amazon EC2 key-pair name.void
setStackId
(String value) The stack ID.void
setSubnetId
(String value) The ID of the instance's subnet.void
setTenancy
(String value) The instance's tenancy option.void
The time-based scaling configuration for the instance.void
The time-based scaling configuration for the instance.void
setVirtualizationType
(String value) The instance's virtualization type,paravirtual
orhvm
.void
setVolumes
(List<String> value) A list of AWS OpsWorks volume IDs to associate with the instance.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnInstance
protected CfnInstance(software.amazon.jsii.JsiiObjectRef objRef) -
CfnInstance
protected CfnInstance(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnInstance
@Stability(Stable) public CfnInstance(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnInstanceProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAvailabilityZone
The Availability Zone of the AWS OpsWorks instance, such asus-east-2a
. -
getAttrId
-
getAttrPrivateDnsName
The private DNS name of the AWS OpsWorks instance. -
getAttrPrivateIp
The private IP address of the AWS OpsWorks instance, such as192.0.2.0
. -
getAttrPublicDnsName
The public DNS name of the AWS OpsWorks instance. -
getAttrPublicIp
The public IP address of the AWS OpsWorks instance, such as192.0.2.0
.Use this attribute only when the AWS OpsWorks instance is in an AWS OpsWorks layer that auto-assigns public IP addresses.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getInstanceType
The instance type, such ast2.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. -
setInstanceType
The instance type, such ast2.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. -
getLayerIds
An array that contains the instance's layer IDs. -
setLayerIds
An array that contains the instance's layer IDs. -
getStackId
The stack ID. -
setStackId
The stack ID. -
getAgentVersion
The default AWS OpsWorks Stacks agent version.You have the following options:.
-
setAgentVersion
The default AWS OpsWorks Stacks agent version.You have the following options:.
-
getAmiId
A custom AMI ID to be used to create the instance. -
setAmiId
A custom AMI ID to be used to create the instance. -
getArchitecture
The instance architecture. -
setArchitecture
The instance architecture. -
getAutoScalingType
For load-based or time-based instances, the type. -
setAutoScalingType
For load-based or time-based instances, the type. -
getAvailabilityZone
The Availability Zone of the AWS OpsWorks instance, such asus-east-2a
. -
setAvailabilityZone
The Availability Zone of the AWS OpsWorks instance, such asus-east-2a
. -
getBlockDeviceMappings
An array ofBlockDeviceMapping
objects that specify the instance's block devices. -
setBlockDeviceMappings
An array ofBlockDeviceMapping
objects that specify the instance's block devices. -
setBlockDeviceMappings
An array ofBlockDeviceMapping
objects that specify the instance's block devices. -
getEbsOptimized
Whether to create an Amazon EBS-optimized instance. -
setEbsOptimized
Whether to create an Amazon EBS-optimized instance. -
setEbsOptimized
Whether to create an Amazon EBS-optimized instance. -
getElasticIps
A list of Elastic IP addresses to associate with the instance. -
setElasticIps
A list of Elastic IP addresses to associate with the instance. -
getHostname
The instance host name.The following are character limits for instance host names.
-
setHostname
The instance host name.The following are character limits for instance host names.
-
getInstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. -
setInstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. -
setInstallUpdatesOnBoot
Whether to install operating system and package updates when the instance boots. -
getOs
The instance's operating system, which must be set to one of the following. -
setOs
The instance's operating system, which must be set to one of the following. -
getRootDeviceType
The instance root device type. -
setRootDeviceType
The instance root device type. -
getSshKeyName
The instance's Amazon EC2 key-pair name. -
setSshKeyName
The instance's Amazon EC2 key-pair name. -
getSubnetId
The ID of the instance's subnet. -
setSubnetId
The ID of the instance's subnet. -
getTenancy
The instance's tenancy option. -
setTenancy
The instance's tenancy option. -
getTimeBasedAutoScaling
The time-based scaling configuration for the instance. -
setTimeBasedAutoScaling
The time-based scaling configuration for the instance. -
setTimeBasedAutoScaling
@Stability(Stable) public void setTimeBasedAutoScaling(@Nullable CfnInstance.TimeBasedAutoScalingProperty value) The time-based scaling configuration for the instance. -
getVirtualizationType
The instance's virtualization type,paravirtual
orhvm
. -
setVirtualizationType
The instance's virtualization type,paravirtual
orhvm
. -
getVolumes
A list of AWS OpsWorks volume IDs to associate with the instance. -
setVolumes
A list of AWS OpsWorks volume IDs to associate with the instance.
-