Class Deployment
- java.lang.Object
-
- software.amazon.awssdk.services.ecs.model.Deployment
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Deployment.Builder,Deployment>
@Generated("software.amazon.awssdk:codegen") public final class Deployment extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Deployment.Builder,Deployment>
The details of an Amazon ECS service deployment. This is used only when a service uses the
ECSdeployment controller type.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDeployment.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deployment.Builderbuilder()List<CapacityProviderStrategyItem>capacityProviderStrategy()The capacity provider strategy that the deployment is using.InstantcreatedAt()The Unix timestamp for the time when the service deployment was created.IntegerdesiredCount()The most recent desired count of tasks that was specified for the service to deploy or maintain.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)IntegerfailedTasks()The number of consecutively failed tasks in the deployment.DeploymentEphemeralStoragefargateEphemeralStorage()The Fargate ephemeral storage settings for the deployment.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasCapacityProviderStrategy()For responses, this returns true if the service returned a value for the CapacityProviderStrategy property.inthashCode()booleanhasServiceConnectResources()For responses, this returns true if the service returned a value for the ServiceConnectResources property.booleanhasVolumeConfigurations()For responses, this returns true if the service returned a value for the VolumeConfigurations property.booleanhasVpcLatticeConfigurations()For responses, this returns true if the service returned a value for the VpcLatticeConfigurations property.Stringid()The ID of the deployment.LaunchTypelaunchType()The launch type the tasks in the service are using.StringlaunchTypeAsString()The launch type the tasks in the service are using.NetworkConfigurationnetworkConfiguration()The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using theawsvpcnetworking mode.IntegerpendingCount()The number of tasks in the deployment that are in thePENDINGstatus.StringplatformFamily()The operating system that your tasks in the service, or tasks are running on.StringplatformVersion()The platform version that your tasks in the service run on.DeploymentRolloutStaterolloutState()StringrolloutStateAsString()StringrolloutStateReason()A description of the rollout state of a deployment.IntegerrunningCount()The number of tasks in the deployment that are in theRUNNINGstatus.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends Deployment.Builder>serializableBuilderClass()ServiceConnectConfigurationserviceConnectConfiguration()The details of the Service Connect configuration that's used by this deployment.List<ServiceConnectServiceResource>serviceConnectResources()The list of Service Connect resources that are associated with this deployment.Stringstatus()The status of the deployment.StringtaskDefinition()The most recent task definition that was specified for the tasks in the service to use.Deployment.BuildertoBuilder()StringtoString()Returns a string representation of this object.InstantupdatedAt()The Unix timestamp for the time when the service deployment was last updated.List<ServiceVolumeConfiguration>volumeConfigurations()The details of the volume that wasconfiguredAtLaunch.List<VpcLatticeConfiguration>vpcLatticeConfigurations()The VPC Lattice configuration for the service deployment.-
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
-
id
public final String id()
The ID of the deployment.
- Returns:
- The ID of the deployment.
-
status
public final String 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
PRIMARYdeployment. - 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
PRIMARYdeployment. - INACTIVE
-
A deployment that has been completely replaced.
-
taskDefinition
public final String 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
public final Integer 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
public final Integer pendingCount()
The number of tasks in the deployment that are in the
PENDINGstatus.- Returns:
- The number of tasks in the deployment that are in the
PENDINGstatus.
-
runningCount
public final Integer runningCount()
The number of tasks in the deployment that are in the
RUNNINGstatus.- Returns:
- The number of tasks in the deployment that are in the
RUNNINGstatus.
-
failedTasks
public final Integer 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
RUNNINGstate, 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
RUNNINGstate, 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
public final Instant 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
public final Instant 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
public final List<CapacityProviderStrategyItem> 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
public final LaunchType 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,
launchTypewill 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:
LaunchType
-
launchTypeAsString
public final String 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,
launchTypewill 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:
LaunchType
-
platformVersion
public final String 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
LATESTplatform 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
LATESTplatform version is used. For more information, see Fargate Platform Versions in the Amazon Elastic Container Service Developer Guide.
-
platformFamily
public final String 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
platformFamilyvalue 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
platformFamilyvalue as the service, for example,LINUX..
-
networkConfiguration
public final NetworkConfiguration networkConfiguration()
The VPC subnet and security group configuration for tasks that receive their own elastic network interface by using the
awsvpcnetworking mode.- Returns:
- The VPC subnet and security group configuration for tasks that receive their own elastic network
interface by using the
awsvpcnetworking mode.
-
rolloutState
public final DeploymentRolloutState rolloutState()
The
rolloutStateof 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_PROGRESSstate. When the service reaches a steady state, the deployment transitions to aCOMPLETEDstate. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILEDstate. A deployment inFAILEDstate 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,
rolloutStatewill returnDeploymentRolloutState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromrolloutStateAsString().- Returns:
The
rolloutStateof 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_PROGRESSstate. When the service reaches a steady state, the deployment transitions to aCOMPLETEDstate. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILEDstate. A deployment inFAILEDstate doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.- See Also:
DeploymentRolloutState
-
rolloutStateAsString
public final String rolloutStateAsString()
The
rolloutStateof 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_PROGRESSstate. When the service reaches a steady state, the deployment transitions to aCOMPLETEDstate. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILEDstate. A deployment inFAILEDstate 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,
rolloutStatewill returnDeploymentRolloutState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromrolloutStateAsString().- Returns:
The
rolloutStateof 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_PROGRESSstate. When the service reaches a steady state, the deployment transitions to aCOMPLETEDstate. If the service fails to reach a steady state and circuit breaker is turned on, the deployment transitions to aFAILEDstate. A deployment inFAILEDstate doesn't launch any new tasks. For more information, see DeploymentCircuitBreaker.- See Also:
DeploymentRolloutState
-
rolloutStateReason
public final String rolloutStateReason()
A description of the rollout state of a deployment.
- Returns:
- A description of the rollout state of a deployment.
-
serviceConnectConfiguration
public final ServiceConnectConfiguration 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
public final List<ServiceConnectServiceResource> 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
public final List<ServiceVolumeConfiguration> volumeConfigurations()
The details of the volume that was
configuredAtLaunch. You can configure different settings like the size, throughput, volumeType, and ecryption in ServiceManagedEBSVolumeConfiguration. Thenameof the volume must match thenamefrom 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. Thenameof the volume must match thenamefrom the task definition.
-
fargateEphemeralStorage
public final DeploymentEphemeralStorage fargateEphemeralStorage()
The Fargate ephemeral storage settings for the deployment.
- Returns:
- The Fargate ephemeral storage settings for the deployment.
-
hasVpcLatticeConfigurations
public final boolean hasVpcLatticeConfigurations()
For responses, this returns true if the service returned a value for the VpcLatticeConfigurations 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.
-
vpcLatticeConfigurations
public final List<VpcLatticeConfiguration> vpcLatticeConfigurations()
The VPC Lattice configuration for the service deployment.
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
hasVpcLatticeConfigurations()method.- Returns:
- The VPC Lattice configuration for the service deployment.
-
toBuilder
public Deployment.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Deployment.Builder,Deployment>
-
builder
public static Deployment.Builder builder()
-
serializableBuilderClass
public static Class<? extends Deployment.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin 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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-