openapi: 3.0.0 info: version: '2014-10-06' x-release: v4 title: 'AWS CodeDeploy Applications #X Amz Target=CodeDeploy 20141006.BatchGetDeployments API' description: '
CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service.
You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes to your existing code before you can use CodeDeploy.
CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application deployment, and handles the complexity of updating your applications, without many of the risks associated with error-prone manual deployments.
CodeDeploy Components
Use the information in this guide to help you work with the following CodeDeploy components:
Application: A name that uniquely identifies the application you want to deploy. CodeDeploy uses this name, which functions as a container, to ensure the correct combination of revision, deployment configuration, and deployment group are referenced during a deployment.
Deployment group: A set of individual instances, CodeDeploy Lambda deployment configuration settings, or an Amazon ECS service and network details. A Lambda deployment group specifies how to route traffic to a new version of a Lambda function. An Amazon ECS deployment group specifies the service created in Amazon ECS to deploy, a load balancer, and a listener to reroute production traffic to an updated containerized application. An Amazon EC2/On-premises deployment group contains individually tagged instances, Amazon EC2 instances in Amazon EC2 Auto Scaling groups, or both. All deployment groups can specify optional trigger, alarm, and rollback settings.
Deployment configuration: A set of deployment rules and deployment success and failure conditions used by CodeDeploy during a deployment.
Deployment: The process and the components used when updating a Lambda function, a containerized application in an Amazon ECS service, or of installing content on one or more instances.
Application revisions: For an Lambda deployment, this is an AppSpec file that specifies the Lambda function to be updated and one or more functions to validate deployment lifecycle events. For an Amazon ECS deployment, this is an AppSpec file that specifies the Amazon ECS task definition, container, and port where production traffic is rerouted. For an EC2/On-premises deployment, this is an archive file that contains source content—source code, webpages, executable files, and deployment scripts—along with an AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. For Amazon S3, a revision is uniquely identified by its Amazon S3 object key and its ETag, version, or both. For GitHub, a revision is uniquely identified by its commit ID.
This guide also contains information to help you get details about the instances in your deployments, to make on-premises instances available for CodeDeploy deployments, to get details about a Lambda function deployment, and to get details about Amazon ECS service deployments.
CodeDeploy Information Resources
The tag filter type:
KEY_ONLY: Key only.
VALUE_ONLY: Value only.
KEY_AND_VALUE: Key and value.
The YAML-formatted or JSON-formatted revision string.
For an Lambda deployment, the content includes a Lambda function name, the alias for its original version, and the alias for its replacement version. The deployment shifts traffic from the original version of the Lambda function to the replacement version.
For an Amazon ECS deployment, the content includes the task name, information about the load balancer that serves traffic to the container, and more.
For both types of deployments, the content can specify Lambda functions that run at specified hooks, such as BeforeInstall, during a deployment.
RawString data type. '
ErrorCode:
type: string
enum:
- AGENT_ISSUE
- ALARM_ACTIVE
- APPLICATION_MISSING
- AUTOSCALING_VALIDATION_ERROR
- AUTO_SCALING_CONFIGURATION
- AUTO_SCALING_IAM_ROLE_PERMISSIONS
- CODEDEPLOY_RESOURCE_CANNOT_BE_FOUND
- CUSTOMER_APPLICATION_UNHEALTHY
- DEPLOYMENT_GROUP_MISSING
- ECS_UPDATE_ERROR
- ELASTIC_LOAD_BALANCING_INVALID
- ELB_INVALID_INSTANCE
- HEALTH_CONSTRAINTS
- HEALTH_CONSTRAINTS_INVALID
- HOOK_EXECUTION_FAILURE
- IAM_ROLE_MISSING
- IAM_ROLE_PERMISSIONS
- INTERNAL_ERROR
- INVALID_ECS_SERVICE
- INVALID_LAMBDA_CONFIGURATION
- INVALID_LAMBDA_FUNCTION
- INVALID_REVISION
- MANUAL_STOP
- MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION
- MISSING_ELB_INFORMATION
- MISSING_GITHUB_TOKEN
- NO_EC2_SUBSCRIPTION
- NO_INSTANCES
- OVER_MAX_INSTANCES
- RESOURCE_LIMIT_EXCEEDED
- REVISION_MISSING
- THROTTLED
- TIMEOUT
- CLOUDFORMATION_STACK_FAILURE
GitHubLocation:
type: object
properties:
repository:
allOf:
- $ref: '#/components/schemas/Repository'
- description: The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.
Specified as account/repository.
commitId: allOf: - $ref: '#/components/schemas/CommitId' - description: The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision. description: Information about the location of application artifacts stored in GitHub. RelatedDeployments: type: object properties: autoUpdateOutdatedInstancesRootDeploymentId: allOf: - $ref: '#/components/schemas/DeploymentId' - description: The deployment ID of the root deployment that triggered this deployment. autoUpdateOutdatedInstancesDeploymentIds: allOf: - $ref: '#/components/schemas/DeploymentsList' - description: The deployment IDs of 'auto-update outdated instances' deployments triggered by this deployment. description: Information about deployments related to the specified deployment. DeploymentCreator: type: string enum: - user - autoscaling - codeDeployRollback - CodeDeploy - CodeDeployAutoUpdate - CloudFormation - CloudFormationRollback BatchGetDeploymentsInput: type: object required: - deploymentIds title: BatchGetDeploymentsInput properties: deploymentIds: allOf: - $ref: '#/components/schemas/DeploymentsList' - description: ' A list of deployment IDs, separated by spaces. The maximum number of deployment IDs you can specify is 25.' description: ' Represents the input of aBatchGetDeployments operation. '
RevisionLocation:
type: object
properties:
revisionType:
allOf:
- $ref: '#/components/schemas/RevisionLocationType'
- description: 'The type of application revision:
S3: An application revision stored in Amazon S3.
GitHub: An application revision stored in GitHub (EC2/On-premises deployments only).
String: A YAML-formatted or JSON-formatted string (Lambda deployments only).
AppSpecContent: An AppSpecContent object that contains the contents of an AppSpec file for an Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML stored as a RawString.
An array that contains information about the load balancer to use for load balancing in a deployment. In Elastic Load Balancing, load balancers are used with Classic Load Balancers.
Adding more than one load balancer to the array is not supported.
An array that contains information about the target group to use for load balancing in a deployment. In Elastic Load Balancing, target groups are used with Application Load Balancers.
Adding more than one target group to the array is not supported.
TargeGroupPairInfo objects with a maximum size of one. '
description: Information about the Elastic Load Balancing load balancer or target group used in a deployment.
AutoScalingGroupName:
type: string
AutoRollbackEvent:
type: string
enum:
- DEPLOYMENT_FAILURE
- DEPLOYMENT_STOP_ON_ALARM
- DEPLOYMENT_STOP_ON_REQUEST
EC2TagSetList:
type: array
items:
$ref: '#/components/schemas/EC2TagFilterList'
TargetGroupInfoList:
type: array
items:
$ref: '#/components/schemas/TargetGroupInfo'
BundleType:
type: string
enum:
- tar
- tgz
- zip
- YAML
- JSON
BlueInstanceTerminationOption:
type: object
properties:
action:
allOf:
- $ref: '#/components/schemas/InstanceAction'
- description: 'The action to take on instances in the original environment after a successful blue/green deployment.
TERMINATE: Instances are terminated after a specified wait time.
KEEP_ALIVE: Instances are left running after they are deregistered from the load balancer and removed from the deployment group.
For an Amazon EC2 deployment, the number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment.
For an Amazon ECS deployment, the number of minutes before deleting the original (blue) task set. During an Amazon ECS deployment, CodeDeploy shifts traffic from the original (blue) task set to a replacement (green) task set.
The maximum setting is 2880 minutes (2 days).
description: 'Information about whether instances in the original environment are terminated when a blue/green deployment is successful.BlueInstanceTerminationOption does not apply to Lambda deployments. '
EC2TagFilterList:
type: array
items:
$ref: '#/components/schemas/EC2TagFilter'
Timestamp:
type: string
format: date-time
EC2TagSet:
type: object
properties:
ec2TagSetList:
allOf:
- $ref: '#/components/schemas/EC2TagSetList'
- description: A list that contains other lists of Amazon EC2 instance tag groups. For an instance to be included in the deployment group, it must be identified by all of the tag groups in the list.
description: Information about groups of Amazon EC2 instance tags.
ELBInfo:
type: object
properties:
name:
allOf:
- $ref: '#/components/schemas/ELBName'
- description: For blue/green deployments, the name of the load balancer that is used to route traffic from original instances to replacement instances in a blue/green deployment. For in-place deployments, the name of the load balancer that instances are deregistered from so they are not serving traffic during a deployment, and then re-registered with after the deployment is complete.
description: Information about a load balancer in Elastic Load Balancing to use in a deployment. Instances are registered directly with a load balancer, and traffic is routed to the load balancer.
DeploymentReadyAction:
type: string
enum:
- CONTINUE_DEPLOYMENT
- STOP_DEPLOYMENT
ELBInfoList:
type: array
items:
$ref: '#/components/schemas/ELBInfo'
GreenFleetProvisioningOption:
type: object
properties:
action:
allOf:
- $ref: '#/components/schemas/GreenFleetProvisioningAction'
- description: 'The method used to add instances to a replacement environment.
DISCOVER_EXISTING: Use instances that already exist or will be created manually.
COPY_AUTO_SCALING_GROUP: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
CONTINUE_DEPLOYMENT: Register new instances with the load balancer immediately after the new application revision is installed on the instances in the replacement environment.
STOP_DEPLOYMENT: Do not register new instances with a load balancer unless traffic rerouting is started using ContinueDeployment. If traffic rerouting is not started before the end of the specified wait period, the deployment status is changed to Stopped.
STOP_DEPLOYMENT option for actionOnTimeout.
description: Information about how traffic is rerouted to instances in a replacement environment in a blue/green deployment.
ErrorMessage:
type: string
S3Bucket:
type: string
TargetInstances:
type: object
properties:
tagFilters:
allOf:
- $ref: '#/components/schemas/EC2TagFilterList'
- description: The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue/green deployment. Cannot be used in the same call as ec2TagSet.
autoScalingGroups:
allOf:
- $ref: '#/components/schemas/AutoScalingGroupNameList'
- description: The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
ec2TagSet:
allOf:
- $ref: '#/components/schemas/EC2TagSet'
- description: Information about the groups of Amazon EC2 instance tags that an instance must be identified by in order for it to be included in the replacement environment for a blue/green deployment. Cannot be used in the same call as tagFilters.
description: Information about the instances to be used in the replacement environment in a blue/green deployment.
DeploymentOption:
type: string
enum:
- WITH_TRAFFIC_CONTROL
- WITHOUT_TRAFFIC_CONTROL
ListenerArn:
type: string
ComputePlatform:
type: string
enum:
- Server
- Lambda
- ECS
DeploymentOverview:
type: object
properties:
Pending:
allOf:
- $ref: '#/components/schemas/InstanceCount'
- description: The number of instances in the deployment in a pending state.
InProgress:
allOf:
- $ref: '#/components/schemas/InstanceCount'
- description: The number of instances in which the deployment is in progress.
Succeeded:
allOf:
- $ref: '#/components/schemas/InstanceCount'
- description: The number of instances in the deployment to which revisions have been successfully deployed.
Failed:
allOf:
- $ref: '#/components/schemas/InstanceCount'
- description: The number of instances in the deployment in a failed state.
Skipped:
allOf:
- $ref: '#/components/schemas/InstanceCount'
- description: The number of instances in the deployment in a skipped state.
Ready:
allOf:
- $ref: '#/components/schemas/InstanceCount'
- description: The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.
description: Information about the deployment status of the instances in the deployment.
DeploymentId:
type: string
VersionId:
type: string
DeploymentType:
type: string
enum:
- IN_PLACE
- BLUE_GREEN
AlarmList:
type: array
items:
$ref: '#/components/schemas/Alarm'
RawStringSha256:
type: string
ApplicationName:
type: string
minLength: 1
maxLength: 100
ErrorInformation:
type: object
properties:
code:
allOf:
- $ref: '#/components/schemas/ErrorCode'
- description: 'For more information, see Error Codes for CodeDeploy in the CodeDeploy User Guide.
The error code:
APPLICATION_MISSING: The application was missing. This error code is most likely raised if the application is deleted after the deployment is created, but before it is started.
DEPLOYMENT_GROUP_MISSING: The deployment group was missing. This error code is most likely raised if the deployment group is deleted after the deployment is created, but before it is started.
HEALTH_CONSTRAINTS: The deployment failed on too many instances to be successfully deployed within the instance health constraints specified.
HEALTH_CONSTRAINTS_INVALID: The revision cannot be successfully deployed within the instance health constraints specified.
IAM_ROLE_MISSING: The service role cannot be accessed.
IAM_ROLE_PERMISSIONS: The service role does not have the correct permissions.
INTERNAL_ERROR: There was an internal error.
NO_EC2_SUBSCRIPTION: The calling account is not subscribed to Amazon EC2.
NO_INSTANCES: No instances were specified, or no instances can be found.
OVER_MAX_INSTANCES: The maximum number of instances was exceeded.
THROTTLED: The operation was throttled because the calling account exceeded the throttling limits of one or more Amazon Web Services services.
TIMEOUT: The deployment has timed out.
REVISION_MISSING: The revision ID was missing. This error code is most likely raised if the revision is deleted after the deployment is created, but before it is started.
The file type of the application revision. Must be one of the following:
tar: A tar archive file.
tgz: A compressed tar archive file.
zip: A zip archive file.
A specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.
If the version is not specified, the system uses the most recent version by default.
eTag: allOf: - $ref: '#/components/schemas/ETag' - description:The ETag of the Amazon S3 object that represents the bundled artifacts for the application revision.
If the ETag is not specified as an input parameter, ETag validation of the object is skipped.
description: Information about the location of application artifacts stored in Amazon S3. BatchGetDeploymentsOutput: type: object properties: deploymentsInfo: allOf: - $ref: '#/components/schemas/DeploymentsInfoList' - description: ' Information about the deployments. ' description: ' Represents the output of aBatchGetDeployments operation. '
BatchLimitExceededException: {}
DeploymentConfigName:
type: string
minLength: 1
maxLength: 100
TrafficRoute:
type: object
properties:
listenerArns:
allOf:
- $ref: '#/components/schemas/ListenerArnList'
- description: ' The Amazon Resource Name (ARN) of one listener. The listener identifies the route between a target group and a load balancer. This is an array of strings with a maximum size of one. '
description: ' Information about a listener. The listener contains the path used to route traffic that is received from the load balancer to a target group. '
DeploymentInfo:
type: object
properties:
applicationName:
allOf:
- $ref: '#/components/schemas/ApplicationName'
- description: The application name.
deploymentGroupName:
allOf:
- $ref: '#/components/schemas/DeploymentGroupName'
- description: ' The deployment group name. '
deploymentConfigName:
allOf:
- $ref: '#/components/schemas/DeploymentConfigName'
- description: ' The deployment configuration name. '
deploymentId:
allOf:
- $ref: '#/components/schemas/DeploymentId'
- description: ' The unique ID of a deployment. '
previousRevision:
allOf:
- $ref: '#/components/schemas/RevisionLocation'
- description: Information about the application revision that was deployed to the deployment group before the most recent successful deployment.
revision:
allOf:
- $ref: '#/components/schemas/RevisionLocation'
- description: Information about the location of stored application artifacts and the service from which to retrieve them.
status:
allOf:
- $ref: '#/components/schemas/DeploymentStatus'
- description: The current state of the deployment as a whole.
errorInformation:
allOf:
- $ref: '#/components/schemas/ErrorInformation'
- description: Information about any error associated with this deployment.
createTime:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: A timestamp that indicates when the deployment was created.
startTime:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: 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: allOf: - $ref: '#/components/schemas/Timestamp' - description: A timestamp that indicates when the deployment was complete. deploymentOverview: allOf: - $ref: '#/components/schemas/DeploymentOverview' - description: A summary of the deployment status of the instances in the deployment. description: allOf: - $ref: '#/components/schemas/Description' - description: A comment about the deployment. creator: allOf: - $ref: '#/components/schemas/DeploymentCreator' - description: '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 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.
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.
Lambda, Server, or ECS).
externalId:
allOf:
- $ref: '#/components/schemas/ExternalId'
- description: The unique ID for an external resource (for example, a CloudFormation stack ID) that is linked to this deployment.
relatedDeployments:
$ref: '#/components/schemas/RelatedDeployments'
overrideAlarmConfiguration:
$ref: '#/components/schemas/AlarmConfiguration'
description: Information about a deployment.
EC2TagFilterType:
type: string
enum:
- KEY_ONLY
- VALUE_ONLY
- KEY_AND_VALUE
CommitId:
type: string
Duration:
type: integer
AlarmConfiguration:
type: object
properties:
enabled:
allOf:
- $ref: '#/components/schemas/Boolean'
- description: Indicates whether the alarm configuration is enabled.
ignorePollAlarmFailure:
allOf:
- $ref: '#/components/schemas/Boolean'
- description: 'Indicates whether a deployment should continue if information about the current state of alarms cannot be retrieved from Amazon CloudWatch. The default value is false.
true: The deployment proceeds even if alarm status information can''t be retrieved from Amazon CloudWatch.
false: The deployment stops if alarm status information can''t be retrieved from Amazon CloudWatch.