Table of Contents
CodeDeploy.
Client
¶A low-level client representing AWS CodeDeploy:
import boto3
client = boto3.client('codedeploy')
These are the available methods:
add_tags_to_on_premises_instances()
batch_get_applications()
batch_get_deployments()
batch_get_on_premises_instances()
can_paginate()
create_application()
create_deployment()
create_deployment_config()
create_deployment_group()
delete_application()
delete_deployment_config()
delete_deployment_group()
deregister_on_premises_instance()
generate_presigned_url()
get_application()
get_application_revision()
get_deployment()
get_deployment_config()
get_deployment_group()
get_deployment_instance()
get_on_premises_instance()
get_paginator()
get_waiter()
list_application_revisions()
list_applications()
list_deployment_configs()
list_deployment_groups()
list_deployment_instances()
list_deployments()
list_on_premises_instances()
register_application_revision()
register_on_premises_instance()
remove_tags_from_on_premises_instances()
stop_deployment()
update_application()
update_deployment_group()
Adds tags to on-premises instances.
Request Syntax
response = client.add_tags_to_on_premises_instances(
tags=[
{
'Key': 'string',
'Value': 'string'
},
],
instanceNames=[
'string',
]
)
Parameters: |
|
---|---|
Returns: | None |
batch_get_applications
(**kwargs)¶Gets information about one or more applications.
Request Syntax
response = client.batch_get_applications(
applicationNames=[
'string',
]
)
Parameters: | applicationNames (list) -- A list of application names, with multiple application names separated by spaces.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'applicationsInfo': [
{
'applicationId': 'string',
'applicationName': 'string',
'createTime': datetime(2015, 1, 1),
'linkedToGitHub': True|False
},
]
}
Response Structure
|
batch_get_deployments
(**kwargs)¶Gets information about one or more deployments.
Request Syntax
response = client.batch_get_deployments(
deploymentIds=[
'string',
]
)
Parameters: | deploymentIds (list) -- A list of deployment IDs, with multiple deployment IDs separated by spaces.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'deploymentsInfo': [
{
'applicationName': 'string',
'deploymentGroupName': 'string',
'deploymentConfigName': 'string',
'deploymentId': 'string',
'revision': {
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
},
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped',
'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',
'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
},
'description': 'string',
'creator': 'user'|'autoscaling',
'ignoreApplicationStopFailures': True|False
},
]
}
Response Structure
|
batch_get_on_premises_instances
(**kwargs)¶Gets information about one or more on-premises instances.
Request Syntax
response = client.batch_get_on_premises_instances(
instanceNames=[
'string',
]
)
Parameters: | instanceNames (list) -- The names of the on-premises instances to get information about.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'instanceInfos': [
{
'instanceName': 'string',
'iamUserArn': 'string',
'instanceArn': 'string',
'registerTime': datetime(2015, 1, 1),
'deregisterTime': datetime(2015, 1, 1),
'tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
}
Response Structure
|
can_paginate
(operation_name)¶Check if an operation can be paginated.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Returns: | True if the operation can be paginated,
False otherwise. |
create_application
(**kwargs)¶Creates a new application.
Request Syntax
response = client.create_application(
applicationName='string'
)
Parameters: | applicationName (string) -- [REQUIRED] The name of the application. This name must be unique with the applicable IAM user or AWS account. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'applicationId': 'string'
}
Response Structure
|
create_deployment
(**kwargs)¶Deploys an application revision through the specified deployment group.
Request Syntax
response = client.create_deployment(
applicationName='string',
deploymentGroupName='string',
revision={
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
},
deploymentConfigName='string',
description='string',
ignoreApplicationStopFailures=True|False
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'deploymentId': 'string'
}
Response Structure
|
create_deployment_config
(**kwargs)¶Creates a new deployment configuration.
Request Syntax
response = client.create_deployment_config(
deploymentConfigName='string',
minimumHealthyHosts={
'value': 123,
'type': 'HOST_COUNT'|'FLEET_PERCENT'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'deploymentConfigId': 'string'
}
Response Structure
|
create_deployment_group
(**kwargs)¶Creates a new deployment group for application revisions to be deployed to.
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'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'deploymentGroupId': 'string'
}
Response Structure
|
delete_application
(**kwargs)¶Deletes an application.
Request Syntax
response = client.delete_application(
applicationName='string'
)
Parameters: | applicationName (string) -- [REQUIRED] The name of an existing AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
---|---|
Returns: | None |
delete_deployment_config
(**kwargs)¶Deletes a deployment configuration.
Note
A deployment configuration cannot be deleted if it is currently in use. Also, predefined configurations cannot be deleted.
Request Syntax
response = client.delete_deployment_config(
deploymentConfigName='string'
)
Parameters: | deploymentConfigName (string) -- [REQUIRED] The name of an existing deployment configuration associated with the applicable IAM user or AWS account. |
---|---|
Returns: | None |
delete_deployment_group
(**kwargs)¶Deletes a deployment group.
Request Syntax
response = client.delete_deployment_group(
applicationName='string',
deploymentGroupName='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'hooksNotCleanedUp': [
{
'name': 'string',
'hook': 'string'
},
]
}
Response Structure
|
deregister_on_premises_instance
(**kwargs)¶Deregisters an on-premises instance.
Request Syntax
response = client.deregister_on_premises_instance(
instanceName='string'
)
Parameters: | instanceName (string) -- [REQUIRED] The name of the on-premises instance to deregister. |
---|---|
Returns: | None |
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
get_application
(**kwargs)¶Gets information about an application.
Request Syntax
response = client.get_application(
applicationName='string'
)
Parameters: | applicationName (string) -- [REQUIRED] The name of an existing AWS CodeDeploy application associated with the applicable IAM user or AWS account. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'application': {
'applicationId': 'string',
'applicationName': 'string',
'createTime': datetime(2015, 1, 1),
'linkedToGitHub': True|False
}
}
Response Structure
|
get_application_revision
(**kwargs)¶Gets information about an application revision.
Request Syntax
response = client.get_application_revision(
applicationName='string',
revision={
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'applicationName': 'string',
'revision': {
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
},
'revisionInfo': {
'description': 'string',
'deploymentGroups': [
'string',
],
'firstUsedTime': datetime(2015, 1, 1),
'lastUsedTime': datetime(2015, 1, 1),
'registerTime': datetime(2015, 1, 1)
}
}
Response Structure
|
get_deployment
(**kwargs)¶Gets information about a deployment.
Request Syntax
response = client.get_deployment(
deploymentId='string'
)
Parameters: | deploymentId (string) -- [REQUIRED] An existing deployment ID associated with the applicable IAM user or AWS account. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'deploymentInfo': {
'applicationName': 'string',
'deploymentGroupName': 'string',
'deploymentConfigName': 'string',
'deploymentId': 'string',
'revision': {
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
},
'status': 'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped',
'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',
'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
},
'description': 'string',
'creator': 'user'|'autoscaling',
'ignoreApplicationStopFailures': True|False
}
}
Response Structure
|
get_deployment_config
(**kwargs)¶Gets information about a deployment configuration.
Request Syntax
response = client.get_deployment_config(
deploymentConfigName='string'
)
Parameters: | deploymentConfigName (string) -- [REQUIRED] The name of an existing deployment configuration associated with the applicable IAM user or AWS account. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'deploymentConfigInfo': {
'deploymentConfigId': 'string',
'deploymentConfigName': 'string',
'minimumHealthyHosts': {
'value': 123,
'type': 'HOST_COUNT'|'FLEET_PERCENT'
},
'createTime': datetime(2015, 1, 1)
}
}
Response Structure
|
get_deployment_group
(**kwargs)¶Gets information about a deployment group.
Request Syntax
response = client.get_deployment_group(
applicationName='string',
deploymentGroupName='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | 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',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
}
}
}
Response Structure
|
get_deployment_instance
(**kwargs)¶Gets information about an instance as part of a deployment.
Request Syntax
response = client.get_deployment_instance(
deploymentId='string',
instanceId='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'instanceSummary': {
'deploymentId': 'string',
'instanceId': 'string',
'status': 'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown',
'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'
},
]
}
}
Response Structure
|
get_on_premises_instance
(**kwargs)¶Gets information about an on-premises instance.
Request Syntax
response = client.get_on_premises_instance(
instanceName='string'
)
Parameters: | instanceName (string) -- [REQUIRED] The name of the on-premises instance to get information about |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'instanceInfo': {
'instanceName': 'string',
'iamUserArn': 'string',
'instanceArn': 'string',
'registerTime': datetime(2015, 1, 1),
'deregisterTime': datetime(2015, 1, 1),
'tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
}
Response Structure
|
get_paginator
(operation_name)¶Create a paginator for an operation.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Raises OperationNotPageableError: | |
Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
|
Return type: | L{botocore.paginate.Paginator} |
Returns: | A paginator object. |
get_waiter
(waiter_name)¶list_application_revisions
(**kwargs)¶Lists information about revisions for an application.
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'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'revisions': [
{
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
},
],
'nextToken': 'string'
}
Response Structure
|
list_applications
(**kwargs)¶Lists the applications registered with the applicable IAM user or AWS account.
Request Syntax
response = client.list_applications(
nextToken='string'
)
Parameters: | nextToken (string) -- An identifier that was returned from the previous list applications call, which can be used to return the next set of applications in the list. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'applications': [
'string',
],
'nextToken': 'string'
}
Response Structure
|
list_deployment_configs
(**kwargs)¶Lists the deployment configurations with the applicable IAM user or AWS account.
Request Syntax
response = client.list_deployment_configs(
nextToken='string'
)
Parameters: | nextToken (string) -- An identifier that was returned from the previous list deployment configurations call, which can be used to return the next set of deployment configurations in the list. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'deploymentConfigsList': [
'string',
],
'nextToken': 'string'
}
Response Structure
|
list_deployment_groups
(**kwargs)¶Lists the deployment groups for an application registered with the applicable IAM user or AWS account.
Request Syntax
response = client.list_deployment_groups(
applicationName='string',
nextToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'applicationName': 'string',
'deploymentGroups': [
'string',
],
'nextToken': 'string'
}
Response Structure
|
list_deployment_instances
(**kwargs)¶Lists the instances for a deployment associated with the applicable IAM user or AWS account.
Request Syntax
response = client.list_deployment_instances(
deploymentId='string',
nextToken='string',
instanceStatusFilter=[
'Pending'|'InProgress'|'Succeeded'|'Failed'|'Skipped'|'Unknown',
]
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'instancesList': [
'string',
],
'nextToken': 'string'
}
Response Structure
|
list_deployments
(**kwargs)¶Lists the deployments within a deployment group for an application registered with the applicable IAM user or AWS account.
Request Syntax
response = client.list_deployments(
applicationName='string',
deploymentGroupName='string',
includeOnlyStatuses=[
'Created'|'Queued'|'InProgress'|'Succeeded'|'Failed'|'Stopped',
],
createTimeRange={
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
nextToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'deployments': [
'string',
],
'nextToken': 'string'
}
Response Structure
|
list_on_premises_instances
(**kwargs)¶Gets a list of one or more on-premises instance names.
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.
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'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'instanceNames': [
'string',
],
'nextToken': 'string'
}
Response Structure
|
register_application_revision
(**kwargs)¶Registers with AWS CodeDeploy a revision for the specified application.
Request Syntax
response = client.register_application_revision(
applicationName='string',
description='string',
revision={
'revisionType': 'S3'|'GitHub',
's3Location': {
'bucket': 'string',
'key': 'string',
'bundleType': 'tar'|'tgz'|'zip',
'version': 'string',
'eTag': 'string'
},
'gitHubLocation': {
'repository': 'string',
'commitId': 'string'
}
}
)
Parameters: |
|
---|---|
Returns: | None |
register_on_premises_instance
(**kwargs)¶Registers an on-premises instance.
Request Syntax
response = client.register_on_premises_instance(
instanceName='string',
iamUserArn='string'
)
Parameters: |
|
---|---|
Returns: | None |
Removes one or more tags from one or more on-premises instances.
Request Syntax
response = client.remove_tags_from_on_premises_instances(
tags=[
{
'Key': 'string',
'Value': 'string'
},
],
instanceNames=[
'string',
]
)
Parameters: |
|
---|---|
Returns: | None |
stop_deployment
(**kwargs)¶Attempts to stop an ongoing deployment.
Request Syntax
response = client.stop_deployment(
deploymentId='string'
)
Parameters: | deploymentId (string) -- [REQUIRED] The unique ID of a deployment. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'status': 'Pending'|'Succeeded',
'statusMessage': 'string'
}
Response Structure
|
update_application
(**kwargs)¶Changes an existing application's name.
Request Syntax
response = client.update_application(
applicationName='string',
newApplicationName='string'
)
Parameters: |
|
---|---|
Returns: | None |
update_deployment_group
(**kwargs)¶Changes information about an existing deployment group.
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'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'hooksNotCleanedUp': [
{
'name': 'string',
'hook': 'string'
},
]
}
Response Structure
|