Class Host
- java.lang.Object
-
- software.amazon.awssdk.services.ec2.model.Host
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Host.Builder,Host>
@Generated("software.amazon.awssdk:codegen") public final class Host extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Host.Builder,Host>
Describes the properties of the Dedicated Host.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHost.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InstantallocationTime()The time that the Dedicated Host was allocated.AllowsMultipleInstanceTypesallowsMultipleInstanceTypes()Indicates whether the Dedicated Host supports multiple instance types of the same instance family.StringallowsMultipleInstanceTypesAsString()Indicates whether the Dedicated Host supports multiple instance types of the same instance family.StringassetId()The ID of the Outpost hardware asset on which the Dedicated Host is allocated.AutoPlacementautoPlacement()Whether auto-placement is on or off.StringautoPlacementAsString()Whether auto-placement is on or off.StringavailabilityZone()The Availability Zone of the Dedicated Host.StringavailabilityZoneId()The ID of the Availability Zone in which the Dedicated Host is allocated.AvailableCapacityavailableCapacity()Information about the instances running on the Dedicated Host.static Host.Builderbuilder()StringclientToken()Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasInstances()For responses, this returns true if the service returned a value for the Instances property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.StringhostId()The ID of the Dedicated Host.HostMaintenancehostMaintenance()Indicates whether host maintenance is enabled or disabled for the Dedicated Host.StringhostMaintenanceAsString()Indicates whether host maintenance is enabled or disabled for the Dedicated Host.HostPropertieshostProperties()The hardware specifications of the Dedicated Host.HostRecoveryhostRecovery()Indicates whether host recovery is enabled or disabled for the Dedicated Host.StringhostRecoveryAsString()Indicates whether host recovery is enabled or disabled for the Dedicated Host.StringhostReservationId()The reservation ID of the Dedicated Host.List<HostInstance>instances()The IDs and instance type that are currently running on the Dedicated Host.BooleanmemberOfServiceLinkedResourceGroup()Indicates whether the Dedicated Host is in a host resource group.StringoutpostArn()The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.StringownerId()The ID of the Amazon Web Services account that owns the Dedicated Host.InstantreleaseTime()The time that the Dedicated Host was released.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Host.Builder>serializableBuilderClass()AllocationStatestate()The Dedicated Host's state.StringstateAsString()The Dedicated Host's state.List<Tag>tags()Any tags assigned to the Dedicated Host.Host.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
autoPlacement
public final AutoPlacement autoPlacement()
Whether auto-placement is on or off.
If the service returns an enum value that is not available in the current SDK version,
autoPlacementwill returnAutoPlacement.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromautoPlacementAsString().- Returns:
- Whether auto-placement is on or off.
- See Also:
AutoPlacement
-
autoPlacementAsString
public final String autoPlacementAsString()
Whether auto-placement is on or off.
If the service returns an enum value that is not available in the current SDK version,
autoPlacementwill returnAutoPlacement.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromautoPlacementAsString().- Returns:
- Whether auto-placement is on or off.
- See Also:
AutoPlacement
-
availabilityZone
public final String availabilityZone()
The Availability Zone of the Dedicated Host.
- Returns:
- The Availability Zone of the Dedicated Host.
-
availableCapacity
public final AvailableCapacity availableCapacity()
Information about the instances running on the Dedicated Host.
- Returns:
- Information about the instances running on the Dedicated Host.
-
clientToken
public final String clientToken()
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
- Returns:
- Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring Idempotency.
-
hostId
public final String hostId()
The ID of the Dedicated Host.
- Returns:
- The ID of the Dedicated Host.
-
hostProperties
public final HostProperties hostProperties()
The hardware specifications of the Dedicated Host.
- Returns:
- The hardware specifications of the Dedicated Host.
-
hostReservationId
public final String hostReservationId()
The reservation ID of the Dedicated Host. This returns a
nullresponse if the Dedicated Host doesn't have an associated reservation.- Returns:
- The reservation ID of the Dedicated Host. This returns a
nullresponse if the Dedicated Host doesn't have an associated reservation.
-
hasInstances
public final boolean hasInstances()
For responses, this returns true if the service returned a value for the Instances property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
instances
public final List<HostInstance> instances()
The IDs and instance type that are currently running on the Dedicated Host.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInstances()method.- Returns:
- The IDs and instance type that are currently running on the Dedicated Host.
-
state
public final AllocationState state()
The Dedicated Host's state.
If the service returns an enum value that is not available in the current SDK version,
statewill returnAllocationState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The Dedicated Host's state.
- See Also:
AllocationState
-
stateAsString
public final String stateAsString()
The Dedicated Host's state.
If the service returns an enum value that is not available in the current SDK version,
statewill returnAllocationState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The Dedicated Host's state.
- See Also:
AllocationState
-
allocationTime
public final Instant allocationTime()
The time that the Dedicated Host was allocated.
- Returns:
- The time that the Dedicated Host was allocated.
-
releaseTime
public final Instant releaseTime()
The time that the Dedicated Host was released.
- Returns:
- The time that the Dedicated Host was released.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<Tag> tags()
Any tags assigned to the Dedicated Host.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- Any tags assigned to the Dedicated Host.
-
hostRecovery
public final HostRecovery hostRecovery()
Indicates whether host recovery is enabled or disabled for the Dedicated Host.
If the service returns an enum value that is not available in the current SDK version,
hostRecoverywill returnHostRecovery.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhostRecoveryAsString().- Returns:
- Indicates whether host recovery is enabled or disabled for the Dedicated Host.
- See Also:
HostRecovery
-
hostRecoveryAsString
public final String hostRecoveryAsString()
Indicates whether host recovery is enabled or disabled for the Dedicated Host.
If the service returns an enum value that is not available in the current SDK version,
hostRecoverywill returnHostRecovery.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhostRecoveryAsString().- Returns:
- Indicates whether host recovery is enabled or disabled for the Dedicated Host.
- See Also:
HostRecovery
-
allowsMultipleInstanceTypes
public final AllowsMultipleInstanceTypes allowsMultipleInstanceTypes()
Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is
on, the Dedicated Host supports multiple instance types in the instance family. If the value isoff, the Dedicated Host supports a single instance type only.If the service returns an enum value that is not available in the current SDK version,
allowsMultipleInstanceTypeswill returnAllowsMultipleInstanceTypes.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromallowsMultipleInstanceTypesAsString().- Returns:
- Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the
value is
on, the Dedicated Host supports multiple instance types in the instance family. If the value isoff, the Dedicated Host supports a single instance type only. - See Also:
AllowsMultipleInstanceTypes
-
allowsMultipleInstanceTypesAsString
public final String allowsMultipleInstanceTypesAsString()
Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the value is
on, the Dedicated Host supports multiple instance types in the instance family. If the value isoff, the Dedicated Host supports a single instance type only.If the service returns an enum value that is not available in the current SDK version,
allowsMultipleInstanceTypeswill returnAllowsMultipleInstanceTypes.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromallowsMultipleInstanceTypesAsString().- Returns:
- Indicates whether the Dedicated Host supports multiple instance types of the same instance family. If the
value is
on, the Dedicated Host supports multiple instance types in the instance family. If the value isoff, the Dedicated Host supports a single instance type only. - See Also:
AllowsMultipleInstanceTypes
-
ownerId
public final String ownerId()
The ID of the Amazon Web Services account that owns the Dedicated Host.
- Returns:
- The ID of the Amazon Web Services account that owns the Dedicated Host.
-
availabilityZoneId
public final String availabilityZoneId()
The ID of the Availability Zone in which the Dedicated Host is allocated.
- Returns:
- The ID of the Availability Zone in which the Dedicated Host is allocated.
-
memberOfServiceLinkedResourceGroup
public final Boolean memberOfServiceLinkedResourceGroup()
Indicates whether the Dedicated Host is in a host resource group. If memberOfServiceLinkedResourceGroup is
true, the host is in a host resource group; otherwise, it is not.- Returns:
- Indicates whether the Dedicated Host is in a host resource group. If
memberOfServiceLinkedResourceGroup is
true, the host is in a host resource group; otherwise, it is not.
-
outpostArn
public final String outpostArn()
The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.
- Returns:
- The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the Dedicated Host is allocated.
-
hostMaintenance
public final HostMaintenance hostMaintenance()
Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
If the service returns an enum value that is not available in the current SDK version,
hostMaintenancewill returnHostMaintenance.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhostMaintenanceAsString().- Returns:
- Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
- See Also:
HostMaintenance
-
hostMaintenanceAsString
public final String hostMaintenanceAsString()
Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
If the service returns an enum value that is not available in the current SDK version,
hostMaintenancewill returnHostMaintenance.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromhostMaintenanceAsString().- Returns:
- Indicates whether host maintenance is enabled or disabled for the Dedicated Host.
- See Also:
HostMaintenance
-
assetId
public final String assetId()
The ID of the Outpost hardware asset on which the Dedicated Host is allocated.
- Returns:
- The ID of the Outpost hardware asset on which the Dedicated Host is allocated.
-
toBuilder
public Host.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Host.Builder,Host>
-
builder
public static Host.Builder builder()
-
serializableBuilderClass
public static Class<? extends Host.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-