Class Deployment
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Deployment.Builder,
Deployment>
The details of an Amazon ECS service deployment. This is used only when a service uses the ECS
deployment controller type.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Deployment.Builder
builder()
final List
<CapacityProviderStrategyItem> The capacity provider strategy that the deployment is using.final Instant
The Unix timestamp for the time when the service deployment was created.final Integer
The most recent desired count of tasks that was specified for the service to deploy or maintain.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final Integer
The number of consecutively failed tasks in the deployment.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the CapacityProviderStrategy property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the ServiceConnectResources property.final boolean
For responses, this returns true if the service returned a value for the VolumeConfigurations property.final String
id()
The ID of the deployment.final LaunchType
The launch type the tasks in the service are using.final String
The launch type the tasks in the service are using.final NetworkConfiguration
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using theawsvpc
networking mode.final Integer
The number of tasks in the deployment that are in thePENDING
status.final String
The operating system that your tasks in the service, or tasks are running on.final String
The platform version that your tasks in the service run on.final DeploymentRolloutState
final String
final String
A description of the rollout state of a deployment.final Integer
The number of tasks in the deployment that are in theRUNNING
status.static Class
<? extends Deployment.Builder> The details of the Service Connect configuration that's used by this deployment.The list of Service Connect resources that are associated with this deployment.final String
status()
The status of the deployment.final String
The most recent task definition that was specified for the tasks in the service to use.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final Instant
The Unix timestamp for the time when the service deployment was last updated.final List
<ServiceVolumeConfiguration> The details of the volume that wasconfiguredAtLaunch
.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
id
The ID of the deployment.
- Returns:
- The ID of the deployment.
-
status
The status of the deployment. The following describes each state.
- PRIMARY
-
The most recent deployment of a service.
- ACTIVE
-
A service deployment that still has running tasks, but are in the process of being replaced with a new
PRIMARY
deployment. - INACTIVE
-
A deployment that has been completely replaced.
- Returns:
- The status of the deployment. The following describes each state.
- PRIMARY
-
The most recent deployment of a service.
- ACTIVE
-
A service deployment that still has running tasks, but are in the process of being replaced with a new
PRIMARY
deployment. - INACTIVE
-
A deployment that has been completely replaced.
-
taskDefinition
The most recent task definition that was specified for the tasks in the service to use.
- Returns:
- The most recent task definition that was specified for the tasks in the service to use.
-
desiredCount
The most recent desired count of tasks that was specified for the service to deploy or maintain.
- Returns:
- The most recent desired count of tasks that was specified for the service to deploy or maintain.
-
pendingCount
The number of tasks in the deployment that are in the
PENDING
status.- Returns:
- The number of tasks in the deployment that are in the
PENDING
status.
-
runningCount
The number of tasks in the deployment that are in the
RUNNING
status.- Returns:
- The number of tasks in the deployment that are in the
RUNNING
status.
-
failedTasks
The number of consecutively failed tasks in the deployment. A task is considered a failure if the service scheduler can't launch the task, the task doesn't transition to a
RUNNING
state, or if it fails any of its defined health checks and is stopped.Once a service deployment has one or more successfully running tasks, the failed task count resets to zero and stops being evaluated.
- Returns:
- The number of consecutively failed tasks in the deployment. A task is considered a failure if the service
scheduler can't launch the task, the task doesn't transition to a
RUNNING
state, or if it fails any of its defined health checks and is stopped.Once a service deployment has one or more successfully running tasks, the failed task count resets to zero and stops being evaluated.
-
createdAt
The Unix timestamp for the time when the service deployment was created.
- Returns:
- The Unix timestamp for the time when the service deployment was created.
-
updatedAt
The Unix timestamp for the time when the service deployment was last updated.
- Returns:
- The Unix timestamp for the time when the service deployment was last updated.
-
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 the deployment is using.
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 the deployment is using.
-
launchType
The launch type the tasks in the service 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,
launchType
will returnLaunchType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromlaunchTypeAsString()
.- Returns:
- The launch type the tasks in the service 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 service 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,
launchType
will returnLaunchType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromlaunchTypeAsString()
.- Returns:
- The launch type the tasks in the service are using. For more information, see Amazon ECS Launch Types in the Amazon Elastic Container Service Developer Guide.
- See Also:
-
platformVersion
The platform version that your tasks in the service run on. A platform version is only specified for tasks using the Fargate launch type. If one isn't specified, the
LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.- Returns:
- The platform version that your tasks in the service run on. A platform version is only specified for
tasks using the Fargate launch type. If one isn't specified, the
LATEST
platform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
-
platformFamily
The operating system that your tasks in the service, or tasks are running on. A platform family is specified only for tasks using the Fargate launch type.
All tasks that run as part of this service must use the same
platformFamily
value as the service, for example,LINUX.
.- Returns:
- The operating system that your tasks in the service, or tasks are running on. A platform family is
specified only for tasks using the Fargate launch type.
All tasks that run as part of this service must use the same
platformFamily
value as the service, for example,LINUX.
.
-
networkConfiguration
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the
awsvpc
networking mode.- Returns:
- The VPC subnet and security group configuration for tasks that receive their own elastic network
interface by using the
awsvpc
networking mode.
-
rolloutState
The
rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.The rollout state of the deployment. When a service deployment is started, it begins in an
IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to aCOMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILED
state. A deployment inFAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.If the service returns an enum value that is not available in the current SDK version,
rolloutState
will returnDeploymentRolloutState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromrolloutStateAsString()
.- Returns:
The
rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.The rollout state of the deployment. When a service deployment is started, it begins in an
IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to aCOMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILED
state. A deployment inFAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.- See Also:
-
rolloutStateAsString
The
rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.The rollout state of the deployment. When a service deployment is started, it begins in an
IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to aCOMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILED
state. A deployment inFAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.If the service returns an enum value that is not available in the current SDK version,
rolloutState
will returnDeploymentRolloutState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromrolloutStateAsString()
.- Returns:
The
rolloutState
of a service is only returned for services that use the rolling update (ECS
) deployment type that aren't behind a Classic Load Balancer.The rollout state of the deployment. When a service deployment is started, it begins in an
IN_PROGRESS
state. When the service reaches a steady state, the deployment transitions to aCOMPLETED
state. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILED
state. A deployment inFAILED
state doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.- See Also:
-
rolloutStateReason
A description of the rollout state of a deployment.
- Returns:
- A description of the rollout state of a deployment.
-
serviceConnectConfiguration
The details of the Service Connect configuration that's used by this deployment. Compare the configuration between multiple deployments when troubleshooting issues with new deployments.
The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
- Returns:
- The details of the Service Connect configuration that's used by this deployment. Compare the
configuration between multiple deployments when troubleshooting issues with new deployments.
The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see Service Connect in the Amazon Elastic Container Service Developer Guide.
-
hasServiceConnectResources
public final boolean hasServiceConnectResources()For responses, this returns true if the service returned a value for the ServiceConnectResources 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. -
serviceConnectResources
The list of Service Connect resources that are associated with this deployment. Each list entry maps a discovery name to a Cloud Map service name.
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
hasServiceConnectResources()
method.- Returns:
- The list of Service Connect resources that are associated with this deployment. Each list entry maps a discovery name to a Cloud Map service name.
-
hasVolumeConfigurations
public final boolean hasVolumeConfigurations()For responses, this returns true if the service returned a value for the VolumeConfigurations 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. -
volumeConfigurations
The details of the volume that was
configuredAtLaunch
. You can configure different settings like the size, throughput, volumeType, and ecryption in ServiceManagedEBSVolumeConfiguration. Thename
of the volume must match thename
from the task definition.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
hasVolumeConfigurations()
method.- Returns:
- The details of the volume that was
configuredAtLaunch
. You can configure different settings like the size, throughput, volumeType, and ecryption in ServiceManagedEBSVolumeConfiguration. Thename
of the volume must match thename
from the task definition.
-
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 interfaceToCopyableBuilder<Deployment.Builder,
Deployment> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
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 anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in 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
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. -
getValueForField
-
sdkFields
-