Class DaemonTaskDefinition

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

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

The details of a daemon task definition. A daemon task definition is a template that describes the containers that form a daemon. Daemons deploy cross-cutting software agents independently across your Amazon ECS infrastructure.

See Also:
  • Method Details

    • daemonTaskDefinitionArn

      public final String daemonTaskDefinitionArn()

      The full Amazon Resource Name (ARN) of the daemon task definition.

      Returns:
      The full Amazon Resource Name (ARN) of the daemon task definition.
    • family

      public final String family()

      The name of a family that this daemon task definition is registered to.

      Returns:
      The name of a family that this daemon task definition is registered to.
    • revision

      public final Integer revision()

      The revision of the daemon task in a particular family. The revision is a version number of a daemon task definition in a family. When you register a daemon task definition for the first time, the revision is 1. Each time that you register a new revision of a daemon task definition in the same family, the revision value always increases by one.

      Returns:
      The revision of the daemon task in a particular family. The revision is a version number of a daemon task definition in a family. When you register a daemon task definition for the first time, the revision is 1. Each time that you register a new revision of a daemon task definition in the same family, the revision value always increases by one.
    • taskRoleArn

      public final String taskRoleArn()

      The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.

      Returns:
      The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.
    • executionRoleArn

      public final String executionRoleArn()

      The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.

      Returns:
      The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.
    • hasContainerDefinitions

      public final boolean hasContainerDefinitions()
      For responses, this returns true if the service returned a value for the ContainerDefinitions property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() 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.
    • containerDefinitions

      public final List<DaemonContainerDefinition> containerDefinitions()

      A list of container definitions in JSON format that describe the containers that make up the daemon task.

      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 hasContainerDefinitions() method.

      Returns:
      A list of container definitions in JSON format that describe the containers that make up the daemon task.
    • hasVolumes

      public final boolean hasVolumes()
      For responses, this returns true if the service returned a value for the Volumes property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() 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.
    • volumes

      public final List<DaemonVolume> volumes()

      The list of data volume definitions for the daemon task.

      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 hasVolumes() method.

      Returns:
      The list of data volume definitions for the daemon task.
    • cpu

      public final String cpu()

      The number of CPU units used by the daemon task.

      Returns:
      The number of CPU units used by the daemon task.
    • memory

      public final String memory()

      The amount of memory (in MiB) used by the daemon task.

      Returns:
      The amount of memory (in MiB) used by the daemon task.
    • status

      public final DaemonTaskDefinitionStatus status()

      The status of the daemon task definition. The valid values are ACTIVE, DELETE_IN_PROGRESS, and DELETED.

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

      Returns:
      The status of the daemon task definition. The valid values are ACTIVE, DELETE_IN_PROGRESS, and DELETED.
      See Also:
    • statusAsString

      public final String statusAsString()

      The status of the daemon task definition. The valid values are ACTIVE, DELETE_IN_PROGRESS, and DELETED.

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

      Returns:
      The status of the daemon task definition. The valid values are ACTIVE, DELETE_IN_PROGRESS, and DELETED.
      See Also:
    • registeredAt

      public final Instant registeredAt()

      The Unix timestamp for the time when the daemon task definition was registered.

      Returns:
      The Unix timestamp for the time when the daemon task definition was registered.
    • deleteRequestedAt

      public final Instant deleteRequestedAt()

      The Unix timestamp for the time when the daemon task definition delete was requested.

      Returns:
      The Unix timestamp for the time when the daemon task definition delete was requested.
    • registeredBy

      public final String registeredBy()

      The principal that registered the daemon task definition.

      Returns:
      The principal that registered the daemon task definition.
    • toBuilder

      public DaemonTaskDefinition.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<DaemonTaskDefinition.Builder,DaemonTaskDefinition>
      Returns:
      a builder for type T
    • builder

      public static DaemonTaskDefinition.Builder builder()
    • serializableBuilderClass

      public static Class<? extends DaemonTaskDefinition.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.