Class EksContainerResourceRequirements
- java.lang.Object
-
- software.amazon.awssdk.services.batch.model.EksContainerResourceRequirements
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<EksContainerResourceRequirements.Builder,EksContainerResourceRequirements>
@Generated("software.amazon.awssdk:codegen") public final class EksContainerResourceRequirements extends Object implements SdkPojo, Serializable, ToCopyableBuilder<EksContainerResourceRequirements.Builder,EksContainerResourceRequirements>
The type and amount of resources to assign to a container. The supported resources include
memory
,cpu
, andnvidia.com/gpu
. For more information, see Resource management for pods and containers in the Kubernetes documentation.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EksContainerResourceRequirements.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EksContainerResourceRequirements.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
boolean
hasLimits()
For responses, this returns true if the service returned a value for the Limits property.boolean
hasRequests()
For responses, this returns true if the service returned a value for the Requests property.Map<String,String>
limits()
The type and quantity of the resources to reserve for the container.Map<String,String>
requests()
The type and quantity of the resources to request for the container.List<SdkField<?>>
sdkFields()
static Class<? extends EksContainerResourceRequirements.Builder>
serializableBuilderClass()
EksContainerResourceRequirements.Builder
toBuilder()
String
toString()
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
-
hasLimits
public final boolean hasLimits()
For responses, this returns true if the service returned a value for the Limits 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.
-
limits
public final Map<String,String> limits()
The type and quantity of the resources to reserve for the container. The values vary based on the
name
that's specified. Resources can be requested using either thelimits
or therequests
objects.- memory
-
The memory hard limit (in MiB) for the container, using whole integers, with a "Mi" suffix. If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job.
memory
can be specified inlimits
,requests
, or both. Ifmemory
is specified in both places, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using. To learn how, see Memory management in the Batch User Guide.
- cpu
-
The number of CPUs that's reserved for the container. Values must be an even multiple of
0.25
.cpu
can be specified inlimits
,requests
, or both. Ifcpu
is specified in both places, then the value that's specified inlimits
must be at least as large as the value that's specified inrequests
. - nvidia.com/gpu
-
The number of GPUs that's reserved for the container. Values must be a whole integer.
memory
can be specified inlimits
,requests
, or both. Ifmemory
is specified in both places, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.
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
hasLimits()
method.- Returns:
- The type and quantity of the resources to reserve for the container. The values vary based on the
name
that's specified. Resources can be requested using either thelimits
or therequests
objects.- memory
-
The memory hard limit (in MiB) for the container, using whole integers, with a "Mi" suffix. If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job.
memory
can be specified inlimits
,requests
, or both. Ifmemory
is specified in both places, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using. To learn how, see Memory management in the Batch User Guide.
- cpu
-
The number of CPUs that's reserved for the container. Values must be an even multiple of
0.25
.cpu
can be specified inlimits
,requests
, or both. Ifcpu
is specified in both places, then the value that's specified inlimits
must be at least as large as the value that's specified inrequests
. - nvidia.com/gpu
-
The number of GPUs that's reserved for the container. Values must be a whole integer.
memory
can be specified inlimits
,requests
, or both. Ifmemory
is specified in both places, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.
-
hasRequests
public final boolean hasRequests()
For responses, this returns true if the service returned a value for the Requests 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.
-
requests
public final Map<String,String> requests()
The type and quantity of the resources to request for the container. The values vary based on the
name
that's specified. Resources can be requested by using either thelimits
or therequests
objects.- memory
-
The memory hard limit (in MiB) for the container, using whole integers, with a "Mi" suffix. If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job.
memory
can be specified inlimits
,requests
, or both. Ifmemory
is specified in both, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.If you're trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see Memory management in the Batch User Guide.
- cpu
-
The number of CPUs that are reserved for the container. Values must be an even multiple of
0.25
.cpu
can be specified inlimits
,requests
, or both. Ifcpu
is specified in both, then the value that's specified inlimits
must be at least as large as the value that's specified inrequests
. - nvidia.com/gpu
-
The number of GPUs that are reserved for the container. Values must be a whole integer.
nvidia.com/gpu
can be specified inlimits
,requests
, or both. Ifnvidia.com/gpu
is specified in both, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.
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
hasRequests()
method.- Returns:
- The type and quantity of the resources to request for the container. The values vary based on the
name
that's specified. Resources can be requested by using either thelimits
or therequests
objects.- memory
-
The memory hard limit (in MiB) for the container, using whole integers, with a "Mi" suffix. If your container attempts to exceed the memory specified, the container is terminated. You must specify at least 4 MiB of memory for a job.
memory
can be specified inlimits
,requests
, or both. Ifmemory
is specified in both, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.If you're trying to maximize your resource utilization by providing your jobs as much memory as possible for a particular instance type, see Memory management in the Batch User Guide.
- cpu
-
The number of CPUs that are reserved for the container. Values must be an even multiple of
0.25
.cpu
can be specified inlimits
,requests
, or both. Ifcpu
is specified in both, then the value that's specified inlimits
must be at least as large as the value that's specified inrequests
. - nvidia.com/gpu
-
The number of GPUs that are reserved for the container. Values must be a whole integer.
nvidia.com/gpu
can be specified inlimits
,requests
, or both. Ifnvidia.com/gpu
is specified in both, then the value that's specified inlimits
must be equal to the value that's specified inrequests
.
-
toBuilder
public EksContainerResourceRequirements.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<EksContainerResourceRequirements.Builder,EksContainerResourceRequirements>
-
builder
public static EksContainerResourceRequirements.Builder builder()
-
serializableBuilderClass
public static Class<? extends EksContainerResourceRequirements.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in 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.
-
-