Class InstanceLaunchTemplate

    • Method Detail

      • ec2InstanceProfileArn

        public final String ec2InstanceProfileArn()

        The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access Amazon Web Services services and resources.

        For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide.

        Returns:
        The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access Amazon Web Services services and resources.

        For more information, see Amazon ECS instance profile for Managed Instances in the Amazon ECS Developer Guide.

      • networkConfiguration

        public final ManagedInstancesNetworkConfiguration networkConfiguration()

        The network configuration for Amazon ECS Managed Instances. This specifies the subnets and security groups that instances use for network connectivity.

        Returns:
        The network configuration for Amazon ECS Managed Instances. This specifies the subnets and security groups that instances use for network connectivity.
      • storageConfiguration

        public final ManagedInstancesStorageConfiguration storageConfiguration()

        The storage configuration for Amazon ECS Managed Instances. This defines the root volume size and type for the instances.

        Returns:
        The storage configuration for Amazon ECS Managed Instances. This defines the root volume size and type for the instances.
      • monitoring

        public final ManagedInstancesMonitoringOptions monitoring()

        CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.

        If the service returns an enum value that is not available in the current SDK version, monitoring will return ManagedInstancesMonitoringOptions.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from monitoringAsString().

        Returns:
        CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.
        See Also:
        ManagedInstancesMonitoringOptions
      • monitoringAsString

        public final String monitoringAsString()

        CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.

        If the service returns an enum value that is not available in the current SDK version, monitoring will return ManagedInstancesMonitoringOptions.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from monitoringAsString().

        Returns:
        CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see Detailed monitoring for Amazon ECS Managed Instances in the Amazon ECS Developer Guide.
        See Also:
        ManagedInstancesMonitoringOptions
      • capacityOptionType

        public final CapacityOptionType capacityOptionType()

        The capacity option type. This determines whether Amazon ECS launches On-Demand, Spot or Capacity Reservation Instances for your managed instance capacity provider.

        Valid values are:

        • ON_DEMAND - Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.

        • SPOT - Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.

        • RESERVED - Launches Instances using Amazon EC2 Capacity Reservations. Capacity Reservations allow you to reserve compute capacity for Amazon EC2 instances in a specific Availability Zone.

        The default is On-Demand

        For more information about Amazon EC2 capacity options, see Instance purchasing options in the Amazon EC2 User Guide.

        If the service returns an enum value that is not available in the current SDK version, capacityOptionType will return CapacityOptionType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from capacityOptionTypeAsString().

        Returns:
        The capacity option type. This determines whether Amazon ECS launches On-Demand, Spot or Capacity Reservation Instances for your managed instance capacity provider.

        Valid values are:

        • ON_DEMAND - Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.

        • SPOT - Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.

        • RESERVED - Launches Instances using Amazon EC2 Capacity Reservations. Capacity Reservations allow you to reserve compute capacity for Amazon EC2 instances in a specific Availability Zone.

        The default is On-Demand

        For more information about Amazon EC2 capacity options, see Instance purchasing options in the Amazon EC2 User Guide.

        See Also:
        CapacityOptionType
      • capacityOptionTypeAsString

        public final String capacityOptionTypeAsString()

        The capacity option type. This determines whether Amazon ECS launches On-Demand, Spot or Capacity Reservation Instances for your managed instance capacity provider.

        Valid values are:

        • ON_DEMAND - Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.

        • SPOT - Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.

        • RESERVED - Launches Instances using Amazon EC2 Capacity Reservations. Capacity Reservations allow you to reserve compute capacity for Amazon EC2 instances in a specific Availability Zone.

        The default is On-Demand

        For more information about Amazon EC2 capacity options, see Instance purchasing options in the Amazon EC2 User Guide.

        If the service returns an enum value that is not available in the current SDK version, capacityOptionType will return CapacityOptionType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from capacityOptionTypeAsString().

        Returns:
        The capacity option type. This determines whether Amazon ECS launches On-Demand, Spot or Capacity Reservation Instances for your managed instance capacity provider.

        Valid values are:

        • ON_DEMAND - Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.

        • SPOT - Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.

        • RESERVED - Launches Instances using Amazon EC2 Capacity Reservations. Capacity Reservations allow you to reserve compute capacity for Amazon EC2 instances in a specific Availability Zone.

        The default is On-Demand

        For more information about Amazon EC2 capacity options, see Instance purchasing options in the Amazon EC2 User Guide.

        See Also:
        CapacityOptionType
      • instanceMetadataTagsPropagation

        public final Boolean instanceMetadataTagsPropagation()

        Determines whether tags are propagated to the instance metadata service (IMDS) for Amazon EC2 instances launched by the Managed Instances capacity provider. When enabled, all tags associated with the instance are available through the instance metadata service. When disabled, tags are not propagated to IMDS.

        Disable this setting if your tags contain characters that are not compatible with IMDS, such as /. IMDS requires tag keys to match the pattern [0-9a-zA-Z\-_+=,.@:]{1,255}.

        The default value is true.

        For more information, see Work with instance tags in instance metadata in the Amazon EC2 User Guide.

        Returns:
        Determines whether tags are propagated to the instance metadata service (IMDS) for Amazon EC2 instances launched by the Managed Instances capacity provider. When enabled, all tags associated with the instance are available through the instance metadata service. When disabled, tags are not propagated to IMDS.

        Disable this setting if your tags contain characters that are not compatible with IMDS, such as /. IMDS requires tag keys to match the pattern [0-9a-zA-Z\-_+=,.@:]{1,255}.

        The default value is true.

        For more information, see Work with instance tags in instance metadata in the Amazon EC2 User Guide.

      • instanceRequirements

        public final InstanceRequirementsRequest instanceRequirements()

        The instance requirements. You can specify:

        • The instance types

        • Instance requirements such as vCPU count, memory, network performance, and accelerator specifications

        Amazon ECS automatically selects the instances that match the specified criteria.

        Returns:
        The instance requirements. You can specify:

        • The instance types

        • Instance requirements such as vCPU count, memory, network performance, and accelerator specifications

        Amazon ECS automatically selects the instances that match the specified criteria.

      • fipsEnabled

        public final Boolean fipsEnabled()

        Determines whether to enable FIPS 140-2 validated cryptographic modules on EC2 instances launched by the capacity provider. If true, instances use FIPS-compliant cryptographic algorithms and modules for enhanced security compliance. If false, instances use standard cryptographic implementations.

        If not specified, instances are launched with FIPS enabled in AWS GovCloud (US) regions and FIPS disabled in other regions.

        Returns:
        Determines whether to enable FIPS 140-2 validated cryptographic modules on EC2 instances launched by the capacity provider. If true, instances use FIPS-compliant cryptographic algorithms and modules for enhanced security compliance. If false, instances use standard cryptographic implementations.

        If not specified, instances are launched with FIPS enabled in AWS GovCloud (US) regions and FIPS disabled in other regions.

      • capacityReservations

        public final CapacityReservationRequest capacityReservations()

        Capacity reservation specifications. You can specify:

        • Capacity reservation preference

        • Reservation resource group to be used for targeted capacity reservations

        Amazon ECS will launch instances according to the specified criteria.

        Returns:
        Capacity reservation specifications. You can specify:

        • Capacity reservation preference

        • Reservation resource group to be used for targeted capacity reservations

        Amazon ECS will launch instances according to the specified criteria.

      • hashCode

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

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • 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)