@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.172Z") @Stability(value=Stable) 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. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnHost(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrHostId()
The ID of the host.
|
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.
|
String |
getAvailabilityZone()
The Availability Zone in which to allocate the Dedicated Host.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getHostRecovery()
Indicates whether to enable or disable host recovery for the Dedicated Host.
|
String |
getInstanceFamily()
`AWS::EC2::Host.InstanceFamily`.
|
String |
getInstanceType()
Specifies the instance type to be supported by the Dedicated Hosts.
|
String |
getOutpostArn()
`AWS::EC2::Host.OutpostArn`.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAutoPlacement(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(String value)
The Availability Zone in which to allocate the Dedicated Host.
|
void |
setHostRecovery(String value)
Indicates whether to enable or disable host recovery for the Dedicated Host.
|
void |
setInstanceFamily(String value)
`AWS::EC2::Host.InstanceFamily`.
|
void |
setInstanceType(String value)
Specifies the instance type to be supported by the Dedicated Hosts.
|
void |
setOutpostArn(String value)
`AWS::EC2::Host.OutpostArn`.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnHost(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnHost(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnHost(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrHostId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public String getAvailabilityZone()
@Stability(value=Stable)
public void setAvailabilityZone(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getAutoPlacement()
For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .
Default: on
@Stability(value=Stable)
public void setAutoPlacement(@Nullable
String value)
For more information, see Understanding auto-placement and affinity in the Amazon EC2 User Guide .
Default: on
@Stability(value=Stable) @Nullable public String getHostRecovery()
Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .
Default: off
@Stability(value=Stable)
public void setHostRecovery(@Nullable
String value)
Host recovery is disabled by default. For more information, see Host recovery in the Amazon EC2 User Guide .
Default: off
@Stability(value=Stable) @Nullable public String getInstanceFamily()
@Stability(value=Stable)
public void setInstanceFamily(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getInstanceType()
If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
@Stability(value=Stable)
public void setInstanceType(@Nullable
String value)
If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only.
@Stability(value=Stable) @Nullable public String getOutpostArn()
@Stability(value=Stable)
public void setOutpostArn(@Nullable
String value)
Copyright © 2022. All rights reserved.