Class DedicatedHost


  • public class DedicatedHost
    extends com.pulumi.resources.CustomResource
    Provides an EC2 Host resource. This allows Dedicated Hosts to be allocated, modified, and released. ## Example Usage <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.DedicatedHost;
     import com.pulumi.aws.ec2.DedicatedHostArgs;
     import java.util.List;
     import java.util.ArrayList;
     import java.util.Map;
     import java.io.File;
     import java.nio.file.Files;
     import java.nio.file.Paths;
     
     public class App {
         public static void main(String[] args) {
             Pulumi.run(App::stack);
         }
     
         public static void stack(Context ctx) {
             // Create a new host with instance type of c5.18xlarge with Auto Placement
             // and Host Recovery enabled.
             var test = new DedicatedHost("test", DedicatedHostArgs.builder()
                 .instanceType("c5.18xlarge")
                 .availabilityZone("us-west-2a")
                 .hostRecovery("on")
                 .autoPlacement("on")
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import hosts using the host `id`. For example: ```sh $ pulumi import aws:ec2/dedicatedHost:DedicatedHost example h-0385a99d0e4b20cbb ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.lang.String> assetId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> autoPlacement()  
      com.pulumi.core.Output<java.lang.String> availabilityZone()  
      static DedicatedHost get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, DedicatedHostState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> hostRecovery()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceFamily()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceType()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> outpostArn()  
      com.pulumi.core.Output<java.lang.String> ownerId()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DedicatedHost

        public DedicatedHost​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • DedicatedHost

        public DedicatedHost​(java.lang.String name,
                             DedicatedHostArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • DedicatedHost

        public DedicatedHost​(java.lang.String name,
                             DedicatedHostArgs args,
                             @Nullable
                             com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        The ARN of the Dedicated Host.
      • assetId

        public com.pulumi.core.Output<java.lang.String> assetId()
        Returns:
        The ID of the Outpost hardware asset on which to allocate the Dedicated Hosts. This parameter is supported only if you specify OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this parameter.
      • autoPlacement

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> autoPlacement()
        Returns:
        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. Valid values: `on`, `off`. Default: `on`.
      • availabilityZone

        public com.pulumi.core.Output<java.lang.String> availabilityZone()
        Returns:
        The Availability Zone in which to allocate the Dedicated Host.
      • hostRecovery

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> hostRecovery()
        Returns:
        Indicates whether to enable or disable host recovery for the Dedicated Host. Valid values: `on`, `off`. Default: `off`.
      • instanceFamily

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceFamily()
        Returns:
        Specifies the instance family to be supported by the Dedicated Hosts. If you specify an instance family, the Dedicated Hosts support multiple instance types within that instance family. Exactly one of `instance_family` or `instance_type` must be specified.
      • instanceType

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> instanceType()
        Returns:
        Specifies the instance type to be supported by the Dedicated Hosts. If you specify an instance type, the Dedicated Hosts support instances of the specified instance type only. Exactly one of `instance_family` or `instance_type` must be specified.
      • outpostArn

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> outpostArn()
        Returns:
        The Amazon Resource Name (ARN) of the AWS Outpost on which to allocate the Dedicated Host.
      • ownerId

        public com.pulumi.core.Output<java.lang.String> ownerId()
        Returns:
        The ID of the AWS account that owns the Dedicated Host.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Map of tags to assign to this resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
      • get

        public static DedicatedHost get​(java.lang.String name,
                                        com.pulumi.core.Output<java.lang.String> id,
                                        @Nullable
                                        DedicatedHostState state,
                                        @Nullable
                                        com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.