Class TaskSet
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<TaskSet.Builder,TaskSet>
Information about a set of Amazon ECS tasks in either an CodeDeploy or an EXTERNAL deployment. An Amazon
ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task
set serves production traffic.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskSet.Builderbuilder()final List<CapacityProviderStrategyItem> The capacity provider strategy that are associated with the task set.final StringThe Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in.final IntegerThe computed desired count for the task set.final InstantThe Unix timestamp for the time when the task set was created.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final StringThe external ID associated with the task set.The Fargate ephemeral storage settings for the task set.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the CapacityProviderStrategy property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the LoadBalancers property.final booleanFor responses, this returns true if the service returned a value for the ServiceRegistries property.final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final Stringid()The ID of the task set.final LaunchTypeThe launch type the tasks in the task set are using.final StringThe launch type the tasks in the task set are using.final List<LoadBalancer> Details on a load balancer that are used with a task set.final NetworkConfigurationThe network configuration for the task set.final IntegerThe number of tasks in the task set that are in thePENDINGstatus during a deployment.final StringThe operating system that your tasks in the set are running on.final StringThe Fargate platform version where the tasks in the task set are running.final IntegerThe number of tasks in the task set that are in theRUNNINGstatus during a deployment.final Scalescale()A floating-point percentage of your desired number of tasks to place and keep running in the task set.static Class<? extends TaskSet.Builder> final StringThe Amazon Resource Name (ARN) of the service the task set exists in.final List<ServiceRegistry> The details for the service discovery registries to assign to this task set.final StabilityStatusThe stability status.final StringThe stability status.final InstantThe Unix timestamp for the time when the task set stability status was retrieved.final StringThe tag specified when a task set is started.final Stringstatus()The status of the task set.tags()The metadata that you apply to the task set to help you categorize and organize them.final StringThe task definition that the task set is using.final StringThe Amazon Resource Name (ARN) of the task set.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final InstantThe Unix timestamp for the time when the task set was last updated.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
id
-
taskSetArn
The Amazon Resource Name (ARN) of the task set.
- Returns:
- The Amazon Resource Name (ARN) of the task set.
-
serviceArn
The Amazon Resource Name (ARN) of the service the task set exists in.
- Returns:
- The Amazon Resource Name (ARN) of the service the task set exists in.
-
clusterArn
The Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in.
- Returns:
- The Amazon Resource Name (ARN) of the cluster that the service that hosts the task set exists in.
-
startedBy
The tag specified when a task set is started. If an CodeDeploy deployment created the task set, the
startedByparameter isCODE_DEPLOY. If an external deployment created the task set, thestartedByfield isn't used.- Returns:
- The tag specified when a task set is started. If an CodeDeploy deployment created the task set, the
startedByparameter isCODE_DEPLOY. If an external deployment created the task set, thestartedByfield isn't used.
-
externalId
The external ID associated with the task set.
If an CodeDeploy deployment created a task set, the
externalIdparameter contains the CodeDeploy deployment ID.If a task set is created for an external deployment and is associated with a service discovery registry, the
externalIdparameter contains theECS_TASK_SET_EXTERNAL_IDCloud Map attribute.- Returns:
- The external ID associated with the task set.
If an CodeDeploy deployment created a task set, the
externalIdparameter contains the CodeDeploy deployment ID.If a task set is created for an external deployment and is associated with a service discovery registry, the
externalIdparameter contains theECS_TASK_SET_EXTERNAL_IDCloud Map attribute.
-
status
The status of the task set. The following describes each state.
- PRIMARY
-
The task set is serving production traffic.
- ACTIVE
-
The task set isn't serving production traffic.
- DRAINING
-
The tasks in the task set are being stopped, and their corresponding targets are being deregistered from their target group.
- Returns:
- The status of the task set. The following describes each state.
- PRIMARY
-
The task set is serving production traffic.
- ACTIVE
-
The task set isn't serving production traffic.
- DRAINING
-
The tasks in the task set are being stopped, and their corresponding targets are being deregistered from their target group.
-
taskDefinition
The task definition that the task set is using.
- Returns:
- The task definition that the task set is using.
-
computedDesiredCount
The computed desired count for the task set. This is calculated by multiplying the service's
desiredCountby the task set'sscalepercentage. The result is always rounded up. For example, if the computed desired count is 1.2, it rounds up to 2 tasks.- Returns:
- The computed desired count for the task set. This is calculated by multiplying the service's
desiredCountby the task set'sscalepercentage. The result is always rounded up. For example, if the computed desired count is 1.2, it rounds up to 2 tasks.
-
pendingCount
The number of tasks in the task set that are in the
PENDINGstatus during a deployment. A task in thePENDINGstate is preparing to enter theRUNNINGstate. A task set enters thePENDINGstatus when it launches for the first time or when it's restarted after being in theSTOPPEDstate.- Returns:
- The number of tasks in the task set that are in the
PENDINGstatus during a deployment. A task in thePENDINGstate is preparing to enter theRUNNINGstate. A task set enters thePENDINGstatus when it launches for the first time or when it's restarted after being in theSTOPPEDstate.
-
runningCount
The number of tasks in the task set that are in the
RUNNINGstatus during a deployment. A task in theRUNNINGstate is running and ready for use.- Returns:
- The number of tasks in the task set that are in the
RUNNINGstatus during a deployment. A task in theRUNNINGstate is running and ready for use.
-
createdAt
The Unix timestamp for the time when the task set was created.
- Returns:
- The Unix timestamp for the time when the task set was created.
-
updatedAt
The Unix timestamp for the time when the task set was last updated.
- Returns:
- The Unix timestamp for the time when the task set was last updated.
-
launchType
The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
If the service returns an enum value that is not available in the current SDK version,
launchTypewill returnLaunchType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromlaunchTypeAsString().- Returns:
- The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
- See Also:
-
launchTypeAsString
The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
If the service returns an enum value that is not available in the current SDK version,
launchTypewill returnLaunchType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromlaunchTypeAsString().- Returns:
- The launch type the tasks in the task set are using. For more information, see Amazon ECS launch types in the Amazon Elastic Container Service Developer Guide.
- See Also:
-
hasCapacityProviderStrategy
public final boolean hasCapacityProviderStrategy()For responses, this returns true if the service returned a value for the CapacityProviderStrategy 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. -
capacityProviderStrategy
The capacity provider strategy that are associated with the task set.
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
hasCapacityProviderStrategy()method.- Returns:
- The capacity provider strategy that are associated with the task set.
-
platformVersion
The Fargate platform version where the tasks in the task set are running. A platform version is only specified for tasks run on Fargate. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.
- Returns:
- The Fargate platform version where the tasks in the task set are running. A platform version is only specified for tasks run on Fargate. For more information, see Fargate platform versions in the Amazon Elastic Container Service Developer Guide.
-
platformFamily
The operating system that your tasks in the set are running on. A platform family is specified only for tasks that use the Fargate launch type.
All tasks in the set must have the same value.
- Returns:
- The operating system that your tasks in the set are running on. A platform family is specified only for
tasks that use the Fargate launch type.
All tasks in the set must have the same value.
-
networkConfiguration
The network configuration for the task set.
- Returns:
- The network configuration for the task set.
-
hasLoadBalancers
public final boolean hasLoadBalancers()For responses, this returns true if the service returned a value for the LoadBalancers 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. -
loadBalancers
Details on a load balancer that are used with a task set.
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
hasLoadBalancers()method.- Returns:
- Details on a load balancer that are used with a task set.
-
hasServiceRegistries
public final boolean hasServiceRegistries()For responses, this returns true if the service returned a value for the ServiceRegistries 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. -
serviceRegistries
The details for the service discovery registries to assign to this task set. For more information, see Service discovery.
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
hasServiceRegistries()method.- Returns:
- The details for the service discovery registries to assign to this task set. For more information, see Service discovery.
-
scale
A floating-point percentage of your desired number of tasks to place and keep running in the task set.
- Returns:
- A floating-point percentage of your desired number of tasks to place and keep running in the task set.
-
stabilityStatus
The stability status. This indicates whether the task set has reached a steady state. If the following conditions are met, the task set are in
STEADY_STATE:-
The task
runningCountis equal to thecomputedDesiredCount. -
The
pendingCountis0. -
There are no tasks that are running on container instances in the
DRAININGstatus. -
All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.
If any of those conditions aren't met, the stability status returns
STABILIZING.If the service returns an enum value that is not available in the current SDK version,
stabilityStatuswill returnStabilityStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstabilityStatusAsString().- Returns:
- The stability status. This indicates whether the task set has reached a steady state. If the following
conditions are met, the task set are in
STEADY_STATE:-
The task
runningCountis equal to thecomputedDesiredCount. -
The
pendingCountis0. -
There are no tasks that are running on container instances in the
DRAININGstatus. -
All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.
If any of those conditions aren't met, the stability status returns
STABILIZING. -
- See Also:
-
-
stabilityStatusAsString
The stability status. This indicates whether the task set has reached a steady state. If the following conditions are met, the task set are in
STEADY_STATE:-
The task
runningCountis equal to thecomputedDesiredCount. -
The
pendingCountis0. -
There are no tasks that are running on container instances in the
DRAININGstatus. -
All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.
If any of those conditions aren't met, the stability status returns
STABILIZING.If the service returns an enum value that is not available in the current SDK version,
stabilityStatuswill returnStabilityStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstabilityStatusAsString().- Returns:
- The stability status. This indicates whether the task set has reached a steady state. If the following
conditions are met, the task set are in
STEADY_STATE:-
The task
runningCountis equal to thecomputedDesiredCount. -
The
pendingCountis0. -
There are no tasks that are running on container instances in the
DRAININGstatus. -
All tasks are reporting a healthy status from the load balancers, service discovery, and container health checks.
If any of those conditions aren't met, the stability status returns
STABILIZING. -
- See Also:
-
-
stabilityStatusAt
The Unix timestamp for the time when the task set stability status was retrieved.
- Returns:
- The Unix timestamp for the time when the task set stability status was retrieved.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags 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. -
tags
The metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
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
hasTags()method.- Returns:
- The metadata that you apply to the task set to help you categorize and organize them. Each tag consists
of a key and an optional value. You define both.
The following basic restrictions apply to tags:
-
Maximum number of tags per resource - 50
-
For each resource, each tag key must be unique, and each tag key can have only one value.
-
Maximum key length - 128 Unicode characters in UTF-8
-
Maximum value length - 256 Unicode characters in UTF-8
-
If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
-
Tag keys and values are case-sensitive.
-
Do not use
aws:,AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
-
-
-
fargateEphemeralStorage
The Fargate ephemeral storage settings for the task set.
- Returns:
- The Fargate ephemeral storage settings for the task set.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<TaskSet.Builder,TaskSet> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-