Table of Contents
A low-level client representing AWS CodeDeploy:
import boto3
client = boto3.client('codedeploy')
These are the available methods:
Adds tags to on-premises instances.
See also: AWS API Documentation
Request Syntax
response = client.add_tags_to_on_premises_instances(
tags=[
{
'Key': 'string',
'Value': 'string'
},
],
instanceNames=[
'string',
]
)
[REQUIRED]
The tag key-value pairs to add to the on-premises instances.
Keys and values are both required. Keys cannot be null or empty strings. Value-only tags are not allowed.
Information about a tag.
The tag's key.
The tag's value.
[REQUIRED]
The names of the on-premises instances to which to add tags.
None
Gets information about one or more application revisions.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_application_revisions(
applicationName='string',
revisions=[
{
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
]
)
[REQUIRED]
The name of an AWS CodeDeploy application about which to get revision information.
[REQUIRED]
Information to get about the application revisions, including type and location.
Information about the location of an application revision.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
dict
Response Syntax
{
'applicationName': 'string',
'errorMessage': 'string',
'revisions': [
{
'revisionLocation': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'genericRevisionInfo': {
'description': 'string',
'deploymentGroups': [
'string',
],
'firstUsedTime': datetime(2015, 1, 1),
'lastUsedTime': datetime(2015, 1, 1),
'registerTime': datetime(2015, 1, 1)
}
},
]
}
Response Structure
(dict) --
Represents the output of a BatchGetApplicationRevisions operation.
applicationName (string) --
The name of the application that corresponds to the revisions.
errorMessage (string) --
Information about errors that may have occurred during the API call.
revisions (list) --
Additional information about the revisions, including the type and location.
(dict) --
Information about an application revision.
revisionLocation (dict) --
Information about the location and type of an application revision.
revisionType (string) --
The type of application revision:
s3Location (dict) --
Information about the location of a revision stored in Amazon S3.
bucket (string) --
The name of the Amazon S3 bucket where the application revision is stored.
key (string) --
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
bundleType (string) --
The file type of the application revision. Must be one of the following:
version (string) --
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 will use the most recent version by default.
eTag (string) --
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 will be skipped.
gitHubLocation (dict) --
Information about the location of application artifacts stored in GitHub.
repository (string) --
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 (string) --
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
string (dict) --
Information about the location of an AWS Lambda deployment revision stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
sha256 (string) --
The SHA256 hash value of the revision content.
appSpecContent (dict) --
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
sha256 (string) --
The SHA256 hash value of the revision content.
genericRevisionInfo (dict) --
Information about an application revision, including usage details and associated deployment groups.
description (string) --
A comment about the revision.
deploymentGroups (list) --
The deployment groups for which this is the current target revision.
firstUsedTime (datetime) --
When the revision was first used by AWS CodeDeploy.
lastUsedTime (datetime) --
When the revision was last used by AWS CodeDeploy.
registerTime (datetime) --
When the revision was registered with AWS CodeDeploy.
Gets information about one or more applications.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_applications(
applicationNames=[
'string',
]
)
[REQUIRED]
A list of application names separated by spaces.
{
'applicationsInfo': [
{
'applicationId': 'string',
'applicationName': 'string',
'createTime': datetime(2015, 1, 1),
'linkedToGitHub': True|False,
'gitHubAccountName': 'string',
'computePlatform': 'Server'|'Lambda'|'ECS'
},
]
}
Response Structure
Represents the output of a BatchGetApplications operation.
Information about the applications.
Information about an application.
The application ID.
The application name.
The time at which the application was created.
True if the user has authenticated with GitHub for the specified application; otherwise, false.
The name for a connection to a GitHub account.
The destination platform type for deployment of the application (Lambda or Server ).
Gets information about one or more deployment groups.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_deployment_groups(
applicationName='string',
deploymentGroupNames=[
'string',
]
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
[REQUIRED]
The deployment groups' names.
dict
Response Syntax
{
'deploymentGroupsInfo': [
{
'applicationName': 'string',
'deploymentGroupId': 'string',
'deploymentGroupName': 'string',
'deploymentConfigName': 'string',
'ec2TagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'onPremisesInstanceTagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'autoScalingGroups': [
{
'name': 'string',
'hook': 'string'
},
],
'serviceRoleArn': 'string',
'targetRevision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'triggerConfigurations': [
{
'triggerName': 'string',
'triggerTargetArn': 'string',
'triggerEvents': [
'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
]
},
],
'alarmConfiguration': {
'enabled': True|False,
'ignorePollAlarmFailure': True|False,
'alarms': [
{
'name': 'string'
},
]
},
'autoRollbackConfiguration': {
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
'deploymentStyle': {
'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
},
'blueGreenDeploymentConfiguration': {
'terminateBlueInstancesOnDeploymentSuccess': {
'action': 'TERMINATE'|'KEEP_ALIVE',
'terminationWaitTimeInMinutes': 123
},
'deploymentReadyOption': {
'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
'waitTimeInMinutes': 123
},
'greenFleetProvisioningOption': {
'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
}
},
'loadBalancerInfo': {
'elbInfoList': [
{
'name': 'string'
},
],
'targetGroupInfoList': [
{
'name': 'string'
},
],
'targetGroupPairInfoList': [
{
'targetGroups': [
{
'name': 'string'
},
],
'prodTrafficRoute': {
'listenerArns': [
'string',
]
},
'testTrafficRoute': {
'listenerArns': [
'string',
]
}
},
]
},
'lastSuccessfulDeployment': {
'deploymentId': 'string',
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
'endTime': datetime(2015, 1, 1),
'createTime': datetime(2015, 1, 1)
},
'lastAttemptedDeployment': {
'deploymentId': 'string',
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
'endTime': datetime(2015, 1, 1),
'createTime': datetime(2015, 1, 1)
},
'ec2TagSet': {
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
},
'onPremisesTagSet': {
'onPremisesTagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
},
'computePlatform': 'Server'|'Lambda'|'ECS',
'ecsServices': [
{
'serviceName': 'string',
'clusterName': 'string'
},
]
},
],
'errorMessage': 'string'
}
Response Structure
(dict) --
Represents the output of a BatchGetDeploymentGroups operation.
deploymentGroupsInfo (list) --
Information about the deployment groups.
(dict) --
Information about a deployment group.
applicationName (string) --
The application name.
deploymentGroupId (string) --
The deployment group ID.
deploymentGroupName (string) --
The deployment group name.
deploymentConfigName (string) --
The deployment configuration name.
ec2TagFilters (list) --
The Amazon EC2 tags on which to filter. The deployment group includes EC2 instances with any of the specified tags.
(dict) --
Information about an EC2 tag filter.
Key (string) --
The tag filter key.
Value (string) --
The tag filter value.
Type (string) --
The tag filter type:
onPremisesInstanceTagFilters (list) --
The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags.
(dict) --
Information about an on-premises instance tag filter.
Key (string) --
The on-premises instance tag filter key.
Value (string) --
The on-premises instance tag filter value.
Type (string) --
The on-premises instance tag filter type:
autoScalingGroups (list) --
A list of associated Auto Scaling groups.
(dict) --
Information about an Auto Scaling group.
name (string) --
The Auto Scaling group name.
hook (string) --
An Auto Scaling lifecycle event hook name.
serviceRoleArn (string) --
A service role ARN.
targetRevision (dict) --
Information about the deployment group's target revision, including type and location.
revisionType (string) --
The type of application revision:
s3Location (dict) --
Information about the location of a revision stored in Amazon S3.
bucket (string) --
The name of the Amazon S3 bucket where the application revision is stored.
key (string) --
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
bundleType (string) --
The file type of the application revision. Must be one of the following:
version (string) --
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 will use the most recent version by default.
eTag (string) --
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 will be skipped.
gitHubLocation (dict) --
Information about the location of application artifacts stored in GitHub.
repository (string) --
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 (string) --
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
string (dict) --
Information about the location of an AWS Lambda deployment revision stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
sha256 (string) --
The SHA256 hash value of the revision content.
appSpecContent (dict) --
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
sha256 (string) --
The SHA256 hash value of the revision content.
triggerConfigurations (list) --
Information about triggers associated with the deployment group.
(dict) --
Information about notification triggers for the deployment group.
triggerName (string) --
The name of the notification trigger.
triggerTargetArn (string) --
The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.
triggerEvents (list) --
The event type or types for which notifications are triggered.
alarmConfiguration (dict) --
A list of alarms associated with the deployment group.
enabled (boolean) --
Indicates whether the alarm configuration is enabled.
ignorePollAlarmFailure (boolean) --
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.
alarms (list) --
A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.
(dict) --
Information about an alarm.
name (string) --
The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.
autoRollbackConfiguration (dict) --
Information about the automatic rollback configuration associated with the deployment group.
enabled (boolean) --
Indicates whether a defined automatic rollback configuration is currently enabled.
events (list) --
The event type or types that trigger a rollback.
deploymentStyle (dict) --
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.
deploymentType (string) --
Indicates whether to run an in-place deployment or a blue/green deployment.
deploymentOption (string) --
Indicates whether to route deployment traffic behind a load balancer.
blueGreenDeploymentConfiguration (dict) --
Information about blue/green deployment options for a deployment group.
terminateBlueInstancesOnDeploymentSuccess (dict) --
Information about whether to terminate instances in the original fleet during a blue/green deployment.
action (string) --
The action to take on instances in the original environment after a successful blue/green deployment.
terminationWaitTimeInMinutes (integer) --
The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).
deploymentReadyOption (dict) --
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
actionOnTimeout (string) --
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
waitTimeInMinutes (integer) --
The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
greenFleetProvisioningOption (dict) --
Information about how instances are provisioned for a replacement environment in a blue/green deployment.
action (string) --
The method used to add instances to a replacement environment.
loadBalancerInfo (dict) --
Information about the load balancer to use in a deployment.
elbInfoList (list) --
An array containing 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.
Note
Adding more than one load balancer to the array is not supported.
(dict) --
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.
name (string) --
For blue/green deployments, the name of the load balancer that will be 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 completes.
targetGroupInfoList (list) --
An array containing 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.
Note
Adding more than one target group to the array is not supported.
(dict) --
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
name (string) --
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
targetGroupPairInfoList (list) --
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
(dict) --
Information about two target groups and how traffic routes during an Amazon ECS deployment. An optional test traffic route can be specified.
targetGroups (list) --
One pair of target groups. One is associated with the original task set. The second target is associated with the task set that serves traffic after the deployment completes.
(dict) --
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
name (string) --
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
prodTrafficRoute (dict) --
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
listenerArns (list) --
The 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.
testTrafficRoute (dict) --
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can happen while test traffic is served during a deployment.
listenerArns (list) --
The 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.
lastSuccessfulDeployment (dict) --
Information about the most recent successful deployment to the deployment group.
deploymentId (string) --
The unique ID of a deployment.
status (string) --
The status of the most recent deployment.
endTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group completed.
createTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group started.
lastAttemptedDeployment (dict) --
Information about the most recent attempted deployment to the deployment group.
deploymentId (string) --
The unique ID of a deployment.
status (string) --
The status of the most recent deployment.
endTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group completed.
createTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group started.
ec2TagSet (dict) --
Information about groups of tags applied to an EC2 instance. The deployment group includes only EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilters.
ec2TagSetList (list) --
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
(list) --
(dict) --
Information about an EC2 tag filter.
Key (string) --
The tag filter key.
Value (string) --
The tag filter value.
Type (string) --
The tag filter type:
onPremisesTagSet (dict) --
Information about groups of tags applied to an on-premises instance. The deployment group includes only on-premises instances identified by all the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.
onPremisesTagSetList (list) --
A list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
(list) --
(dict) --
Information about an on-premises instance tag filter.
Key (string) --
The on-premises instance tag filter key.
Value (string) --
The on-premises instance tag filter value.
Type (string) --
The on-premises instance tag filter type:
computePlatform (string) --
The destination platform type for the deployment group (Lambda or Server ).
ecsServices (list) --
The target ECS services in the deployment group. This only applies to deployment groups that use the Amazon ECS compute platform. A target ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename> .
(dict) --
Contains the service and cluster names used to identify an Amazon ECS deployment's target.
serviceName (string) --
The name of the target ECS service.
clusterName (string) --
The name of the cluster that the ECS service is associated with.
errorMessage (string) --
Information about errors that may have occurred during the API call.
Note
This method works, but is considered deprecated. Use BatchGetDeploymentTargets instead.
Returns an array of instances associated with a deployment. This method works with EC2/On-premises and AWS Lambda compute platforms. The newer BatchGetDeploymentTargets works with all compute platforms.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_deployment_instances(
deploymentId='string',
instanceIds=[
'string',
]
)
[REQUIRED]
The unique ID of a deployment.
[REQUIRED]
The unique IDs of instances of the deployment.
dict
Response Syntax
{
'instancesSummary': [
{
'deploymentId': 'string',
'instanceId': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
],
'instanceType': 'Blue'|'Green'
},
],
'errorMessage': 'string'
}
Response Structure
(dict) --
Represents the output of a BatchGetDeploymentInstances operation.
instancesSummary (list) --
Information about the instance.
(dict) --
Information about an instance in a deployment.
deploymentId (string) --
The unique ID of a deployment.
instanceId (string) --
The instance ID.
status (string) --
The deployment status for this instance:
lastUpdatedAt (datetime) --
A timestamp indicating when the instance information was last updated.
lifecycleEvents (list) --
A list of lifecycle events for this instance.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
instanceType (string) --
Information about which environment an instance belongs to in a blue/green deployment.
errorMessage (string) --
Information about errors that may have occurred during the API call.
Returns an array of targets associated with a deployment. This method works with all compute types and should be used instead of the deprecated BatchGetDeploymentInstances .
The type of targets returned depends on the deployment's compute platform:
See also: AWS API Documentation
Request Syntax
response = client.batch_get_deployment_targets(
deploymentId='string',
targetIds=[
'string',
]
)
The unique IDs of the deployment targets. The compute platform of the deployment determines the type of the targets and their formats.
dict
Response Syntax
{
'deploymentTargets': [
{
'deploymentTargetType': 'InstanceTarget'|'LambdaTarget'|'ECSTarget',
'instanceTarget': {
'deploymentId': 'string',
'targetId': 'string',
'targetArn': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
],
'instanceLabel': 'Blue'|'Green'
},
'lambdaTarget': {
'deploymentId': 'string',
'targetId': 'string',
'targetArn': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
]
},
'ecsTarget': {
'deploymentId': 'string',
'targetId': 'string',
'targetArn': 'string',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
],
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'taskSetsInfo': [
{
'identifer': 'string',
'desiredCount': 123,
'pendingCount': 123,
'runningCount': 123,
'status': 'string',
'trafficWeight': 123.0,
'targetGroup': {
'name': 'string'
},
'taskSetLabel': 'Blue'|'Green'
},
]
}
},
]
}
Response Structure
(dict) --
deploymentTargets (list) --
A list of target objects for a deployment. Each target object contains details about the target, such as its status and lifecycle events. The type of the target objects depends on the deployment' compute platform.
(dict) --
Information about the deployment target.
deploymentTargetType (string) --
The deployment type which is specific to the deployment's compute platform.
instanceTarget (dict) --
Information about the target for a deployment that uses the EC2/On-premises compute platform.
deploymentId (string) --
The unique ID of a deployment.
targetId (string) --
The unique ID of a deployment target that has a type of instanceTarget .
targetArn (string) --
The ARN of the target.
status (string) --
The status an EC2/On-premises deployment's target instance.
lastUpdatedAt (datetime) --
The date and time when the target instance was updated by a deployment.
lifecycleEvents (list) --
The lifecycle events of the deployment to this target instance.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
instanceLabel (string) --
A label that identifies whether the instance is an original target (BLUE ) or a replacement target (GREEN ).
lambdaTarget (dict) --
Information about the target for a deployment that uses the AWS Lambda compute platform.
deploymentId (string) --
The unique ID of a deployment.
targetId (string) --
The unique ID of a deployment target that has a type of lambdaTarget .
targetArn (string) --
The ARN of the target.
status (string) --
The status an AWS Lambda deployment's target Lambda function.
lastUpdatedAt (datetime) --
The date and time when the target Lambda function was updated by a deployment.
lifecycleEvents (list) --
The lifecycle events of the deployment to this target Lambda function.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
ecsTarget (dict) --
Information about the target for a deployment that uses the Amazon ECS compute platform.
deploymentId (string) --
The unique ID of a deployment.
targetId (string) --
The unique ID of a deployment target that has a type of ecsTarget .
targetArn (string) --
The ARN of the target.
lastUpdatedAt (datetime) --
The date and time when the target Amazon ECS application was updated by a deployment.
lifecycleEvents (list) --
The lifecycle events of the deployment to this target Amazon ECS application.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
status (string) --
The status an Amazon ECS deployment's target ECS application.
taskSetsInfo (list) --
The ECSTaskSet objects associated with the ECS target.
(dict) --
A set of Amazon ECS tasks. A task set runs a specified number of instances of a task definition simultaneously inside an Amazon ECS service. Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic or not.
identifer (string) --
A unique ID of an ECSTaskSet .
desiredCount (integer) --
The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy asks Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After the updated task set is created, CodeDeploy shifts traffic to the new task set.
pendingCount (integer) --
The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time, or when it is restarted after being in the STOPPED state.
runningCount (integer) --
The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. A task in the RUNNING state is running and ready for use.
status (string) --
The status of the task set. There are three valid task set statuses:
trafficWeight (float) --
The percentage of traffic served by this task set.
targetGroup (dict) --
The target group associated with the task set. The target group is used by AWS CodeDeploy to manage traffic to a task set.
name (string) --
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
taskSetLabel (string) --
A label that identifies whether the ECS task set is an original target (BLUE ) or a replacement target (GREEN ).
Gets information about one or more deployments.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_deployments(
deploymentIds=[
'string',
]
)
[REQUIRED]
A list of deployment IDs, separated by spaces.
{
'deploymentsInfo': [
{
'applicationName': 'string',
'deploymentGroupName': 'string',
'deploymentConfigName': 'string',
'deploymentId': 'string',
'previousRevision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'revision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
'errorInformation': {
'code': 'DEPLOYMENT_GROUP_MISSING'|'APPLICATION_MISSING'|'REVISION_MISSING'|'IAM_ROLE_MISSING'|'IAM_ROLE_PERMISSIONS'|'NO_EC2_SUBSCRIPTION'|'OVER_MAX_INSTANCES'|'NO_INSTANCES'|'TIMEOUT'|'HEALTH_CONSTRAINTS_INVALID'|'HEALTH_CONSTRAINTS'|'INTERNAL_ERROR'|'THROTTLED'|'ALARM_ACTIVE'|'AGENT_ISSUE'|'AUTO_SCALING_IAM_ROLE_PERMISSIONS'|'AUTO_SCALING_CONFIGURATION'|'MANUAL_STOP'|'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION'|'MISSING_ELB_INFORMATION'|'MISSING_GITHUB_TOKEN'|'ELASTIC_LOAD_BALANCING_INVALID'|'ELB_INVALID_INSTANCE'|'INVALID_LAMBDA_CONFIGURATION'|'INVALID_LAMBDA_FUNCTION'|'HOOK_EXECUTION_FAILURE'|'AUTOSCALING_VALIDATION_ERROR'|'INVALID_ECS_SERVICE'|'ECS_UPDATE_ERROR'|'INVALID_REVISION',
'message': 'string'
},
'createTime': datetime(2015, 1, 1),
'startTime': datetime(2015, 1, 1),
'completeTime': datetime(2015, 1, 1),
'deploymentOverview': {
'Pending': 123,
'InProgress': 123,
'Succeeded': 123,
'Failed': 123,
'Skipped': 123,
'Ready': 123
},
'description': 'string',
'creator': 'user'|'autoscaling'|'codeDeployRollback',
'ignoreApplicationStopFailures': True|False,
'autoRollbackConfiguration': {
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
'updateOutdatedInstancesOnly': True|False,
'rollbackInfo': {
'rollbackDeploymentId': 'string',
'rollbackTriggeringDeploymentId': 'string',
'rollbackMessage': 'string'
},
'deploymentStyle': {
'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
},
'targetInstances': {
'tagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'autoScalingGroups': [
'string',
],
'ec2TagSet': {
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
}
},
'instanceTerminationWaitTimeStarted': True|False,
'blueGreenDeploymentConfiguration': {
'terminateBlueInstancesOnDeploymentSuccess': {
'action': 'TERMINATE'|'KEEP_ALIVE',
'terminationWaitTimeInMinutes': 123
},
'deploymentReadyOption': {
'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
'waitTimeInMinutes': 123
},
'greenFleetProvisioningOption': {
'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
}
},
'loadBalancerInfo': {
'elbInfoList': [
{
'name': 'string'
},
],
'targetGroupInfoList': [
{
'name': 'string'
},
],
'targetGroupPairInfoList': [
{
'targetGroups': [
{
'name': 'string'
},
],
'prodTrafficRoute': {
'listenerArns': [
'string',
]
},
'testTrafficRoute': {
'listenerArns': [
'string',
]
}
},
]
},
'additionalDeploymentStatusInfo': 'string',
'fileExistsBehavior': 'DISALLOW'|'OVERWRITE'|'RETAIN',
'deploymentStatusMessages': [
'string',
],
'computePlatform': 'Server'|'Lambda'|'ECS'
},
]
}
Response Structure
Represents the output of a BatchGetDeployments operation.
Information about the deployments.
Information about a deployment.
The application name.
The deployment group name.
The deployment configuration name.
The unique ID of a deployment.
Information about the application revision that was deployed to the deployment group before the most recent successful deployment.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
Information about the location of stored application artifacts and the service from which to retrieve them.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
The current state of the deployment as a whole.
Information about any error associated with this deployment.
For information about additional error codes, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide .
The error code:
An accompanying error message.
A timestamp indicating when the deployment was created.
A timestamp indicating when the deployment was deployed to the deployment group.
In some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of back-end servers that participate in the deployment process.
A timestamp indicating when the deployment was complete.
A summary of the deployment status of the instances in the deployment.
The number of instances in the deployment in a pending state.
The number of instances in which the deployment is in progress.
The number of instances in the deployment to which revisions have been successfully deployed.
The number of instances in the deployment in a failed state.
The number of instances in the deployment in a skipped state.
The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.
A comment about the deployment.
The means by which the deployment was created:
If true, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will not be considered to have failed at that point and will continue on to the BeforeInstall deployment lifecycle event.
If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.
Information about the automatic rollback configuration associated with the deployment.
Indicates whether a defined automatic rollback configuration is currently enabled.
The event type or types that trigger a rollback.
Indicates whether only instances that are not running the latest application revision are to be deployed to.
Information about a deployment rollback.
The ID of the deployment rollback.
The deployment ID of the deployment that was underway and triggered a rollback deployment because it failed or was stopped.
Information describing the status of a deployment rollback; for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded.
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.
Indicates whether to run an in-place deployment or a blue/green deployment.
Indicates whether to route deployment traffic behind a load balancer.
Information about the instances that belong to the replacement environment in a blue/green deployment.
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.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
Information about the groups of 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.
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
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.
Information about blue/green deployment options for this deployment.
Information about whether to terminate instances in the original fleet during a blue/green deployment.
The action to take on instances in the original environment after a successful blue/green deployment.
The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
Information about how instances are provisioned for a replacement environment in a blue/green deployment.
The method used to add instances to a replacement environment.
Information about the load balancer used in the deployment.
An array containing 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.
Note
Adding more than one load balancer to the array is not supported.
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.
For blue/green deployments, the name of the load balancer that will be 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 completes.
An array containing 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.
Note
Adding more than one target group to the array is not supported.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
Information about two target groups and how traffic routes during an Amazon ECS deployment. An optional test traffic route can be specified.
One pair of target groups. One is associated with the original task set. The second target is associated with the task set that serves traffic after the deployment completes.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
The 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.
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can happen while test traffic is served during a deployment.
The 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.
Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.
Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.
Messages that contain information about the status of a deployment.
The destination platform type for the deployment (Lambda or Server ).
Gets information about one or more on-premises instances.
See also: AWS API Documentation
Request Syntax
response = client.batch_get_on_premises_instances(
instanceNames=[
'string',
]
)
[REQUIRED]
The names of the on-premises instances about which to get information.
{
'instanceInfos': [
{
'instanceName': 'string',
'iamSessionArn': 'string',
'iamUserArn': 'string',
'instanceArn': 'string',
'registerTime': datetime(2015, 1, 1),
'deregisterTime': datetime(2015, 1, 1),
'tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
}
Response Structure
Represents the output of a BatchGetOnPremisesInstances operation.
Information about the on-premises instances.
Information about an on-premises instance.
The name of the on-premises instance.
The ARN of the IAM session associated with the on-premises instance.
The IAM user ARN associated with the on-premises instance.
The ARN of the on-premises instance.
The time at which the on-premises instance was registered.
If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.
The tags currently associated with the on-premises instance.
Information about a tag.
The tag's key.
The tag's value.
Check if an operation can be paginated.
For a blue/green deployment, starts the process of rerouting traffic from instances in the original environment to instances in the replacement environment without waiting for a specified wait time to elapse. (Traffic rerouting, which is achieved by registering instances in the replacement environment with the load balancer, can start as soon as all instances have a status of Ready.)
See also: AWS API Documentation
Request Syntax
response = client.continue_deployment(
deploymentId='string',
deploymentWaitType='READY_WAIT'|'TERMINATION_WAIT'
)
None
Creates an application.
See also: AWS API Documentation
Request Syntax
response = client.create_application(
applicationName='string',
computePlatform='Server'|'Lambda'|'ECS'
)
[REQUIRED]
The name of the application. This name must be unique with the applicable IAM user or AWS account.
dict
Response Syntax
{
'applicationId': 'string'
}
Response Structure
(dict) --
Represents the output of a CreateApplication operation.
applicationId (string) --
A unique application ID.
Deploys an application revision through the specified deployment group.
See also: AWS API Documentation
Request Syntax
response = client.create_deployment(
applicationName='string',
deploymentGroupName='string',
revision={
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
deploymentConfigName='string',
description='string',
ignoreApplicationStopFailures=True|False,
targetInstances={
'tagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'autoScalingGroups': [
'string',
],
'ec2TagSet': {
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
}
},
autoRollbackConfiguration={
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
updateOutdatedInstancesOnly=True|False,
fileExistsBehavior='DISALLOW'|'OVERWRITE'|'RETAIN'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
The type and location of the revision to deploy.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
The name of a deployment configuration associated with the applicable IAM user or AWS account.
If not specified, the value configured in the deployment group will be used as the default. If the deployment group does not have a deployment configuration associated with it, then CodeDeployDefault.OneAtATime will be used by default.
If set to true, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will not be considered to have failed at that point and will continue on to the BeforeInstall deployment lifecycle event.
If set to false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to an instance, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.
Information about the instances that will belong to the replacement environment in a blue/green deployment.
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.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
Information about the groups of 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.
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
Configuration information for an automatic rollback that is added when a deployment is created.
Indicates whether a defined automatic rollback configuration is currently enabled.
The event type or types that trigger a rollback.
Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.
The fileExistsBehavior parameter takes any of the following values:
dict
Response Syntax
{
'deploymentId': 'string'
}
Response Structure
(dict) --
Represents the output of a CreateDeployment operation.
deploymentId (string) --
The unique ID of a deployment.
Creates a deployment configuration.
See also: AWS API Documentation
Request Syntax
response = client.create_deployment_config(
deploymentConfigName='string',
minimumHealthyHosts={
'value': 123,
'type': 'HOST_COUNT'|'FLEET_PERCENT'
},
trafficRoutingConfig={
'type': 'TimeBasedCanary'|'TimeBasedLinear'|'AllAtOnce',
'timeBasedCanary': {
'canaryPercentage': 123,
'canaryInterval': 123
},
'timeBasedLinear': {
'linearPercentage': 123,
'linearInterval': 123
}
},
computePlatform='Server'|'Lambda'|'ECS'
)
[REQUIRED]
The name of the deployment configuration to create.
The minimum number of healthy instances that should be available at any time during the deployment. There are two parameters expected in the input: type and value.
The type parameter takes either of the following values:
The value parameter takes an integer.
For example, to set a minimum of 95% healthy instance, specify a type of FLEET_PERCENT and a value of 95.
The minimum healthy instance value.
The minimum healthy instance type:
In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment will be successful if six or more instances are deployed to successfully; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment will be successful if four or more instance are deployed to successfully; otherwise, the deployment fails.
Note
In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy will try to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment still succeeds.
For more information, see AWS CodeDeploy Instance Health in the AWS CodeDeploy User Guide .
The configuration that specifies how the deployment traffic will be routed.
The type of traffic shifting (TimeBasedCanary or TimeBasedLinear ) used by a deployment configuration .
A configuration that shifts traffic from one version of a Lambda function to another in two increments. The original and target Lambda function versions are specified in the deployment's AppSpec file.
The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.
The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.
A configuration that shifts traffic from one version of a Lambda function to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions are specified in the deployment's AppSpec file.
The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.
The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.
dict
Response Syntax
{
'deploymentConfigId': 'string'
}
Response Structure
(dict) --
Represents the output of a CreateDeploymentConfig operation.
deploymentConfigId (string) --
A unique deployment configuration ID.
Creates a deployment group to which application revisions will be deployed.
See also: AWS API Documentation
Request Syntax
response = client.create_deployment_group(
applicationName='string',
deploymentGroupName='string',
deploymentConfigName='string',
ec2TagFilters=[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
onPremisesInstanceTagFilters=[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
autoScalingGroups=[
'string',
],
serviceRoleArn='string',
triggerConfigurations=[
{
'triggerName': 'string',
'triggerTargetArn': 'string',
'triggerEvents': [
'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
]
},
],
alarmConfiguration={
'enabled': True|False,
'ignorePollAlarmFailure': True|False,
'alarms': [
{
'name': 'string'
},
]
},
autoRollbackConfiguration={
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
deploymentStyle={
'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
},
blueGreenDeploymentConfiguration={
'terminateBlueInstancesOnDeploymentSuccess': {
'action': 'TERMINATE'|'KEEP_ALIVE',
'terminationWaitTimeInMinutes': 123
},
'deploymentReadyOption': {
'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
'waitTimeInMinutes': 123
},
'greenFleetProvisioningOption': {
'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
}
},
loadBalancerInfo={
'elbInfoList': [
{
'name': 'string'
},
],
'targetGroupInfoList': [
{
'name': 'string'
},
],
'targetGroupPairInfoList': [
{
'targetGroups': [
{
'name': 'string'
},
],
'prodTrafficRoute': {
'listenerArns': [
'string',
]
},
'testTrafficRoute': {
'listenerArns': [
'string',
]
}
},
]
},
ec2TagSet={
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
},
ecsServices=[
{
'serviceName': 'string',
'clusterName': 'string'
},
],
onPremisesTagSet={
'onPremisesTagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
}
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
[REQUIRED]
The name of a new deployment group for the specified application.
If specified, the deployment configuration name can be either one of the predefined configurations provided with AWS CodeDeploy or a custom deployment configuration that you create by calling the create deployment configuration operation.
CodeDeployDefault.OneAtATime is the default deployment configuration. It is used if a configuration isn't specified for the deployment or the deployment group.
For more information about the predefined deployment configurations in AWS CodeDeploy, see Working with Deployment Groups in AWS CodeDeploy in the AWS CodeDeploy User Guide.
The Amazon EC2 tags on which to filter. The deployment group will include EC2 instances with any of the specified tags. Cannot be used in the same call as ec2TagSet.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The on-premises instance tags on which to filter. The deployment group will include on-premises instances with any of the specified tags. Cannot be used in the same call as OnPremisesTagSet.
Information about an on-premises instance tag filter.
The on-premises instance tag filter key.
The on-premises instance tag filter value.
The on-premises instance tag filter type:
A list of associated Auto Scaling groups.
[REQUIRED]
A service role ARN that allows AWS CodeDeploy to act on the user's behalf when interacting with AWS services.
Information about triggers to create when the deployment group is created. For examples, see Create a Trigger for an AWS CodeDeploy Event in the AWS CodeDeploy User Guide.
Information about notification triggers for the deployment group.
The name of the notification trigger.
The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.
The event type or types for which notifications are triggered.
Information to add about Amazon CloudWatch alarms when the deployment group is created.
Indicates whether the alarm configuration is enabled.
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.
A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.
Information about an alarm.
The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.
Configuration information for an automatic rollback that is added when a deployment group is created.
Indicates whether a defined automatic rollback configuration is currently enabled.
The event type or types that trigger a rollback.
Information about the type of deployment, in-place or blue/green, that you want to run and whether to route deployment traffic behind a load balancer.
Indicates whether to run an in-place deployment or a blue/green deployment.
Indicates whether to route deployment traffic behind a load balancer.
Information about blue/green deployment options for a deployment group.
Information about whether to terminate instances in the original fleet during a blue/green deployment.
The action to take on instances in the original environment after a successful blue/green deployment.
The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
Information about how instances are provisioned for a replacement environment in a blue/green deployment.
The method used to add instances to a replacement environment.
Information about the load balancer used in a deployment.
An array containing 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.
Note
Adding more than one load balancer to the array is not supported.
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.
For blue/green deployments, the name of the load balancer that will be 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 completes.
An array containing 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.
Note
Adding more than one target group to the array is not supported.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
Information about two target groups and how traffic routes during an Amazon ECS deployment. An optional test traffic route can be specified.
One pair of target groups. One is associated with the original task set. The second target is associated with the task set that serves traffic after the deployment completes.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
The 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.
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can happen while test traffic is served during a deployment.
The 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.
Information about groups of tags applied to EC2 instances. The deployment group will include only EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilters.
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The target ECS services in the deployment group. This only applies to deployment groups that use the Amazon ECS compute platform. A target ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename> .
Contains the service and cluster names used to identify an Amazon ECS deployment's target.
The name of the target ECS service.
The name of the cluster that the ECS service is associated with.
Information about groups of tags applied to on-premises instances. The deployment group will include only on-premises instances identified by all the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.
A list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an on-premises instance tag filter.
The on-premises instance tag filter key.
The on-premises instance tag filter value.
The on-premises instance tag filter type:
dict
Response Syntax
{
'deploymentGroupId': 'string'
}
Response Structure
(dict) --
Represents the output of a CreateDeploymentGroup operation.
deploymentGroupId (string) --
A unique deployment group ID.
Deletes an application.
See also: AWS API Documentation
Request Syntax
response = client.delete_application(
applicationName='string'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
Deletes a deployment configuration.
Note
A deployment configuration cannot be deleted if it is currently in use. Predefined configurations cannot be deleted.
See also: AWS API Documentation
Request Syntax
response = client.delete_deployment_config(
deploymentConfigName='string'
)
[REQUIRED]
The name of a deployment configuration associated with the applicable IAM user or AWS account.
Deletes a deployment group.
See also: AWS API Documentation
Request Syntax
response = client.delete_deployment_group(
applicationName='string',
deploymentGroupName='string'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
[REQUIRED]
The name of an existing deployment group for the specified application.
dict
Response Syntax
{
'hooksNotCleanedUp': [
{
'name': 'string',
'hook': 'string'
},
]
}
Response Structure
(dict) --
Represents the output of a DeleteDeploymentGroup operation.
hooksNotCleanedUp (list) --
If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, AWS CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group. If the output contains data, AWS CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group.
(dict) --
Information about an Auto Scaling group.
name (string) --
The Auto Scaling group name.
hook (string) --
An Auto Scaling lifecycle event hook name.
Deletes a GitHub account connection.
See also: AWS API Documentation
Request Syntax
response = client.delete_git_hub_account_token(
tokenName='string'
)
{
'tokenName': 'string'
}
Response Structure
Represents the output of a DeleteGitHubAccountToken operation.
The name of the GitHub account connection that was deleted.
Deregisters an on-premises instance.
See also: AWS API Documentation
Request Syntax
response = client.deregister_on_premises_instance(
instanceName='string'
)
[REQUIRED]
The name of the on-premises instance to deregister.
Generate a presigned url given a client, its method, and arguments
The presigned url
Gets information about an application.
See also: AWS API Documentation
Request Syntax
response = client.get_application(
applicationName='string'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
{
'application': {
'applicationId': 'string',
'applicationName': 'string',
'createTime': datetime(2015, 1, 1),
'linkedToGitHub': True|False,
'gitHubAccountName': 'string',
'computePlatform': 'Server'|'Lambda'|'ECS'
}
}
Response Structure
Represents the output of a GetApplication operation.
Information about the application.
The application ID.
The application name.
The time at which the application was created.
True if the user has authenticated with GitHub for the specified application; otherwise, false.
The name for a connection to a GitHub account.
The destination platform type for deployment of the application (Lambda or Server ).
Gets information about an application revision.
See also: AWS API Documentation
Request Syntax
response = client.get_application_revision(
applicationName='string',
revision={
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
}
)
[REQUIRED]
The name of the application that corresponds to the revision.
[REQUIRED]
Information about the application revision to get, including type and location.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
dict
Response Syntax
{
'applicationName': 'string',
'revision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'revisionInfo': {
'description': 'string',
'deploymentGroups': [
'string',
],
'firstUsedTime': datetime(2015, 1, 1),
'lastUsedTime': datetime(2015, 1, 1),
'registerTime': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
Represents the output of a GetApplicationRevision operation.
applicationName (string) --
The name of the application that corresponds to the revision.
revision (dict) --
Additional information about the revision, including type and location.
revisionType (string) --
The type of application revision:
s3Location (dict) --
Information about the location of a revision stored in Amazon S3.
bucket (string) --
The name of the Amazon S3 bucket where the application revision is stored.
key (string) --
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
bundleType (string) --
The file type of the application revision. Must be one of the following:
version (string) --
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 will use the most recent version by default.
eTag (string) --
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 will be skipped.
gitHubLocation (dict) --
Information about the location of application artifacts stored in GitHub.
repository (string) --
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 (string) --
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
string (dict) --
Information about the location of an AWS Lambda deployment revision stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
sha256 (string) --
The SHA256 hash value of the revision content.
appSpecContent (dict) --
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
sha256 (string) --
The SHA256 hash value of the revision content.
revisionInfo (dict) --
General information about the revision.
description (string) --
A comment about the revision.
deploymentGroups (list) --
The deployment groups for which this is the current target revision.
firstUsedTime (datetime) --
When the revision was first used by AWS CodeDeploy.
lastUsedTime (datetime) --
When the revision was last used by AWS CodeDeploy.
registerTime (datetime) --
When the revision was registered with AWS CodeDeploy.
Gets information about a deployment.
See also: AWS API Documentation
Request Syntax
response = client.get_deployment(
deploymentId='string'
)
[REQUIRED]
The unique ID of a deployment associated with the applicable IAM user or AWS account.
{
'deploymentInfo': {
'applicationName': 'string',
'deploymentGroupName': 'string',
'deploymentConfigName': 'string',
'deploymentId': 'string',
'previousRevision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'revision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
'errorInformation': {
'code': 'DEPLOYMENT_GROUP_MISSING'|'APPLICATION_MISSING'|'REVISION_MISSING'|'IAM_ROLE_MISSING'|'IAM_ROLE_PERMISSIONS'|'NO_EC2_SUBSCRIPTION'|'OVER_MAX_INSTANCES'|'NO_INSTANCES'|'TIMEOUT'|'HEALTH_CONSTRAINTS_INVALID'|'HEALTH_CONSTRAINTS'|'INTERNAL_ERROR'|'THROTTLED'|'ALARM_ACTIVE'|'AGENT_ISSUE'|'AUTO_SCALING_IAM_ROLE_PERMISSIONS'|'AUTO_SCALING_CONFIGURATION'|'MANUAL_STOP'|'MISSING_BLUE_GREEN_DEPLOYMENT_CONFIGURATION'|'MISSING_ELB_INFORMATION'|'MISSING_GITHUB_TOKEN'|'ELASTIC_LOAD_BALANCING_INVALID'|'ELB_INVALID_INSTANCE'|'INVALID_LAMBDA_CONFIGURATION'|'INVALID_LAMBDA_FUNCTION'|'HOOK_EXECUTION_FAILURE'|'AUTOSCALING_VALIDATION_ERROR'|'INVALID_ECS_SERVICE'|'ECS_UPDATE_ERROR'|'INVALID_REVISION',
'message': 'string'
},
'createTime': datetime(2015, 1, 1),
'startTime': datetime(2015, 1, 1),
'completeTime': datetime(2015, 1, 1),
'deploymentOverview': {
'Pending': 123,
'InProgress': 123,
'Succeeded': 123,
'Failed': 123,
'Skipped': 123,
'Ready': 123
},
'description': 'string',
'creator': 'user'|'autoscaling'|'codeDeployRollback',
'ignoreApplicationStopFailures': True|False,
'autoRollbackConfiguration': {
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
'updateOutdatedInstancesOnly': True|False,
'rollbackInfo': {
'rollbackDeploymentId': 'string',
'rollbackTriggeringDeploymentId': 'string',
'rollbackMessage': 'string'
},
'deploymentStyle': {
'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
},
'targetInstances': {
'tagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'autoScalingGroups': [
'string',
],
'ec2TagSet': {
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
}
},
'instanceTerminationWaitTimeStarted': True|False,
'blueGreenDeploymentConfiguration': {
'terminateBlueInstancesOnDeploymentSuccess': {
'action': 'TERMINATE'|'KEEP_ALIVE',
'terminationWaitTimeInMinutes': 123
},
'deploymentReadyOption': {
'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
'waitTimeInMinutes': 123
},
'greenFleetProvisioningOption': {
'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
}
},
'loadBalancerInfo': {
'elbInfoList': [
{
'name': 'string'
},
],
'targetGroupInfoList': [
{
'name': 'string'
},
],
'targetGroupPairInfoList': [
{
'targetGroups': [
{
'name': 'string'
},
],
'prodTrafficRoute': {
'listenerArns': [
'string',
]
},
'testTrafficRoute': {
'listenerArns': [
'string',
]
}
},
]
},
'additionalDeploymentStatusInfo': 'string',
'fileExistsBehavior': 'DISALLOW'|'OVERWRITE'|'RETAIN',
'deploymentStatusMessages': [
'string',
],
'computePlatform': 'Server'|'Lambda'|'ECS'
}
}
Response Structure
Represents the output of a GetDeployment operation.
Information about the deployment.
The application name.
The deployment group name.
The deployment configuration name.
The unique ID of a deployment.
Information about the application revision that was deployed to the deployment group before the most recent successful deployment.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
Information about the location of stored application artifacts and the service from which to retrieve them.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
The current state of the deployment as a whole.
Information about any error associated with this deployment.
For information about additional error codes, see Error Codes for AWS CodeDeploy in the AWS CodeDeploy User Guide .
The error code:
An accompanying error message.
A timestamp indicating when the deployment was created.
A timestamp indicating when the deployment was deployed to the deployment group.
In some cases, the reported value of the start time may be later than the complete time. This is due to differences in the clock settings of back-end servers that participate in the deployment process.
A timestamp indicating when the deployment was complete.
A summary of the deployment status of the instances in the deployment.
The number of instances in the deployment in a pending state.
The number of instances in which the deployment is in progress.
The number of instances in the deployment to which revisions have been successfully deployed.
The number of instances in the deployment in a failed state.
The number of instances in the deployment in a skipped state.
The number of instances in a replacement environment ready to receive traffic in a blue/green deployment.
A comment about the deployment.
The means by which the deployment was created:
If true, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will not be considered to have failed at that point and will continue on to the BeforeInstall deployment lifecycle event.
If false or not specified, then if the deployment causes the ApplicationStop deployment lifecycle event to an instance to fail, the deployment to that instance will stop, and the deployment to that instance will be considered to have failed.
Information about the automatic rollback configuration associated with the deployment.
Indicates whether a defined automatic rollback configuration is currently enabled.
The event type or types that trigger a rollback.
Indicates whether only instances that are not running the latest application revision are to be deployed to.
Information about a deployment rollback.
The ID of the deployment rollback.
The deployment ID of the deployment that was underway and triggered a rollback deployment because it failed or was stopped.
Information describing the status of a deployment rollback; for example, whether the deployment can't be rolled back, is in progress, failed, or succeeded.
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.
Indicates whether to run an in-place deployment or a blue/green deployment.
Indicates whether to route deployment traffic behind a load balancer.
Information about the instances that belong to the replacement environment in a blue/green deployment.
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.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The names of one or more Auto Scaling groups to identify a replacement environment for a blue/green deployment.
Information about the groups of 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.
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
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.
Information about blue/green deployment options for this deployment.
Information about whether to terminate instances in the original fleet during a blue/green deployment.
The action to take on instances in the original environment after a successful blue/green deployment.
The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
Information about how instances are provisioned for a replacement environment in a blue/green deployment.
The method used to add instances to a replacement environment.
Information about the load balancer used in the deployment.
An array containing 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.
Note
Adding more than one load balancer to the array is not supported.
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.
For blue/green deployments, the name of the load balancer that will be 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 completes.
An array containing 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.
Note
Adding more than one target group to the array is not supported.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
Information about two target groups and how traffic routes during an Amazon ECS deployment. An optional test traffic route can be specified.
One pair of target groups. One is associated with the original task set. The second target is associated with the task set that serves traffic after the deployment completes.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
The 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.
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can happen while test traffic is served during a deployment.
The 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.
Provides information about the results of a deployment, such as whether instances in the original environment in a blue/green deployment were not terminated.
Information about how AWS CodeDeploy handles files that already exist in a deployment target location but weren't part of the previous successful deployment.
Messages that contain information about the status of a deployment.
The destination platform type for the deployment (Lambda or Server ).
Gets information about a deployment configuration.
See also: AWS API Documentation
Request Syntax
response = client.get_deployment_config(
deploymentConfigName='string'
)
[REQUIRED]
The name of a deployment configuration associated with the applicable IAM user or AWS account.
{
'deploymentConfigInfo': {
'deploymentConfigId': 'string',
'deploymentConfigName': 'string',
'minimumHealthyHosts': {
'value': 123,
'type': 'HOST_COUNT'|'FLEET_PERCENT'
},
'createTime': datetime(2015, 1, 1),
'computePlatform': 'Server'|'Lambda'|'ECS',
'trafficRoutingConfig': {
'type': 'TimeBasedCanary'|'TimeBasedLinear'|'AllAtOnce',
'timeBasedCanary': {
'canaryPercentage': 123,
'canaryInterval': 123
},
'timeBasedLinear': {
'linearPercentage': 123,
'linearInterval': 123
}
}
}
}
Response Structure
Represents the output of a GetDeploymentConfig operation.
Information about the deployment configuration.
The deployment configuration ID.
The deployment configuration name.
Information about the number or percentage of minimum healthy instance.
The minimum healthy instance value.
The minimum healthy instance type:
In an example of nine instance, if a HOST_COUNT of six is specified, deploy to up to three instances at a time. The deployment will be successful if six or more instances are deployed to successfully; otherwise, the deployment fails. If a FLEET_PERCENT of 40 is specified, deploy to up to five instance at a time. The deployment will be successful if four or more instance are deployed to successfully; otherwise, the deployment fails.
Note
In a call to the get deployment configuration operation, CodeDeployDefault.OneAtATime will return a minimum healthy instance type of MOST_CONCURRENCY and a value of 1. This means a deployment to only one instance at a time. (You cannot set the type to MOST_CONCURRENCY, only to HOST_COUNT or FLEET_PERCENT.) In addition, with CodeDeployDefault.OneAtATime, AWS CodeDeploy will try to ensure that all instances but one are kept in a healthy state during the deployment. Although this allows one instance at a time to be taken offline for a new deployment, it also means that if the deployment to the last instance fails, the overall deployment still succeeds.
For more information, see AWS CodeDeploy Instance Health in the AWS CodeDeploy User Guide .
The time at which the deployment configuration was created.
The destination platform type for the deployment (Lambda or Server ).
The configuration specifying how the deployment traffic will be routed. Only deployments with a Lambda compute platform can specify this.
The type of traffic shifting (TimeBasedCanary or TimeBasedLinear ) used by a deployment configuration .
A configuration that shifts traffic from one version of a Lambda function to another in two increments. The original and target Lambda function versions are specified in the deployment's AppSpec file.
The percentage of traffic to shift in the first increment of a TimeBasedCanary deployment.
The number of minutes between the first and second traffic shifts of a TimeBasedCanary deployment.
A configuration that shifts traffic from one version of a Lambda function to another in equal increments, with an equal number of minutes between each increment. The original and target Lambda function versions are specified in the deployment's AppSpec file.
The percentage of traffic that is shifted at the start of each increment of a TimeBasedLinear deployment.
The number of minutes between each incremental traffic shift of a TimeBasedLinear deployment.
Gets information about a deployment group.
See also: AWS API Documentation
Request Syntax
response = client.get_deployment_group(
applicationName='string',
deploymentGroupName='string'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
[REQUIRED]
The name of an existing deployment group for the specified application.
dict
Response Syntax
{
'deploymentGroupInfo': {
'applicationName': 'string',
'deploymentGroupId': 'string',
'deploymentGroupName': 'string',
'deploymentConfigName': 'string',
'ec2TagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'onPremisesInstanceTagFilters': [
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
'autoScalingGroups': [
{
'name': 'string',
'hook': 'string'
},
],
'serviceRoleArn': 'string',
'targetRevision': {
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
'triggerConfigurations': [
{
'triggerName': 'string',
'triggerTargetArn': 'string',
'triggerEvents': [
'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
]
},
],
'alarmConfiguration': {
'enabled': True|False,
'ignorePollAlarmFailure': True|False,
'alarms': [
{
'name': 'string'
},
]
},
'autoRollbackConfiguration': {
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
'deploymentStyle': {
'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
},
'blueGreenDeploymentConfiguration': {
'terminateBlueInstancesOnDeploymentSuccess': {
'action': 'TERMINATE'|'KEEP_ALIVE',
'terminationWaitTimeInMinutes': 123
},
'deploymentReadyOption': {
'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
'waitTimeInMinutes': 123
},
'greenFleetProvisioningOption': {
'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
}
},
'loadBalancerInfo': {
'elbInfoList': [
{
'name': 'string'
},
],
'targetGroupInfoList': [
{
'name': 'string'
},
],
'targetGroupPairInfoList': [
{
'targetGroups': [
{
'name': 'string'
},
],
'prodTrafficRoute': {
'listenerArns': [
'string',
]
},
'testTrafficRoute': {
'listenerArns': [
'string',
]
}
},
]
},
'lastSuccessfulDeployment': {
'deploymentId': 'string',
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
'endTime': datetime(2015, 1, 1),
'createTime': datetime(2015, 1, 1)
},
'lastAttemptedDeployment': {
'deploymentId': 'string',
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
'endTime': datetime(2015, 1, 1),
'createTime': datetime(2015, 1, 1)
},
'ec2TagSet': {
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
},
'onPremisesTagSet': {
'onPremisesTagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
},
'computePlatform': 'Server'|'Lambda'|'ECS',
'ecsServices': [
{
'serviceName': 'string',
'clusterName': 'string'
},
]
}
}
Response Structure
(dict) --
Represents the output of a GetDeploymentGroup operation.
deploymentGroupInfo (dict) --
Information about the deployment group.
applicationName (string) --
The application name.
deploymentGroupId (string) --
The deployment group ID.
deploymentGroupName (string) --
The deployment group name.
deploymentConfigName (string) --
The deployment configuration name.
ec2TagFilters (list) --
The Amazon EC2 tags on which to filter. The deployment group includes EC2 instances with any of the specified tags.
(dict) --
Information about an EC2 tag filter.
Key (string) --
The tag filter key.
Value (string) --
The tag filter value.
Type (string) --
The tag filter type:
onPremisesInstanceTagFilters (list) --
The on-premises instance tags on which to filter. The deployment group includes on-premises instances with any of the specified tags.
(dict) --
Information about an on-premises instance tag filter.
Key (string) --
The on-premises instance tag filter key.
Value (string) --
The on-premises instance tag filter value.
Type (string) --
The on-premises instance tag filter type:
autoScalingGroups (list) --
A list of associated Auto Scaling groups.
(dict) --
Information about an Auto Scaling group.
name (string) --
The Auto Scaling group name.
hook (string) --
An Auto Scaling lifecycle event hook name.
serviceRoleArn (string) --
A service role ARN.
targetRevision (dict) --
Information about the deployment group's target revision, including type and location.
revisionType (string) --
The type of application revision:
s3Location (dict) --
Information about the location of a revision stored in Amazon S3.
bucket (string) --
The name of the Amazon S3 bucket where the application revision is stored.
key (string) --
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
bundleType (string) --
The file type of the application revision. Must be one of the following:
version (string) --
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 will use the most recent version by default.
eTag (string) --
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 will be skipped.
gitHubLocation (dict) --
Information about the location of application artifacts stored in GitHub.
repository (string) --
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 (string) --
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
string (dict) --
Information about the location of an AWS Lambda deployment revision stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
sha256 (string) --
The SHA256 hash value of the revision content.
appSpecContent (dict) --
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
sha256 (string) --
The SHA256 hash value of the revision content.
triggerConfigurations (list) --
Information about triggers associated with the deployment group.
(dict) --
Information about notification triggers for the deployment group.
triggerName (string) --
The name of the notification trigger.
triggerTargetArn (string) --
The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.
triggerEvents (list) --
The event type or types for which notifications are triggered.
alarmConfiguration (dict) --
A list of alarms associated with the deployment group.
enabled (boolean) --
Indicates whether the alarm configuration is enabled.
ignorePollAlarmFailure (boolean) --
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.
alarms (list) --
A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.
(dict) --
Information about an alarm.
name (string) --
The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.
autoRollbackConfiguration (dict) --
Information about the automatic rollback configuration associated with the deployment group.
enabled (boolean) --
Indicates whether a defined automatic rollback configuration is currently enabled.
events (list) --
The event type or types that trigger a rollback.
deploymentStyle (dict) --
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.
deploymentType (string) --
Indicates whether to run an in-place deployment or a blue/green deployment.
deploymentOption (string) --
Indicates whether to route deployment traffic behind a load balancer.
blueGreenDeploymentConfiguration (dict) --
Information about blue/green deployment options for a deployment group.
terminateBlueInstancesOnDeploymentSuccess (dict) --
Information about whether to terminate instances in the original fleet during a blue/green deployment.
action (string) --
The action to take on instances in the original environment after a successful blue/green deployment.
terminationWaitTimeInMinutes (integer) --
The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).
deploymentReadyOption (dict) --
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
actionOnTimeout (string) --
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
waitTimeInMinutes (integer) --
The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
greenFleetProvisioningOption (dict) --
Information about how instances are provisioned for a replacement environment in a blue/green deployment.
action (string) --
The method used to add instances to a replacement environment.
loadBalancerInfo (dict) --
Information about the load balancer to use in a deployment.
elbInfoList (list) --
An array containing 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.
Note
Adding more than one load balancer to the array is not supported.
(dict) --
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.
name (string) --
For blue/green deployments, the name of the load balancer that will be 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 completes.
targetGroupInfoList (list) --
An array containing 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.
Note
Adding more than one target group to the array is not supported.
(dict) --
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
name (string) --
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
targetGroupPairInfoList (list) --
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
(dict) --
Information about two target groups and how traffic routes during an Amazon ECS deployment. An optional test traffic route can be specified.
targetGroups (list) --
One pair of target groups. One is associated with the original task set. The second target is associated with the task set that serves traffic after the deployment completes.
(dict) --
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
name (string) --
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
prodTrafficRoute (dict) --
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
listenerArns (list) --
The 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.
testTrafficRoute (dict) --
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can happen while test traffic is served during a deployment.
listenerArns (list) --
The 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.
lastSuccessfulDeployment (dict) --
Information about the most recent successful deployment to the deployment group.
deploymentId (string) --
The unique ID of a deployment.
status (string) --
The status of the most recent deployment.
endTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group completed.
createTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group started.
lastAttemptedDeployment (dict) --
Information about the most recent attempted deployment to the deployment group.
deploymentId (string) --
The unique ID of a deployment.
status (string) --
The status of the most recent deployment.
endTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group completed.
createTime (datetime) --
A timestamp indicating when the most recent deployment to the deployment group started.
ec2TagSet (dict) --
Information about groups of tags applied to an EC2 instance. The deployment group includes only EC2 instances identified by all the tag groups. Cannot be used in the same call as ec2TagFilters.
ec2TagSetList (list) --
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
(list) --
(dict) --
Information about an EC2 tag filter.
Key (string) --
The tag filter key.
Value (string) --
The tag filter value.
Type (string) --
The tag filter type:
onPremisesTagSet (dict) --
Information about groups of tags applied to an on-premises instance. The deployment group includes only on-premises instances identified by all the tag groups. Cannot be used in the same call as onPremisesInstanceTagFilters.
onPremisesTagSetList (list) --
A list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
(list) --
(dict) --
Information about an on-premises instance tag filter.
Key (string) --
The on-premises instance tag filter key.
Value (string) --
The on-premises instance tag filter value.
Type (string) --
The on-premises instance tag filter type:
computePlatform (string) --
The destination platform type for the deployment group (Lambda or Server ).
ecsServices (list) --
The target ECS services in the deployment group. This only applies to deployment groups that use the Amazon ECS compute platform. A target ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename> .
(dict) --
Contains the service and cluster names used to identify an Amazon ECS deployment's target.
serviceName (string) --
The name of the target ECS service.
clusterName (string) --
The name of the cluster that the ECS service is associated with.
Gets information about an instance as part of a deployment.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.get_deployment_instance(
deploymentId='string',
instanceId='string'
)
[REQUIRED]
The unique ID of a deployment.
[REQUIRED]
The unique ID of an instance in the deployment group.
dict
Response Syntax
{
'instanceSummary': {
'deploymentId': 'string',
'instanceId': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
],
'instanceType': 'Blue'|'Green'
}
}
Response Structure
(dict) --
Represents the output of a GetDeploymentInstance operation.
instanceSummary (dict) --
Information about the instance.
deploymentId (string) --
The unique ID of a deployment.
instanceId (string) --
The instance ID.
status (string) --
The deployment status for this instance:
lastUpdatedAt (datetime) --
A timestamp indicating when the instance information was last updated.
lifecycleEvents (list) --
A list of lifecycle events for this instance.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
instanceType (string) --
Information about which environment an instance belongs to in a blue/green deployment.
Returns information about a deployment target.
See also: AWS API Documentation
Request Syntax
response = client.get_deployment_target(
deploymentId='string',
targetId='string'
)
dict
Response Syntax
{
'deploymentTarget': {
'deploymentTargetType': 'InstanceTarget'|'LambdaTarget'|'ECSTarget',
'instanceTarget': {
'deploymentId': 'string',
'targetId': 'string',
'targetArn': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
],
'instanceLabel': 'Blue'|'Green'
},
'lambdaTarget': {
'deploymentId': 'string',
'targetId': 'string',
'targetArn': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
]
},
'ecsTarget': {
'deploymentId': 'string',
'targetId': 'string',
'targetArn': 'string',
'lastUpdatedAt': datetime(2015, 1, 1),
'lifecycleEvents': [
{
'lifecycleEventName': 'string',
'diagnostics': {
'errorCode': 'Success'|'ScriptMissing'|'ScriptNotExecutable'|'ScriptTimedOut'|'ScriptFailed'|'UnknownError',
'scriptName': 'string',
'message': 'string',
'logTail': 'string'
},
'startTime': datetime(2015, 1, 1),
'endTime': datetime(2015, 1, 1),
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
},
],
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
'taskSetsInfo': [
{
'identifer': 'string',
'desiredCount': 123,
'pendingCount': 123,
'runningCount': 123,
'status': 'string',
'trafficWeight': 123.0,
'targetGroup': {
'name': 'string'
},
'taskSetLabel': 'Blue'|'Green'
},
]
}
}
}
Response Structure
(dict) --
deploymentTarget (dict) --
A deployment target that contains information about a deployment such as its status, lifecyle events, and when it was updated last. It also contains metadata about the deployment target. The deployment target metadata depends on the deployment target's type (instanceTarget , lambdaTarget , or ecsTarget ).
deploymentTargetType (string) --
The deployment type which is specific to the deployment's compute platform.
instanceTarget (dict) --
Information about the target for a deployment that uses the EC2/On-premises compute platform.
deploymentId (string) --
The unique ID of a deployment.
targetId (string) --
The unique ID of a deployment target that has a type of instanceTarget .
targetArn (string) --
The ARN of the target.
status (string) --
The status an EC2/On-premises deployment's target instance.
lastUpdatedAt (datetime) --
The date and time when the target instance was updated by a deployment.
lifecycleEvents (list) --
The lifecycle events of the deployment to this target instance.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
instanceLabel (string) --
A label that identifies whether the instance is an original target (BLUE ) or a replacement target (GREEN ).
lambdaTarget (dict) --
Information about the target for a deployment that uses the AWS Lambda compute platform.
deploymentId (string) --
The unique ID of a deployment.
targetId (string) --
The unique ID of a deployment target that has a type of lambdaTarget .
targetArn (string) --
The ARN of the target.
status (string) --
The status an AWS Lambda deployment's target Lambda function.
lastUpdatedAt (datetime) --
The date and time when the target Lambda function was updated by a deployment.
lifecycleEvents (list) --
The lifecycle events of the deployment to this target Lambda function.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
ecsTarget (dict) --
Information about the target for a deployment that uses the Amazon ECS compute platform.
deploymentId (string) --
The unique ID of a deployment.
targetId (string) --
The unique ID of a deployment target that has a type of ecsTarget .
targetArn (string) --
The ARN of the target.
lastUpdatedAt (datetime) --
The date and time when the target Amazon ECS application was updated by a deployment.
lifecycleEvents (list) --
The lifecycle events of the deployment to this target Amazon ECS application.
(dict) --
Information about a deployment lifecycle event.
lifecycleEventName (string) --
The deployment lifecycle event name, such as ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart, or ValidateService.
diagnostics (dict) --
Diagnostic information about the deployment lifecycle event.
errorCode (string) --
The associated error code:
scriptName (string) --
The name of the script.
message (string) --
The message associated with the error.
logTail (string) --
The last portion of the diagnostic log.
If available, AWS CodeDeploy returns up to the last 4 KB of the diagnostic log.
startTime (datetime) --
A timestamp indicating when the deployment lifecycle event started.
endTime (datetime) --
A timestamp indicating when the deployment lifecycle event ended.
status (string) --
The deployment lifecycle event status:
status (string) --
The status an Amazon ECS deployment's target ECS application.
taskSetsInfo (list) --
The ECSTaskSet objects associated with the ECS target.
(dict) --
A set of Amazon ECS tasks. A task set runs a specified number of instances of a task definition simultaneously inside an Amazon ECS service. Information about a set of Amazon ECS tasks in an AWS CodeDeploy deployment. An Amazon ECS task set includes details such as the desired number of tasks, how many tasks are running, and whether the task set serves production traffic or not.
identifer (string) --
A unique ID of an ECSTaskSet .
desiredCount (integer) --
The number of tasks in a task set. During a deployment that uses the Amazon ECS compute type, CodeDeploy asks Amazon ECS to create a new task set and uses this value to determine how many tasks to create. After the updated task set is created, CodeDeploy shifts traffic to the new task set.
pendingCount (integer) --
The number of tasks in the task set that are in the PENDING status during an Amazon ECS deployment. A task in the PENDING state is preparing to enter the RUNNING state. A task set enters the PENDING status when it launches for the first time, or when it is restarted after being in the STOPPED state.
runningCount (integer) --
The number of tasks in the task set that are in the RUNNING status during an Amazon ECS deployment. A task in the RUNNING state is running and ready for use.
status (string) --
The status of the task set. There are three valid task set statuses:
trafficWeight (float) --
The percentage of traffic served by this task set.
targetGroup (dict) --
The target group associated with the task set. The target group is used by AWS CodeDeploy to manage traffic to a task set.
name (string) --
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
taskSetLabel (string) --
A label that identifies whether the ECS task set is an original target (BLUE ) or a replacement target (GREEN ).
Gets information about an on-premises instance.
See also: AWS API Documentation
Request Syntax
response = client.get_on_premises_instance(
instanceName='string'
)
[REQUIRED]
The name of the on-premises instance about which to get information.
{
'instanceInfo': {
'instanceName': 'string',
'iamSessionArn': 'string',
'iamUserArn': 'string',
'instanceArn': 'string',
'registerTime': datetime(2015, 1, 1),
'deregisterTime': datetime(2015, 1, 1),
'tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
}
Response Structure
Represents the output of a GetOnPremisesInstance operation.
Information about the on-premises instance.
The name of the on-premises instance.
The ARN of the IAM session associated with the on-premises instance.
The IAM user ARN associated with the on-premises instance.
The ARN of the on-premises instance.
The time at which the on-premises instance was registered.
If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.
The tags currently associated with the on-premises instance.
Information about a tag.
The tag's key.
The tag's value.
Create a paginator for an operation.
Returns an object that can wait for some condition.
Lists information about revisions for an application.
See also: AWS API Documentation
Request Syntax
response = client.list_application_revisions(
applicationName='string',
sortBy='registerTime'|'firstUsedTime'|'lastUsedTime',
sortOrder='ascending'|'descending',
s3Bucket='string',
s3KeyPrefix='string',
deployed='include'|'exclude'|'ignore',
nextToken='string'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
The column name to use to sort the list results:
If not specified or set to null, the results will be returned in an arbitrary order.
The order in which to sort the list results:
If not specified, the results will be sorted in ascending order.
If set to null, the results will be sorted in an arbitrary order.
An Amazon S3 bucket name to limit the search for revisions.
If set to null, all of the user's buckets are searched.
Whether to list revisions based on whether the revision is the target revision of an deployment group:
dict
Response Syntax
{
'revisions': [
{
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListApplicationRevisions operation.
revisions (list) --
A list of locations that contain the matching revisions.
(dict) --
Information about the location of an application revision.
revisionType (string) --
The type of application revision:
s3Location (dict) --
Information about the location of a revision stored in Amazon S3.
bucket (string) --
The name of the Amazon S3 bucket where the application revision is stored.
key (string) --
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
bundleType (string) --
The file type of the application revision. Must be one of the following:
version (string) --
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 will use the most recent version by default.
eTag (string) --
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 will be skipped.
gitHubLocation (dict) --
Information about the location of application artifacts stored in GitHub.
repository (string) --
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 (string) --
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
string (dict) --
Information about the location of an AWS Lambda deployment revision stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
sha256 (string) --
The SHA256 hash value of the revision content.
appSpecContent (dict) --
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
sha256 (string) --
The SHA256 hash value of the revision content.
nextToken (string) --
If a large amount of information is returned, an identifier will also be returned. It can be used in a subsequent list application revisions call to return the next set of application revisions in the list.
Lists the applications registered with the applicable IAM user or AWS account.
See also: AWS API Documentation
Request Syntax
response = client.list_applications(
nextToken='string'
)
{
'applications': [
'string',
],
'nextToken': 'string'
}
Response Structure
Represents the output of a ListApplications operation.
A list of application names.
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list applications call to return the next set of applications, will also be returned. in the list.
Lists the deployment configurations with the applicable IAM user or AWS account.
See also: AWS API Documentation
Request Syntax
response = client.list_deployment_configs(
nextToken='string'
)
{
'deploymentConfigsList': [
'string',
],
'nextToken': 'string'
}
Response Structure
Represents the output of a ListDeploymentConfigs operation.
A list of deployment configurations, including built-in configurations such as CodeDeployDefault.OneAtATime.
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment configurations call to return the next set of deployment configurations in the list.
Lists the deployment groups for an application registered with the applicable IAM user or AWS account.
See also: AWS API Documentation
Request Syntax
response = client.list_deployment_groups(
applicationName='string',
nextToken='string'
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
dict
Response Syntax
{
'applicationName': 'string',
'deploymentGroups': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListDeploymentGroups operation.
applicationName (string) --
The application name.
deploymentGroups (list) --
A list of corresponding deployment group names.
nextToken (string) --
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment groups call to return the next set of deployment groups in the list.
Note
The newer BatchGetDeploymentTargets should be used instead because it works with all compute types. ListDeploymentInstances throws an exception if it is used with a compute platform other than EC2/On-premises or AWS Lambda.
Lists the instance for a deployment associated with the applicable IAM user or AWS account.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.list_deployment_instances(
deploymentId='string',
nextToken='string',
instanceStatusFilter=[
'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
],
instanceTypeFilter=[
'Blue'|'Green',
]
)
[REQUIRED]
The unique ID of a deployment.
A subset of instances to list by status:
The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.
dict
Response Syntax
{
'instancesList': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListDeploymentInstances operation.
instancesList (list) --
A list of instance IDs.
nextToken (string) --
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployment instances call to return the next set of deployment instances in the list.
Returns an array of target IDs that are associated a deployment.
See also: AWS API Documentation
Request Syntax
response = client.list_deployment_targets(
deploymentId='string',
nextToken='string',
targetFilters={
'string': [
'string',
]
}
)
A key used to filter the returned targets.
dict
Response Syntax
{
'targetIds': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
targetIds (list) --
The unique IDs of deployment targets.
nextToken (string) --
If a large amount of information is returned, a token identifier will also be returned. It can be used in a subsequent ListDeploymentTargets call to return the next set of deployment targets in the list.
Lists the deployments in a deployment group for an application registered with the applicable IAM user or AWS account.
See also: AWS API Documentation
Request Syntax
response = client.list_deployments(
applicationName='string',
deploymentGroupName='string',
includeOnlyStatuses=[
'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
],
createTimeRange={
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
nextToken='string'
)
A subset of deployments to list by status:
A time range (start and end) for returning a subset of the list of deployments.
The start time of the time range.
Note
Specify null to leave the start time open-ended.
The end time of the time range.
Note
Specify null to leave the end time open-ended.
dict
Response Syntax
{
'deployments': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListDeployments operation.
deployments (list) --
A list of deployment IDs.
nextToken (string) --
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list deployments call to return the next set of deployments in the list.
Lists the names of stored connections to GitHub accounts.
See also: AWS API Documentation
Request Syntax
response = client.list_git_hub_account_token_names(
nextToken='string'
)
{
'tokenNameList': [
'string',
],
'nextToken': 'string'
}
Response Structure
Represents the output of a ListGitHubAccountTokenNames operation.
A list of names of connections to GitHub accounts.
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent ListGitHubAccountTokenNames call to return the next set of names in the list.
Gets a list of names for one or more on-premises instances.
Unless otherwise specified, both registered and deregistered on-premises instance names will be listed. To list only registered or deregistered on-premises instance names, use the registration status parameter.
See also: AWS API Documentation
Request Syntax
response = client.list_on_premises_instances(
registrationStatus='Registered'|'Deregistered',
tagFilters=[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
nextToken='string'
)
The registration status of the on-premises instances:
The on-premises instance tags that will be used to restrict the corresponding on-premises instance names returned.
Information about an on-premises instance tag filter.
The on-premises instance tag filter key.
The on-premises instance tag filter value.
The on-premises instance tag filter type:
dict
Response Syntax
{
'instanceNames': [
'string',
],
'nextToken': 'string'
}
Response Structure
(dict) --
Represents the output of list on-premises instances operation.
instanceNames (list) --
The list of matching on-premises instance names.
nextToken (string) --
If a large amount of information is returned, an identifier is also returned. It can be used in a subsequent list on-premises instances call to return the next set of on-premises instances in the list.
Sets the result of a Lambda validation function. The function validates one or both lifecycle events (BeforeAllowTraffic and AfterAllowTraffic ) and returns Succeeded or Failed .
See also: AWS API Documentation
Request Syntax
response = client.put_lifecycle_event_hook_execution_status(
deploymentId='string',
lifecycleEventHookExecutionId='string',
status='Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'
)
dict
Response Syntax
{
'lifecycleEventHookExecutionId': 'string'
}
Response Structure
(dict) --
lifecycleEventHookExecutionId (string) --
The execution ID of the lifecycle event hook. A hook is specified in the hooks section of the deployment's AppSpec file.
Registers with AWS CodeDeploy a revision for the specified application.
See also: AWS API Documentation
Request Syntax
response = client.register_application_revision(
applicationName='string',
description='string',
revision={
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
}
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
[REQUIRED]
Information about the application revision to register, including type and location.
The type of application revision:
Information about the location of a revision stored in Amazon S3.
The name of the Amazon S3 bucket where the application revision is stored.
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
The file type of the application revision. Must be one of the following:
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 will use the most recent version by default.
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 will be skipped.
Information about the location of application artifacts stored in GitHub.
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.
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
Information about the location of an AWS Lambda deployment revision stored as a RawString.
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
The SHA256 hash value of the revision content.
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
The SHA256 hash value of the revision content.
None
Registers an on-premises instance.
Note
Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.
See also: AWS API Documentation
Request Syntax
response = client.register_on_premises_instance(
instanceName='string',
iamSessionArn='string',
iamUserArn='string'
)
[REQUIRED]
The name of the on-premises instance to register.
None
Removes one or more tags from one or more on-premises instances.
See also: AWS API Documentation
Request Syntax
response = client.remove_tags_from_on_premises_instances(
tags=[
{
'Key': 'string',
'Value': 'string'
},
],
instanceNames=[
'string',
]
)
[REQUIRED]
The tag key-value pairs to remove from the on-premises instances.
Information about a tag.
The tag's key.
The tag's value.
[REQUIRED]
The names of the on-premises instances from which to remove tags.
None
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is completed.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.skip_wait_time_for_instance_termination(
deploymentId='string'
)
Attempts to stop an ongoing deployment.
See also: AWS API Documentation
Request Syntax
response = client.stop_deployment(
deploymentId='string',
autoRollbackEnabled=True|False
)
[REQUIRED]
The unique ID of a deployment.
dict
Response Syntax
{
'status': 'Pending'|'Succeeded',
'statusMessage': 'string'
}
Response Structure
(dict) --
Represents the output of a StopDeployment operation.
status (string) --
The status of the stop deployment operation:
statusMessage (string) --
An accompanying status message.
Changes the name of an application.
See also: AWS API Documentation
Request Syntax
response = client.update_application(
applicationName='string',
newApplicationName='string'
)
None
Changes information about a deployment group.
See also: AWS API Documentation
Request Syntax
response = client.update_deployment_group(
applicationName='string',
currentDeploymentGroupName='string',
newDeploymentGroupName='string',
deploymentConfigName='string',
ec2TagFilters=[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
onPremisesInstanceTagFilters=[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
autoScalingGroups=[
'string',
],
serviceRoleArn='string',
triggerConfigurations=[
{
'triggerName': 'string',
'triggerTargetArn': 'string',
'triggerEvents': [
'DeploymentStart'|'DeploymentSuccess'|'DeploymentFailure'|'DeploymentStop'|'DeploymentRollback'|'DeploymentReady'|'InstanceStart'|'InstanceSuccess'|'InstanceFailure'|'InstanceReady',
]
},
],
alarmConfiguration={
'enabled': True|False,
'ignorePollAlarmFailure': True|False,
'alarms': [
{
'name': 'string'
},
]
},
autoRollbackConfiguration={
'enabled': True|False,
'events': [
'DEPLOYMENT_FAILURE'|'DEPLOYMENT_STOP_ON_ALARM'|'DEPLOYMENT_STOP_ON_REQUEST',
]
},
deploymentStyle={
'deploymentType': 'IN_PLACE'|'BLUE_GREEN',
'deploymentOption': 'WITH_TRAFFIC_CONTROL'|'WITHOUT_TRAFFIC_CONTROL'
},
blueGreenDeploymentConfiguration={
'terminateBlueInstancesOnDeploymentSuccess': {
'action': 'TERMINATE'|'KEEP_ALIVE',
'terminationWaitTimeInMinutes': 123
},
'deploymentReadyOption': {
'actionOnTimeout': 'CONTINUE_DEPLOYMENT'|'STOP_DEPLOYMENT',
'waitTimeInMinutes': 123
},
'greenFleetProvisioningOption': {
'action': 'DISCOVER_EXISTING'|'COPY_AUTO_SCALING_GROUP'
}
},
loadBalancerInfo={
'elbInfoList': [
{
'name': 'string'
},
],
'targetGroupInfoList': [
{
'name': 'string'
},
],
'targetGroupPairInfoList': [
{
'targetGroups': [
{
'name': 'string'
},
],
'prodTrafficRoute': {
'listenerArns': [
'string',
]
},
'testTrafficRoute': {
'listenerArns': [
'string',
]
}
},
]
},
ec2TagSet={
'ec2TagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
},
ecsServices=[
{
'serviceName': 'string',
'clusterName': 'string'
},
],
onPremisesTagSet={
'onPremisesTagSetList': [
[
{
'Key': 'string',
'Value': 'string',
'Type': 'KEY_ONLY'|'VALUE_ONLY'|'KEY_AND_VALUE'
},
],
]
}
)
[REQUIRED]
The application name corresponding to the deployment group to update.
[REQUIRED]
The current name of the deployment group.
The replacement set of Amazon EC2 tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The replacement set of on-premises instance tags on which to filter, if you want to change them. To keep the existing tags, enter their names. To remove tags, do not enter any tag names.
Information about an on-premises instance tag filter.
The on-premises instance tag filter key.
The on-premises instance tag filter value.
The on-premises instance tag filter type:
The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them. To keep the Auto Scaling groups, enter their names. To remove Auto Scaling groups, do not enter any Auto Scaling group names.
Information about triggers to change when the deployment group is updated. For examples, see Modify Triggers in an AWS CodeDeploy Deployment Group in the AWS CodeDeploy User Guide.
Information about notification triggers for the deployment group.
The name of the notification trigger.
The ARN of the Amazon Simple Notification Service topic through which notifications about deployment or instance events are sent.
The event type or types for which notifications are triggered.
Information to add or change about Amazon CloudWatch alarms when the deployment group is updated.
Indicates whether the alarm configuration is enabled.
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.
A list of alarms configured for the deployment group. A maximum of 10 alarms can be added to a deployment group.
Information about an alarm.
The name of the alarm. Maximum length is 255 characters. Each alarm name can be used only once in a list of alarms.
Information for an automatic rollback configuration that is added or changed when a deployment group is updated.
Indicates whether a defined automatic rollback configuration is currently enabled.
The event type or types that trigger a rollback.
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.
Indicates whether to run an in-place deployment or a blue/green deployment.
Indicates whether to route deployment traffic behind a load balancer.
Information about blue/green deployment options for a deployment group.
Information about whether to terminate instances in the original fleet during a blue/green deployment.
The action to take on instances in the original environment after a successful blue/green deployment.
The number of minutes to wait after a successful blue/green deployment before terminating instances from the original environment. The maximum setting is 2880 minutes (2 days).
Information about the action to take when newly provisioned instances are ready to receive traffic in a blue/green deployment.
Information about when to reroute traffic from an original environment to a replacement environment in a blue/green deployment.
The number of minutes to wait before the status of a blue/green deployment changed to Stopped if rerouting is not started manually. Applies only to the STOP_DEPLOYMENT option for actionOnTimeout
Information about how instances are provisioned for a replacement environment in a blue/green deployment.
The method used to add instances to a replacement environment.
Information about the load balancer used in a deployment.
An array containing 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.
Note
Adding more than one load balancer to the array is not supported.
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.
For blue/green deployments, the name of the load balancer that will be 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 completes.
An array containing 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.
Note
Adding more than one target group to the array is not supported.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The target group pair information. This is an array of TargeGroupPairInfo objects with a maximum size of one.
Information about two target groups and how traffic routes during an Amazon ECS deployment. An optional test traffic route can be specified.
One pair of target groups. One is associated with the original task set. The second target is associated with the task set that serves traffic after the deployment completes.
Information about a target group in Elastic Load Balancing to use in a deployment. Instances are registered as targets in a target group, and traffic is routed to the target group.
For blue/green deployments, the name of the target group that instances in the original environment are deregistered from, and instances in the replacement environment registered with. For in-place deployments, the name of the target group that instances are deregistered from, so they are not serving traffic during a deployment, and then re-registered with after the deployment completes.
The path used by a load balancer to route production traffic when an Amazon ECS deployment is complete.
The 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.
An optional path used by a load balancer to route test traffic after an Amazon ECS deployment. Validation can happen while test traffic is served during a deployment.
The 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.
Information about groups of tags applied to on-premises instances. The deployment group will include only EC2 instances identified by all the tag groups.
A list containing other lists of EC2 instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an EC2 tag filter.
The tag filter key.
The tag filter value.
The tag filter type:
The target ECS services in the deployment group. This only applies to deployment groups that use the Amazon ECS compute platform. A target ECS service is specified as an Amazon ECS cluster and service name pair using the format <clustername>:<servicename> .
Contains the service and cluster names used to identify an Amazon ECS deployment's target.
The name of the target ECS service.
The name of the cluster that the ECS service is associated with.
Information about an on-premises instance tag set. The deployment group will include only on-premises instances identified by all the tag groups.
A list containing other lists of on-premises instance tag groups. In order for an instance to be included in the deployment group, it must be identified by all the tag groups in the list.
Information about an on-premises instance tag filter.
The on-premises instance tag filter key.
The on-premises instance tag filter value.
The on-premises instance tag filter type:
dict
Response Syntax
{
'hooksNotCleanedUp': [
{
'name': 'string',
'hook': 'string'
},
]
}
Response Structure
(dict) --
Represents the output of an UpdateDeploymentGroup operation.
hooksNotCleanedUp (list) --
If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, AWS CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the AWS account. If the output contains data, AWS CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the AWS account.
(dict) --
Information about an Auto Scaling group.
name (string) --
The Auto Scaling group name.
hook (string) --
An Auto Scaling lifecycle event hook name.
The available paginators are:
paginator = client.get_paginator('list_application_revisions')
Creates an iterator that will paginate through responses from CodeDeploy.Client.list_application_revisions().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
applicationName='string',
sortBy='registerTime'|'firstUsedTime'|'lastUsedTime',
sortOrder='ascending'|'descending',
s3Bucket='string',
s3KeyPrefix='string',
deployed='include'|'exclude'|'ignore',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
The column name to use to sort the list results:
If not specified or set to null, the results will be returned in an arbitrary order.
The order in which to sort the list results:
If not specified, the results will be sorted in ascending order.
If set to null, the results will be sorted in an arbitrary order.
An Amazon S3 bucket name to limit the search for revisions.
If set to null, all of the user's buckets are searched.
Whether to list revisions based on whether the revision is the target revision of an deployment group:
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'revisions': [
{
'revisionType': 'S3'|'GitHub'|'String'|'AppSpecContent',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip'|'YAML'|'JSON',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
},
'string': {
'content': 'string',
'sha256': 'string'
},
'appSpecContent': {
'content': 'string',
'sha256': 'string'
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListApplicationRevisions operation.
revisions (list) --
A list of locations that contain the matching revisions.
(dict) --
Information about the location of an application revision.
revisionType (string) --
The type of application revision:
s3Location (dict) --
Information about the location of a revision stored in Amazon S3.
bucket (string) --
The name of the Amazon S3 bucket where the application revision is stored.
key (string) --
The name of the Amazon S3 object that represents the bundled artifacts for the application revision.
bundleType (string) --
The file type of the application revision. Must be one of the following:
version (string) --
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 will use the most recent version by default.
eTag (string) --
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 will be skipped.
gitHubLocation (dict) --
Information about the location of application artifacts stored in GitHub.
repository (string) --
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 (string) --
The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.
string (dict) --
Information about the location of an AWS Lambda deployment revision stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string. It includes information about which Lambda function to update and optional Lambda functions that validate deployment lifecycle events.
sha256 (string) --
The SHA256 hash value of the revision content.
appSpecContent (dict) --
The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.
content (string) --
The YAML-formatted or JSON-formatted revision string.
For an AWS 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.
sha256 (string) --
The SHA256 hash value of the revision content.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_applications')
Creates an iterator that will paginate through responses from CodeDeploy.Client.list_applications().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'applications': [
'string',
],
'NextToken': 'string'
}
Response Structure
Represents the output of a ListApplications operation.
A list of application names.
A token to resume pagination.
paginator = client.get_paginator('list_deployment_configs')
Creates an iterator that will paginate through responses from CodeDeploy.Client.list_deployment_configs().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
{
'deploymentConfigsList': [
'string',
],
'NextToken': 'string'
}
Response Structure
Represents the output of a ListDeploymentConfigs operation.
A list of deployment configurations, including built-in configurations such as CodeDeployDefault.OneAtATime.
A token to resume pagination.
paginator = client.get_paginator('list_deployment_groups')
Creates an iterator that will paginate through responses from CodeDeploy.Client.list_deployment_groups().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
applicationName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of an AWS CodeDeploy application associated with the applicable IAM user or AWS account.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'applicationName': 'string',
'deploymentGroups': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListDeploymentGroups operation.
applicationName (string) --
The application name.
deploymentGroups (list) --
A list of corresponding deployment group names.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_deployment_instances')
Creates an iterator that will paginate through responses from CodeDeploy.Client.list_deployment_instances().
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
deploymentId='string',
instanceStatusFilter=[
'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown'|'Ready',
],
instanceTypeFilter=[
'Blue'|'Green',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The unique ID of a deployment.
A subset of instances to list by status:
The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in the replacement environment ("GREEN"), for which you want to view instance information.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'instancesList': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListDeploymentInstances operation.
instancesList (list) --
A list of instance IDs.
NextToken (string) --
A token to resume pagination.
paginator = client.get_paginator('list_deployments')
Creates an iterator that will paginate through responses from CodeDeploy.Client.list_deployments().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
applicationName='string',
deploymentGroupName='string',
includeOnlyStatuses=[
'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped'|'Ready',
],
createTimeRange={
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
A subset of deployments to list by status:
A time range (start and end) for returning a subset of the list of deployments.
The start time of the time range.
Note
Specify null to leave the start time open-ended.
The end time of the time range.
Note
Specify null to leave the end time open-ended.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken from a previous response.
dict
Response Syntax
{
'deployments': [
'string',
],
'NextToken': 'string'
}
Response Structure
(dict) --
Represents the output of a ListDeployments operation.
deployments (list) --
A list of deployment IDs.
NextToken (string) --
A token to resume pagination.
The available waiters are:
waiter = client.get_waiter('deployment_successful')
Polls CodeDeploy.Client.get_deployment() every 15 seconds until a successful state is reached. An error is returned after 120 failed checks.
See also: AWS API Documentation
Request Syntax
waiter.wait(
deploymentId='string',
WaiterConfig={
'Delay': 123,
'MaxAttempts': 123
}
)
[REQUIRED]
The unique ID of a deployment associated with the applicable IAM user or AWS account.
A dictionary that provides parameters to control waiting behavior.
The amount of time in seconds to wait between attempts. Default: 15
The maximum number of attempts to be made. Default: 120
None