Class DeploymentInfo

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

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

Information about a deployment.

See Also:
  • Method Details

    • applicationName

      public final String applicationName()

      The application name.

      Returns:
      The application name.
    • deploymentGroupName

      public final String deploymentGroupName()

      The deployment group name.

      Returns:
      The deployment group name.
    • deploymentConfigName

      public final String deploymentConfigName()

      The deployment configuration name.

      Returns:
      The deployment configuration name.
    • deploymentId

      public final String deploymentId()

      The unique ID of a deployment.

      Returns:
      The unique ID of a deployment.
    • previousRevision

      public final RevisionLocation previousRevision()

      Information about the application revision that was deployed to the deployment group before the most recent successful deployment.

      Returns:
      Information about the application revision that was deployed to the deployment group before the most recent successful deployment.
    • revision

      public final RevisionLocation revision()

      Information about the location of stored application artifacts and the service from which to retrieve them.

      Returns:
      Information about the location of stored application artifacts and the service from which to retrieve them.
    • status

      public final DeploymentStatus status()

      The current state of the deployment as a whole.

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

      Returns:
      The current state of the deployment as a whole.
      See Also:
    • statusAsString

      public final String statusAsString()

      The current state of the deployment as a whole.

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

      Returns:
      The current state of the deployment as a whole.
      See Also:
    • errorInformation

      public final ErrorInformation errorInformation()

      Information about any error associated with this deployment.

      Returns:
      Information about any error associated with this deployment.
    • createTime

      public final Instant createTime()

      A timestamp that indicates when the deployment was created.

      Returns:
      A timestamp that indicates when the deployment was created.
    • startTime

      public final Instant startTime()

      A timestamp that indicates when the deployment was deployed to the deployment group.

      In some cases, the reported value of the start time might be later than the complete time. This is due to differences in the clock settings of backend servers that participate in the deployment process.

      Returns:
      A timestamp that indicates when the deployment was deployed to the deployment group.

      In some cases, the reported value of the start time might be later than the complete time. This is due to differences in the clock settings of backend servers that participate in the deployment process.

    • completeTime

      public final Instant completeTime()

      A timestamp that indicates when the deployment was complete.

      Returns:
      A timestamp that indicates when the deployment was complete.
    • deploymentOverview

      public final DeploymentOverview deploymentOverview()

      A summary of the deployment status of the instances in the deployment.

      Returns:
      A summary of the deployment status of the instances in the deployment.
    • description

      public final String description()

      A comment about the deployment.

      Returns:
      A comment about the deployment.
    • creator

      public final DeploymentCreator creator()

      The means by which the deployment was created:

      • user: A user created the deployment.

      • autoscaling: Amazon EC2 Auto Scaling created the deployment.

      • codeDeployRollback: A rollback process created the deployment.

      • CodeDeployAutoUpdate: An auto-update process created the deployment when it detected outdated Amazon EC2 instances.

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

      Returns:
      The means by which the deployment was created:

      • user: A user created the deployment.

      • autoscaling: Amazon EC2 Auto Scaling created the deployment.

      • codeDeployRollback: A rollback process created the deployment.

      • CodeDeployAutoUpdate: An auto-update process created the deployment when it detected outdated Amazon EC2 instances.

      See Also:
    • creatorAsString

      public final String creatorAsString()

      The means by which the deployment was created:

      • user: A user created the deployment.

      • autoscaling: Amazon EC2 Auto Scaling created the deployment.

      • codeDeployRollback: A rollback process created the deployment.

      • CodeDeployAutoUpdate: An auto-update process created the deployment when it detected outdated Amazon EC2 instances.

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

      Returns:
      The means by which the deployment was created:

      • user: A user created the deployment.

      • autoscaling: Amazon EC2 Auto Scaling created the deployment.

      • codeDeployRollback: A rollback process created the deployment.

      • CodeDeployAutoUpdate: An auto-update process created the deployment when it detected outdated Amazon EC2 instances.

      See Also:
    • ignoreApplicationStopFailures

      public final Boolean ignoreApplicationStopFailures()

      If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.

      If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.

      During a deployment, the CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.

      If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.

      Returns:
      If true, then if an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event to an instance fails, then the deployment continues to the next deployment lifecycle event. For example, if ApplicationStop fails, the deployment continues with DownloadBundle. If BeforeBlockTraffic fails, the deployment continues with BlockTraffic. If AfterBlockTraffic fails, the deployment continues with ApplicationStop.

      If false or not specified, then if a lifecycle event fails during a deployment to an instance, that deployment fails. If deployment to that instance is part of an overall deployment and the number of healthy hosts is not less than the minimum number of healthy hosts, then a deployment to the next instance is attempted.

      During a deployment, the CodeDeploy agent runs the scripts specified for ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic in the AppSpec file from the previous successful deployment. (All other scripts are run from the AppSpec file in the current deployment.) If one of these scripts contains an error and does not run successfully, the deployment can fail.

      If the cause of the failure is a script from the last successful deployment that will never run successfully, create a new deployment and use ignoreApplicationStopFailures to specify that the ApplicationStop, BeforeBlockTraffic, and AfterBlockTraffic failures should be ignored.

    • autoRollbackConfiguration

      public final AutoRollbackConfiguration autoRollbackConfiguration()

      Information about the automatic rollback configuration associated with the deployment.

      Returns:
      Information about the automatic rollback configuration associated with the deployment.
    • updateOutdatedInstancesOnly

      public final Boolean updateOutdatedInstancesOnly()

      Indicates whether only instances that are not running the latest application revision are to be deployed to.

      Returns:
      Indicates whether only instances that are not running the latest application revision are to be deployed to.
    • rollbackInfo

      public final RollbackInfo rollbackInfo()

      Information about a deployment rollback.

      Returns:
      Information about a deployment rollback.
    • deploymentStyle

      public final DeploymentStyle deploymentStyle()

      Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.

      Returns:
      Information about the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer.
    • targetInstances

      public final TargetInstances targetInstances()

      Information about the instances that belong to the replacement environment in a blue/green deployment.

      Returns:
      Information about the instances that belong to the replacement environment in a blue/green deployment.
    • instanceTerminationWaitTimeStarted

      public final Boolean instanceTerminationWaitTimeStarted()

      Indicates whether the wait period set for the termination of instances in the original environment has started. Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the termination wait period starts.

      Returns:
      Indicates whether the wait period set for the termination of instances in the original environment has started. Status is 'false' if the KEEP_ALIVE option is specified. Otherwise, 'true' as soon as the termination wait period starts.
    • blueGreenDeploymentConfiguration

      public final BlueGreenDeploymentConfiguration blueGreenDeploymentConfiguration()

      Information about blue/green deployment options for this deployment.

      Returns:
      Information about blue/green deployment options for this deployment.
    • loadBalancerInfo

      public final LoadBalancerInfo loadBalancerInfo()

      Information about the load balancer used in the deployment.

      Returns:
      Information about the load balancer used in the deployment.
    • additionalDeploymentStatusInfo

      public final String additionalDeploymentStatusInfo()

      Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.

      Returns:
      Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.
    • fileExistsBehavior

      public final FileExistsBehavior fileExistsBehavior()

      Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

      • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

      • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

      • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

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

      Returns:
      Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

      • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

      • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

      • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

      See Also:
    • fileExistsBehaviorAsString

      public final String fileExistsBehaviorAsString()

      Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

      • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

      • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

      • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

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

      Returns:
      Information about how CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.

      • DISALLOW: The deployment fails. This is also the default behavior if no option is specified.

      • OVERWRITE: The version of the file from the application revision currently being deployed replaces the version already on the instance.

      • RETAIN: The version of the file already on the instance is kept and used as part of the new deployment.

      See Also:
    • hasDeploymentStatusMessages

      public final boolean hasDeploymentStatusMessages()
      For responses, this returns true if the service returned a value for the DeploymentStatusMessages 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.
    • deploymentStatusMessages

      public final List<String> deploymentStatusMessages()

      Messages that contain information about the status of a 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 hasDeploymentStatusMessages() method.

      Returns:
      Messages that contain information about the status of a deployment.
    • computePlatform

      public final ComputePlatform computePlatform()

      The destination platform type for the deployment (Lambda, Server, or ECS).

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

      Returns:
      The destination platform type for the deployment (Lambda, Server, or ECS).
      See Also:
    • computePlatformAsString

      public final String computePlatformAsString()

      The destination platform type for the deployment (Lambda, Server, or ECS).

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

      Returns:
      The destination platform type for the deployment (Lambda, Server, or ECS).
      See Also:
    • externalId

      public final String externalId()

      The unique ID for an external resource (for example, a CloudFormation stack ID) that is linked to this deployment.

      Returns:
      The unique ID for an external resource (for example, a CloudFormation stack ID) that is linked to this deployment.
    • relatedDeployments

      public final RelatedDeployments relatedDeployments()
      Returns the value of the RelatedDeployments property for this object.
      Returns:
      The value of the RelatedDeployments property for this object.
    • overrideAlarmConfiguration

      public final AlarmConfiguration overrideAlarmConfiguration()
      Returns the value of the OverrideAlarmConfiguration property for this object.
      Returns:
      The value of the OverrideAlarmConfiguration property for this object.
    • toBuilder

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

      public static DeploymentInfo.Builder builder()
    • serializableBuilderClass

      public static Class<? extends DeploymentInfo.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.