@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.413Z") public class CfnHost extends CfnResource implements IInspectable
Allocates a fully dedicated physical server for launching EC2 instances. Because the host is fully dedicated for your use, it can help you address compliance requirements and reduce costs by allowing you to use your existing server-bound software licenses. For more information, see Dedicated Hosts in the Amazon EC2 User Guide for Linux Instances .
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.ec2.*; CfnHost cfnHost = CfnHost.Builder.create(this, "MyCfnHost") .availabilityZone("availabilityZone") // the properties below are optional .autoPlacement("autoPlacement") .hostRecovery("hostRecovery") .instanceFamily("instanceFamily") .instanceType("instanceType") .outpostArn("outpostArn") .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnHost.Builder
A fluent builder for
CfnHost . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnHost(Construct scope,
java.lang.String id,
CfnHostProps props)
Create a new `AWS::EC2::Host`.
|
protected |
CfnHost(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnHost(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrHostId()
The ID of the host.
|
java.lang.String |
getAutoPlacement()
Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.
|
java.lang.String |
getAvailabilityZone()
The Availability Zone in which to allocate the Dedicated Host.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getHostRecovery()
Indicates whether to enable or disable host recovery for the Dedicated Host.
|
java.lang.String |
getInstanceFamily()
The instance family supported by the Dedicated Host.
|
java.lang.String |
getInstanceType()
Specifies the instance type to be supported by the Dedicated Hosts.
|
java.lang.String |
getOutpostArn()
The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAutoPlacement(java.lang.String value)
Indicates whether the host accepts any untargeted instance launches that match its instance type configuration, or if it only accepts Host tenancy instance launches that specify its unique host ID.
|
void |
setAvailabilityZone(java.lang.String value)
The Availability Zone in which to allocate the Dedicated Host.
|
void |
setHostRecovery(java.lang.String value)
Indicates whether to enable or disable host recovery for the Dedicated Host.
|
void |
setInstanceFamily(java.lang.String value)
The instance family supported by the Dedicated Host.
|
void |
setInstanceType(java.lang.String value)
Specifies the instance type to be supported by the Dedicated Hosts.
|
void |
setOutpostArn(java.lang.String value)
The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnHost(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnHost(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnHost(Construct scope, java.lang.String id, CfnHostProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrHostId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getAvailabilityZone()
public void setAvailabilityZone(java.lang.String value)
public java.lang.String getAutoPlacement()
For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .
Default: on
public void setAutoPlacement(java.lang.String value)
For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .
Default: on
public java.lang.String getHostRecovery()
Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .
Default: off
public void setHostRecovery(java.lang.String value)
Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .
Default: off
public java.lang.String getInstanceFamily()
For example, m5
.
public void setInstanceFamily(java.lang.String value)
For example, m5
.
public java.lang.String getInstanceType()
If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
public void setInstanceType(java.lang.String value)
If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
public java.lang.String getOutpostArn()
public void setOutpostArn(java.lang.String value)