Class CfnHost

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:34:00.492Z") @Stability(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 .

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
         .assetId("assetId")
         .autoPlacement("autoPlacement")
         .hostMaintenance("hostMaintenance")
         .hostRecovery("hostRecovery")
         .instanceFamily("instanceFamily")
         .instanceType("instanceType")
         .outpostArn("outpostArn")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnHost

      protected CfnHost(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnHost

      protected CfnHost(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnHost

      @Stability(Stable) public CfnHost(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnHostProps 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

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrHostId

      @Stability(Stable) @NotNull public String getAttrHostId()
      The ID of the host.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAvailabilityZone

      @Stability(Stable) @NotNull public String getAvailabilityZone()
      The Availability Zone in which to allocate the Dedicated Host.
    • setAvailabilityZone

      @Stability(Stable) public void setAvailabilityZone(@NotNull String value)
      The Availability Zone in which to allocate the Dedicated Host.
    • getAssetId

      @Stability(Stable) @Nullable public String getAssetId()
      The ID of the Outpost hardware asset on which the Dedicated Host is allocated.
    • setAssetId

      @Stability(Stable) public void setAssetId(@Nullable String value)
      The ID of the Outpost hardware asset on which the Dedicated Host is allocated.
    • getAutoPlacement

      @Stability(Stable) @Nullable public 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.
    • setAutoPlacement

      @Stability(Stable) public void setAutoPlacement(@Nullable 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.
    • getHostMaintenance

      @Stability(Stable) @Nullable public String getHostMaintenance()
      Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
    • setHostMaintenance

      @Stability(Stable) public void setHostMaintenance(@Nullable String value)
      Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
    • getHostRecovery

      @Stability(Stable) @Nullable public String getHostRecovery()
      Indicates whether to enable or disable host recovery for the Dedicated Host.
    • setHostRecovery

      @Stability(Stable) public void setHostRecovery(@Nullable String value)
      Indicates whether to enable or disable host recovery for the Dedicated Host.
    • getInstanceFamily

      @Stability(Stable) @Nullable public String getInstanceFamily()
      The instance family supported by the Dedicated Host.
    • setInstanceFamily

      @Stability(Stable) public void setInstanceFamily(@Nullable String value)
      The instance family supported by the Dedicated Host.
    • getInstanceType

      @Stability(Stable) @Nullable public String getInstanceType()
      Specifies the instance type to be supported by the Dedicated Hosts.
    • setInstanceType

      @Stability(Stable) public void setInstanceType(@Nullable String value)
      Specifies the instance type to be supported by the Dedicated Hosts.
    • getOutpostArn

      @Stability(Stable) @Nullable public String getOutpostArn()
      The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.
    • setOutpostArn

      @Stability(Stable) public void setOutpostArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the AWS Outpost on which the Dedicated Host is allocated.