Class ResourceRequirement

    • Method Detail

      • value

        public final String value()

        The value for the specified resource type.

        When the type is GPU, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on.

        When the type is InferenceAccelerator, the value matches the deviceName for an InferenceAccelerator specified in a task definition.

        Returns:
        The value for the specified resource type.

        When the type is GPU, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on.

        When the type is InferenceAccelerator, the value matches the deviceName for an InferenceAccelerator specified in a task definition.

      • type

        public final ResourceType type()

        The type of resource to assign to a container.

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

        Returns:
        The type of resource to assign to a container.
        See Also:
        ResourceType
      • typeAsString

        public final String typeAsString()

        The type of resource to assign to a container.

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

        Returns:
        The type of resource to assign to a container.
        See Also:
        ResourceType
      • 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)