Note
You are viewing the documentation for an older version of boto (boto2).
Boto3, the next version of Boto, is now stable and recommended for general use. It can be used side-by-side with Boto in the same project, so it is easy to start using Boto3 in your existing projects as well as new projects. Going forward, API updates and all new feature work will be focused on Boto3.
For more information, see the documentation for boto3.
CodeDeploy¶
boto.codedeploy.layer1¶
-
class
boto.codedeploy.layer1.
CodeDeployConnection
(**kwargs)¶ AWS CodeDeploy Overview This is the AWS CodeDeploy API Reference. This guide provides descriptions of the AWS CodeDeploy APIs. For additional information, see the `AWS CodeDeploy User Guide`_. Using the APIs You can use the AWS CodeDeploy APIs to work with the following items:
- Applications , which are unique identifiers that AWS CodeDeploy uses to ensure that the correct combinations of revisions, deployment configurations, and deployment groups are being referenced during deployments. You can work with applications by calling CreateApplication, DeleteApplication, GetApplication, ListApplications, BatchGetApplications, and UpdateApplication to create, delete, and get information about applications, and to change information about an application, respectively.
- Deployment configurations , which are sets of deployment rules and deployment success and failure conditions that AWS CodeDeploy uses during deployments. You can work with deployment configurations by calling CreateDeploymentConfig, DeleteDeploymentConfig, GetDeploymentConfig, and ListDeploymentConfigs to create, delete, and get information about deployment configurations, respectively.
- Deployment groups , which represent groups of Amazon EC2 instances to which application revisions can be deployed. You can work with deployment groups by calling CreateDeploymentGroup, DeleteDeploymentGroup, GetDeploymentGroup, ListDeploymentGroups, and UpdateDeploymentGroup to create, delete, and get information about single and multiple deployment groups, and to change information about a deployment group, respectively.
- Deployment instances (also known simply as instances ), which represent Amazon EC2 instances to which application revisions are deployed. Deployment instances are identified by their Amazon EC2 tags or Auto Scaling group names. Deployment instances belong to deployment groups. You can work with deployment instances by calling GetDeploymentInstance and ListDeploymentInstances to get information about single and multiple deployment instances, respectively.
- Deployments , which represent the process of deploying revisions to deployment groups. You can work with deployments by calling CreateDeployment, GetDeployment, ListDeployments, BatchGetDeployments, and StopDeployment to create and get information about deployments, and to stop a deployment, respectively.
- Application revisions (also known simply as revisions ), which are archive files that are stored in Amazon S3 buckets or GitHub repositories. These revisions contain source content (such as source code, web pages, executable files, any deployment scripts, and similar) along with an Application Specification file (AppSpec file). (The AppSpec file is unique to AWS CodeDeploy; it defines a series of deployment actions that you want AWS CodeDeploy to execute.) An application revision is uniquely identified by its Amazon S3 object key and its ETag, version, or both. Application revisions are deployed to deployment groups. You can work with application revisions by calling GetApplicationRevision, ListApplicationRevisions, and RegisterApplicationRevision to get information about application revisions and to inform AWS CodeDeploy about an application revision, respectively.
-
APIVersion
= '2014-10-06'¶
-
DefaultRegionEndpoint
= 'codedeploy.us-east-1.amazonaws.com'¶
-
DefaultRegionName
= 'us-east-1'¶
-
ResponseError
¶ alias of
boto.exception.JSONResponseError
-
ServiceName
= 'codedeploy'¶
-
TargetPrefix
= 'CodeDeploy_20141006'¶
-
batch_get_applications
(application_names=None)¶ Gets information about one or more applications.
Parameters: application_names (list) – A list of application names, with multiple application names separated by spaces.
-
batch_get_deployments
(deployment_ids=None)¶ Gets information about one or more deployments.
Parameters: deployment_ids (list) – A list of deployment IDs, with multiple deployment IDs separated by spaces.
-
create_application
(application_name)¶ Creates a new application.
Parameters: application_name (string) – The name of the application. This name must be unique within the AWS user account.
-
create_deployment
(application_name, deployment_group_name=None, revision=None, deployment_config_name=None, description=None, ignore_application_stop_failures=None)¶ Deploys an application revision to the specified deployment group.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- deployment_group_name (string) – The deployment group’s name.
- revision (dict) – The type of revision to deploy, along with information about the revision’s location.
- deployment_config_name (string) – The name of an existing deployment configuration within the AWS user 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.
Parameters: - description (string) – A comment about the deployment.
- ignore_application_stop_failures (boolean) – If set to true, then if the deployment causes the ApplicationStop deployment lifecycle event to fail to a specific instance, the deployment will not be considered to have failed to that instance 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 a specific instance, the deployment will stop to that instance, and the deployment to that instance will be considered to have failed.
-
create_deployment_config
(deployment_config_name, minimum_healthy_hosts=None)¶ Creates a new deployment configuration.
Parameters: - deployment_config_name (string) – The name of the deployment configuration to create.
- minimum_healthy_hosts (dict) – 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:
- HOST_COUNT: The value parameter represents the minimum number of
- healthy instances, as an absolute value.
- FLEET_PERCENT: The value parameter represents the minimum number of
- healthy instances, as a percentage of the total number of instances in the deployment. If you specify FLEET_PERCENT, then at the start of the deployment AWS CodeDeploy converts the percentage to the equivalent number of instances and rounds fractional instances up.
The value parameter takes an integer.
- For example, to set a minimum of 95% healthy instances, specify a type
- of FLEET_PERCENT and a value of 95.
-
create_deployment_group
(application_name, deployment_group_name, deployment_config_name=None, ec_2_tag_filters=None, auto_scaling_groups=None, service_role_arn=None)¶ Creates a new deployment group for application revisions to be deployed to.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- deployment_group_name (string) – The name of an existing deployment group for the specified application.
- deployment_config_name (string) – If specified, the deployment configuration name must be one of the predefined values, or it can be a custom deployment configuration:
- CodeDeployDefault.AllAtOnce deploys an application revision to up to
- all of the Amazon EC2 instances at once. The overall deployment succeeds if the application revision deploys to at least one of the instances. The overall deployment fails after the application revision fails to deploy to all of the instances. For example, for 9 instances, deploy to up to all 9 instances at once. The overall deployment succeeds if any of the 9 instances is successfully deployed to, and it fails if all 9 instances fail to be deployed to.
- CodeDeployDefault.HalfAtATime deploys to up to half of the instances
- at a time (with fractions rounded down). The overall deployment succeeds if the application revision deploys to at least half of the instances (with fractions rounded up); otherwise, the deployment fails. For example, for 9 instances, deploy to up to 4 instances at a time. The overall deployment succeeds if 5 or more instances are successfully deployed to; otherwise, the deployment fails. Note that the deployment may successfully deploy to some instances, even if the overall deployment fails.
- CodeDeployDefault.OneAtATime deploys the application revision to only
- one of the instances at a time. The overall deployment succeeds if the application revision deploys to all of the instances. The overall deployment fails after the application revision first fails to deploy to any one instance. For example, for 9 instances, deploy to one instance at a time. The overall deployment succeeds if all 9 instances are successfully deployed to, and it fails if any of one of the 9 instances fail to be deployed to. Note that the deployment may successfully deploy to some instances, even if the overall deployment fails. This is the default deployment configuration if a configuration isn’t specified for either the deployment or the deployment group.
- To create a custom deployment configuration, call the create deployment
- configuration operation.
Parameters:
-
delete_application
(application_name)¶ Deletes an application.
Parameters: application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
-
delete_deployment_config
(deployment_config_name)¶ Deletes a deployment configuration.
A deployment configuration cannot be deleted if it is currently in use. Also, predefined configurations cannot be deleted.
Parameters: deployment_config_name (string) – The name of an existing deployment configuration within the AWS user account.
-
delete_deployment_group
(application_name, deployment_group_name)¶ Deletes a deployment group.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- deployment_group_name (string) – The name of an existing deployment group for the specified application.
-
get_application
(application_name)¶ Gets information about an application.
Parameters: application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
-
get_application_revision
(application_name, revision)¶ Gets information about an application revision.
Parameters: - application_name (string) – The name of the application that corresponds to the revision.
- revision (dict) – Information about the application revision to get, including the revision’s type and its location.
-
get_deployment
(deployment_id)¶ Gets information about a deployment.
Parameters: deployment_id (string) – An existing deployment ID within the AWS user account.
-
get_deployment_config
(deployment_config_name)¶ Gets information about a deployment configuration.
Parameters: deployment_config_name (string) – The name of an existing deployment configuration within the AWS user account.
-
get_deployment_group
(application_name, deployment_group_name)¶ Gets information about a deployment group.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- deployment_group_name (string) – The name of an existing deployment group for the specified application.
-
get_deployment_instance
(deployment_id, instance_id)¶ Gets information about an Amazon EC2 instance as part of a deployment.
Parameters: - deployment_id (string) – The unique ID of a deployment.
- instance_id (string) – The unique ID of an Amazon EC2 instance in the deployment’s deployment group.
-
list_application_revisions
(application_name, sort_by=None, sort_order=None, s_3_bucket=None, s_3_key_prefix=None, deployed=None, next_token=None)¶ Lists information about revisions for an application.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- sort_by (string) – The column name to sort the list results by:
- registerTime: Sort the list results by when the revisions were
- registered with AWS CodeDeploy.
- firstUsedTime: Sort the list results by when the revisions were first
- used by in a deployment.
- lastUsedTime: Sort the list results by when the revisions were last
- used in a deployment.
- If not specified or set to null, the results will be returned in an
- arbitrary order.
Parameters: sort_order (string) – The order to sort the list results by: - ascending: Sort the list results in ascending order.
- descending: Sort the list results in descending order.
If not specified, the results will be sorted in ascending order.
If set to null, the results will be sorted in an arbitrary order.
Parameters: s_3_bucket (string) – A specific Amazon S3 bucket name to limit the search for revisions. If set to null, then all of the user’s buckets will be searched.
Parameters: - s_3_key_prefix (string) – A specific key prefix for the set of Amazon S3 objects to limit the search for revisions.
- deployed (string) –
- Whether to list revisions based on whether the revision is the target
- revision of an deployment group:
- include: List revisions that are target revisions of a deployment
- group.
- exclude: Do not list revisions that are target revisions of a
- deployment group.
- ignore: List all revisions, regardless of whether they are target
- revisions of a deployment group.
Parameters: next_token (string) – An identifier that was returned from the previous list application revisions call, which can be used to return the next set of applications in the list.
-
list_applications
(next_token=None)¶ Lists the applications registered within the AWS user account.
Parameters: next_token (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.
-
list_deployment_configs
(next_token=None)¶ Lists the deployment configurations within the AWS user account.
Parameters: next_token (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.
-
list_deployment_groups
(application_name, next_token=None)¶ Lists the deployment groups for an application registered within the AWS user account.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- next_token (string) – An identifier that was returned from the previous list deployment groups call, which can be used to return the next set of deployment groups in the list.
-
list_deployment_instances
(deployment_id, next_token=None, instance_status_filter=None)¶ Lists the Amazon EC2 instances for a deployment within the AWS user account.
Parameters: - deployment_id (string) – The unique ID of a deployment.
- next_token (string) – An identifier that was returned from the previous list deployment instances call, which can be used to return the next set of deployment instances in the list.
- instance_status_filter (list) –
A subset of instances to list, by status:
- Pending: Include in the resulting list those instances with pending
- deployments.
- InProgress: Include in the resulting list those instances with in-
- progress deployments.
- Succeeded: Include in the resulting list those instances with
- succeeded deployments.
- Failed: Include in the resulting list those instances with failed
- deployments.
- Skipped: Include in the resulting list those instances with skipped
- deployments.
- Unknown: Include in the resulting list those instances with
- deployments in an unknown state.
-
list_deployments
(application_name=None, deployment_group_name=None, include_only_statuses=None, create_time_range=None, next_token=None)¶ Lists the deployments under a deployment group for an application registered within the AWS user account.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- deployment_group_name (string) – The name of an existing deployment group for the specified application.
- include_only_statuses (list) – A subset of deployments to list, by status:
- Created: Include in the resulting list created deployments.
- Queued: Include in the resulting list queued deployments.
- In Progress: Include in the resulting list in-progress deployments.
- Succeeded: Include in the resulting list succeeded deployments.
- Failed: Include in the resulting list failed deployments.
- Aborted: Include in the resulting list aborted deployments.
Parameters: - create_time_range (dict) – A deployment creation start- and end-time range for returning a subset of the list of deployments.
- next_token (string) – An identifier that was returned from the previous list deployments call, which can be used to return the next set of deployments in the list.
-
make_request
(action, body)¶ Makes a request to the server, with stock multiple-retry logic.
-
register_application_revision
(application_name, revision, description=None)¶ Registers with AWS CodeDeploy a revision for the specified application.
Parameters: - application_name (string) – The name of an existing AWS CodeDeploy application within the AWS user account.
- description (string) – A comment about the revision.
- revision (dict) – Information about the application revision to register, including the revision’s type and its location.
-
stop_deployment
(deployment_id)¶ Attempts to stop an ongoing deployment.
Parameters: deployment_id (string) – The unique ID of a deployment.
-
update_application
(application_name=None, new_application_name=None)¶ Changes an existing application’s name.
Parameters: - application_name (string) – The current name of the application that you want to change.
- new_application_name (string) – The new name that you want to change the application to.
-
update_deployment_group
(application_name, current_deployment_group_name, new_deployment_group_name=None, deployment_config_name=None, ec_2_tag_filters=None, auto_scaling_groups=None, service_role_arn=None)¶ Changes information about an existing deployment group.
Parameters: - application_name (string) – The application name corresponding to the deployment group to update.
- current_deployment_group_name (string) – The current name of the existing deployment group.
- new_deployment_group_name (string) – The new name of the deployment group, if you want to change it.
- deployment_config_name (string) – The replacement deployment configuration name to use, if you want to change it.
- ec_2_tag_filters (list) – The replacement set of Amazon EC2 tags to filter on, if you want to change them.
- auto_scaling_groups (list) – The replacement list of Auto Scaling groups to be included in the deployment group, if you want to change them.
- service_role_arn (string) – A replacement service role’s ARN, if you want to change it.
boto.codedeploy.exceptions¶
-
exception
boto.codedeploy.exceptions.
ApplicationAlreadyExistsException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
ApplicationDoesNotExistException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
ApplicationLimitExceededException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
ApplicationNameRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
BucketNameFilterRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentAlreadyCompletedException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentConfigAlreadyExistsException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentConfigDoesNotExistException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentConfigInUseException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentConfigLimitExceededException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentConfigNameRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentDoesNotExistException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentGroupAlreadyExistsException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentGroupDoesNotExistException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentGroupLimitExceededException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentGroupNameRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentIdRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentLimitExceededException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DeploymentNotStartedException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
DescriptionTooLongException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InstanceDoesNotExistException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InstanceIdRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidApplicationNameException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidAutoScalingGroupException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidBucketNameFilterException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidDeployedStateFilterException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidDeploymentConfigNameException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidDeploymentGroupNameException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidDeploymentIdException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidDeploymentStatusException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidEC2TagException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidInstanceStatusException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidKeyPrefixFilterException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidMinimumHealthyHostValueException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidNextTokenException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidOperationException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidRevisionException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidRoleException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidSortByException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidSortOrderException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
InvalidTimeRangeException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
RevisionDoesNotExistException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
RevisionRequiredException
(status, reason, body=None, *args)¶
-
exception
boto.codedeploy.exceptions.
RoleRequiredException
(status, reason, body=None, *args)¶