Class InstanceLaunchTemplate

java.lang.Object
software.amazon.awssdk.services.batch.model.InstanceLaunchTemplate
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<InstanceLaunchTemplate.Builder,InstanceLaunchTemplate>

@Generated("software.amazon.awssdk:codegen") public final class InstanceLaunchTemplate extends Object implements SdkPojo, Serializable, ToCopyableBuilder<InstanceLaunchTemplate.Builder,InstanceLaunchTemplate>

The instance launch configuration for an Amazon ECS Managed Instances capacity provider. Specifies the instance profile, networking, instance selection constraints, capacity pricing model, storage, and monitoring settings.

See Also:
  • Method Details

    • ec2InstanceProfileArn

      public final String ec2InstanceProfileArn()

      The Amazon Resource Name (ARN) of the Amazon EC2 instance profile for the managed instances. The instance profile must use the AmazonECSInstanceRolePolicyForManagedInstances managed policy with a trust policy for ec2.amazonaws.com.

      Returns:
      The Amazon Resource Name (ARN) of the Amazon EC2 instance profile for the managed instances. The instance profile must use the AmazonECSInstanceRolePolicyForManagedInstances managed policy with a trust policy for ec2.amazonaws.com.
    • networkConfiguration

      public final ManagedInstancesNetworkConfiguration networkConfiguration()

      The network configuration for the managed instances. Specifies the VPC subnets and security groups where instances are launched.

      Returns:
      The network configuration for the managed instances. Specifies the VPC subnets and security groups where instances are launched.
    • instanceRequirements

      public final InstanceRequirementsRequest instanceRequirements()

      The instance type requirements for the capacity provider. Use this to constrain which Amazon EC2 instance types Amazon ECS can launch. If not specified, all available instance types are eligible.

      Returns:
      The instance type requirements for the capacity provider. Use this to constrain which Amazon EC2 instance types Amazon ECS can launch. If not specified, all available instance types are eligible.
    • capacityOptionType

      public final String capacityOptionType()

      The capacity pricing model for the managed instances. Valid values:

      • ON_DEMAND (default) — On-Demand pricing.

      • SPOT — Spot Instances, which can provide significant cost savings for fault-tolerant workloads.

      Returns:
      The capacity pricing model for the managed instances. Valid values:

      • ON_DEMAND (default) — On-Demand pricing.

      • SPOT — Spot Instances, which can provide significant cost savings for fault-tolerant workloads.

    • storageConfiguration

      public final ManagedInstancesStorageConfiguration storageConfiguration()

      The storage configuration for the managed instances. Configures the root EBS volume size. If not specified, the service uses the default EBS volume size for the instance type.

      Returns:
      The storage configuration for the managed instances. Configures the root EBS volume size. If not specified, the service uses the default EBS volume size for the instance type.
    • monitoring

      public final String monitoring()

      The level of CloudWatch monitoring for the managed instances. Valid values are BASIC and DETAILED.

      Returns:
      The level of CloudWatch monitoring for the managed instances. Valid values are BASIC and DETAILED.
    • fipsEnabled

      public final Boolean fipsEnabled()

      Specifies whether FIPS 140-2 validated cryptographic modules are enabled on the managed instances. Not available in all Regions.

      Returns:
      Specifies whether FIPS 140-2 validated cryptographic modules are enabled on the managed instances. Not available in all Regions.
    • capacityReservations

      public final CapacityReservationRequest capacityReservations()

      The capacity reservation configuration for the managed instances. Use this to target On-Demand Capacity Reservations or Reserved Instances for predictable capacity and cost optimization.

      Returns:
      The capacity reservation configuration for the managed instances. Use this to target On-Demand Capacity Reservations or Reserved Instances for predictable capacity and cost optimization.
    • instanceMetadataTagsPropagation

      public final Boolean instanceMetadataTagsPropagation()

      Specifies whether instance tags are accessible from the instance metadata service (IMDS). If not specified, instance tags are not accessible from IMDS.

      Returns:
      Specifies whether instance tags are accessible from the instance metadata service (IMDS). If not specified, instance tags are not accessible from IMDS.
    • localStorageConfiguration

      public final ManagedInstancesLocalStorageConfiguration localStorageConfiguration()

      The local storage configuration for the managed instances. If not specified, instance store volumes are not available to containers.

      Returns:
      The local storage configuration for the managed instances. If not specified, instance store volumes are not available to containers.
    • toBuilder

      public InstanceLaunchTemplate.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<InstanceLaunchTemplate.Builder,InstanceLaunchTemplate>
      Returns:
      a builder for type T
    • builder

      public static InstanceLaunchTemplate.Builder builder()
    • serializableBuilderClass

      public static Class<? extends InstanceLaunchTemplate.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.