Class ServiceDeployment

java.lang.Object
software.amazon.awssdk.services.ecs.model.ServiceDeployment
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ServiceDeployment.Builder,ServiceDeployment>

@Generated("software.amazon.awssdk:codegen") public final class ServiceDeployment extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ServiceDeployment.Builder,ServiceDeployment>

Information about the service deployment.

Service deployments provide a comprehensive view of your deployments. For information about service deployments, see View service history using Amazon ECS service deployments in the Amazon Elastic Container Service Developer Guide .

See Also:
  • Method Details

    • serviceDeploymentArn

      public final String serviceDeploymentArn()

      The ARN of the service deployment.

      Returns:
      The ARN of the service deployment.
    • serviceArn

      public final String serviceArn()

      The ARN of the service for this service deployment.

      Returns:
      The ARN of the service for this service deployment.
    • clusterArn

      public final String clusterArn()

      The ARN of the cluster that hosts the service.

      Returns:
      The ARN of the cluster that hosts the service.
    • createdAt

      public final Instant createdAt()

      The time the service deployment was created. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

      Returns:
      The time the service deployment was created. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.
    • startedAt

      public final Instant startedAt()

      The time the service deployment statred. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

      Returns:
      The time the service deployment statred. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.
    • finishedAt

      public final Instant finishedAt()

      The time the service deployment finished. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

      Returns:
      The time the service deployment finished. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.
    • stoppedAt

      public final Instant stoppedAt()

      The time the service deployment stopped. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

      The service deployment stops when any of the following actions happen:

      • A user manually stops the deployment

      • The rollback option is not in use for the failure detection mechanism (the circuit breaker or alarm-based) and the service fails.

      Returns:
      The time the service deployment stopped. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

      The service deployment stops when any of the following actions happen:

      • A user manually stops the deployment

      • The rollback option is not in use for the failure detection mechanism (the circuit breaker or alarm-based) and the service fails.

    • updatedAt

      public final Instant updatedAt()

      The time that the service deployment was last updated. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

      Returns:
      The time that the service deployment was last updated. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.
    • hasSourceServiceRevisions

      public final boolean hasSourceServiceRevisions()
      For responses, this returns true if the service returned a value for the SourceServiceRevisions property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() 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.
    • sourceServiceRevisions

      public final List<ServiceRevisionSummary> sourceServiceRevisions()

      The currently deployed workload configuration.

      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 hasSourceServiceRevisions() method.

      Returns:
      The currently deployed workload configuration.
    • targetServiceRevision

      public final ServiceRevisionSummary targetServiceRevision()

      The workload configuration being deployed.

      Returns:
      The workload configuration being deployed.
    • status

      public final ServiceDeploymentStatus status()

      The service deployment state.

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

      Returns:
      The service deployment state.
      See Also:
    • statusAsString

      public final String statusAsString()

      The service deployment state.

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

      Returns:
      The service deployment state.
      See Also:
    • statusReason

      public final String statusReason()

      Information about why the service deployment is in the current status. For example, the circuit breaker detected a failure.

      Returns:
      Information about why the service deployment is in the current status. For example, the circuit breaker detected a failure.
    • lifecycleStage

      public final ServiceDeploymentLifecycleStage lifecycleStage()

      The current lifecycle stage of the deployment. Possible values include:

      • RECONCILE_SERVICE

        The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.

      • PRE_SCALE_UP

        The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • SCALE_UP

        The stage when the green service revision scales up to 100% and launches new tasks. The green service revision is not serving any traffic at this point.

      • POST_SCALE_UP

        The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • TEST_TRAFFIC_SHIFT

        The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.

      • POST_TEST_TRAFFIC_SHIFT

        The test traffic shift is complete. The green service revision handles 100% of the test traffic.

      • PRODUCTION_TRAFFIC_SHIFT

        Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.

      • POST_PRODUCTION_TRAFFIC_SHIFT

        The production traffic shift is complete.

      • BAKE_TIME

        The stage when both blue and green service revisions are running simultaneously after the production traffic has shifted.

      • CLEAN_UP

        The stage when the blue service revision has completely scaled down to 0 running tasks. The green service revision is now the production service revision after this stage.

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

      Returns:
      The current lifecycle stage of the deployment. Possible values include:

      • RECONCILE_SERVICE

        The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.

      • PRE_SCALE_UP

        The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • SCALE_UP

        The stage when the green service revision scales up to 100% and launches new tasks. The green service revision is not serving any traffic at this point.

      • POST_SCALE_UP

        The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • TEST_TRAFFIC_SHIFT

        The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.

      • POST_TEST_TRAFFIC_SHIFT

        The test traffic shift is complete. The green service revision handles 100% of the test traffic.

      • PRODUCTION_TRAFFIC_SHIFT

        Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.

      • POST_PRODUCTION_TRAFFIC_SHIFT

        The production traffic shift is complete.

      • BAKE_TIME

        The stage when both blue and green service revisions are running simultaneously after the production traffic has shifted.

      • CLEAN_UP

        The stage when the blue service revision has completely scaled down to 0 running tasks. The green service revision is now the production service revision after this stage.

      See Also:
    • lifecycleStageAsString

      public final String lifecycleStageAsString()

      The current lifecycle stage of the deployment. Possible values include:

      • RECONCILE_SERVICE

        The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.

      • PRE_SCALE_UP

        The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • SCALE_UP

        The stage when the green service revision scales up to 100% and launches new tasks. The green service revision is not serving any traffic at this point.

      • POST_SCALE_UP

        The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • TEST_TRAFFIC_SHIFT

        The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.

      • POST_TEST_TRAFFIC_SHIFT

        The test traffic shift is complete. The green service revision handles 100% of the test traffic.

      • PRODUCTION_TRAFFIC_SHIFT

        Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.

      • POST_PRODUCTION_TRAFFIC_SHIFT

        The production traffic shift is complete.

      • BAKE_TIME

        The stage when both blue and green service revisions are running simultaneously after the production traffic has shifted.

      • CLEAN_UP

        The stage when the blue service revision has completely scaled down to 0 running tasks. The green service revision is now the production service revision after this stage.

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

      Returns:
      The current lifecycle stage of the deployment. Possible values include:

      • RECONCILE_SERVICE

        The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.

      • PRE_SCALE_UP

        The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • SCALE_UP

        The stage when the green service revision scales up to 100% and launches new tasks. The green service revision is not serving any traffic at this point.

      • POST_SCALE_UP

        The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

      • TEST_TRAFFIC_SHIFT

        The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.

      • POST_TEST_TRAFFIC_SHIFT

        The test traffic shift is complete. The green service revision handles 100% of the test traffic.

      • PRODUCTION_TRAFFIC_SHIFT

        Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.

      • POST_PRODUCTION_TRAFFIC_SHIFT

        The production traffic shift is complete.

      • BAKE_TIME

        The stage when both blue and green service revisions are running simultaneously after the production traffic has shifted.

      • CLEAN_UP

        The stage when the blue service revision has completely scaled down to 0 running tasks. The green service revision is now the production service revision after this stage.

      See Also:
    • deploymentConfiguration

      public final DeploymentConfiguration deploymentConfiguration()
      Returns the value of the DeploymentConfiguration property for this object.
      Returns:
      The value of the DeploymentConfiguration property for this object.
    • rollback

      public final Rollback rollback()

      The rollback options the service deployment uses when the deployment fails.

      Returns:
      The rollback options the service deployment uses when the deployment fails.
    • deploymentCircuitBreaker

      public final ServiceDeploymentCircuitBreaker deploymentCircuitBreaker()

      The circuit breaker configuration that determines a service deployment failed.

      Returns:
      The circuit breaker configuration that determines a service deployment failed.
    • alarms

      public final ServiceDeploymentAlarms alarms()

      The CloudWatch alarms that determine when a service deployment fails.

      Returns:
      The CloudWatch alarms that determine when a service deployment fails.
    • toBuilder

      public ServiceDeployment.Builder 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 interface ToCopyableBuilder<ServiceDeployment.Builder,ServiceDeployment>
      Returns:
      a builder for type T
    • builder

      public static ServiceDeployment.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ServiceDeployment.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      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 an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • 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)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.