Class: AWS.CodeDeploy
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.CodeDeploy
- Identifier:
- codedeploy
- API Version:
- 2014-10-06
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances, on-premises instances running in your own facility, serverless Lambda functions, or applications in an Amazon ECS service.
You can deploy a nearly unlimited variety of application content, such as an updated Lambda function, updated applications in an Amazon ECS service, code, web and configuration files, executables, packages, scripts, multimedia files, and so on. CodeDeploy can deploy application content stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories. You do not need to make changes to your existing code before you can use CodeDeploy.
CodeDeploy makes it easier for you to rapidly release new features, helps you avoid downtime during application deployment, and handles the complexity of updating your applications, without many of the risks associated with error-prone manual deployments.
CodeDeploy Components
Use the information in this guide to help you work with the following CodeDeploy components:
-
Application: A name that uniquely identifies the application you want to deploy. CodeDeploy uses this name, which functions as a container, to ensure the correct combination of revision, deployment configuration, and deployment group are referenced during a deployment.
-
Deployment group: A set of individual instances, CodeDeploy Lambda deployment configuration settings, or an Amazon ECS service and network details. A Lambda deployment group specifies how to route traffic to a new version of a Lambda function. An Amazon ECS deployment group specifies the service created in Amazon ECS to deploy, a load balancer, and a listener to reroute production traffic to an updated containerized application. An Amazon EC2/On-premises deployment group contains individually tagged instances, Amazon EC2 instances in Amazon EC2 Auto Scaling groups, or both. All deployment groups can specify optional trigger, alarm, and rollback settings.
-
Deployment configuration: A set of deployment rules and deployment success and failure conditions used by CodeDeploy during a deployment.
-
Deployment: The process and the components used when updating a Lambda function, a containerized application in an Amazon ECS service, or of installing content on one or more instances.
-
Application revisions: For an Lambda deployment, this is an AppSpec file that specifies the Lambda function to be updated and one or more functions to validate deployment lifecycle events. For an Amazon ECS deployment, this is an AppSpec file that specifies the Amazon ECS task definition, container, and port where production traffic is rerouted. For an EC2/On-premises deployment, this is an archive file that contains source content—source code, webpages, executable files, and deployment scripts—along with an AppSpec file. Revisions are stored in Amazon S3 buckets or GitHub repositories. For Amazon S3, a revision is uniquely identified by its Amazon S3 object key and its ETag, version, or both. For GitHub, a revision is uniquely identified by its commit ID.
This guide also contains information to help you get details about the instances in your deployments, to make on-premises instances available for CodeDeploy deployments, to get details about a Lambda function deployment, and to get details about Amazon ECS service deployments.
CodeDeploy Information Resources
Sending a Request Using CodeDeploy
var codedeploy = new AWS.CodeDeploy();
codedeploy.batchGetDeploymentTargets(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the CodeDeploy object uses this specific API, you can
construct the object by passing the apiVersion option to the constructor:
var codedeploy = new AWS.CodeDeploy({apiVersion: '2014-10-06'});
You can also set the API version globally in AWS.config.apiVersions using
the codedeploy service identifier:
AWS.config.apiVersions = {
codedeploy: '2014-10-06',
// other service API versions
};
var codedeploy = new AWS.CodeDeploy();
Waiter Resource States
This service supports a list of resource states that can be polled using the waitFor() method. The resource states are:
Constructor Summary collapse
-
new AWS.CodeDeploy(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
addTagsToOnPremisesInstances(params = {}, callback) ⇒ AWS.Request
Adds tags to on-premises instances.
.
-
batchGetApplicationRevisions(params = {}, callback) ⇒ AWS.Request
Gets information about one or more application revisions.
-
batchGetApplications(params = {}, callback) ⇒ AWS.Request
Gets information about one or more applications.
-
batchGetDeploymentGroups(params = {}, callback) ⇒ AWS.Request
Gets information about one or more deployment groups.
.
-
batchGetDeploymentInstances(params = {}, callback) ⇒ AWS.Request
Note: This method works, but is deprecated.
- batchGetDeployments(params = {}, callback) ⇒ AWS.Request
Gets information about one or more deployments.
- batchGetDeploymentTargets(params = {}, callback) ⇒ AWS.Request
Returns an array of one or more targets associated with a deployment.
- batchGetOnPremisesInstances(params = {}, callback) ⇒ AWS.Request
Gets information about one or more on-premises instances.
- continueDeployment(params = {}, callback) ⇒ AWS.Request
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.
- createApplication(params = {}, callback) ⇒ AWS.Request
Creates an application.
.
- createDeployment(params = {}, callback) ⇒ AWS.Request
Deploys an application revision through the specified deployment group.
.
- createDeploymentConfig(params = {}, callback) ⇒ AWS.Request
Creates a deployment configuration.
- createDeploymentGroup(params = {}, callback) ⇒ AWS.Request
Creates a deployment group to which application revisions are deployed.
.
- deleteApplication(params = {}, callback) ⇒ AWS.Request
Deletes an application.
.
- deleteDeploymentConfig(params = {}, callback) ⇒ AWS.Request
Deletes a deployment configuration.
Note: A deployment configuration cannot be deleted if it is currently in use.- deleteDeploymentGroup(params = {}, callback) ⇒ AWS.Request
Deletes a deployment group.
.
- deleteGitHubAccountToken(params = {}, callback) ⇒ AWS.Request
Deletes a GitHub account connection.
.
- deleteResourcesByExternalId(params = {}, callback) ⇒ AWS.Request
Deletes resources linked to an external ID.
- deregisterOnPremisesInstance(params = {}, callback) ⇒ AWS.Request
Deregisters an on-premises instance.
.
- getApplication(params = {}, callback) ⇒ AWS.Request
Gets information about an application.
.
- getApplicationRevision(params = {}, callback) ⇒ AWS.Request
Gets information about an application revision.
.
- getDeployment(params = {}, callback) ⇒ AWS.Request
Gets information about a deployment.
Note: Thecontentproperty of theappSpecContentobject in the returned revision is always null.- getDeploymentConfig(params = {}, callback) ⇒ AWS.Request
Gets information about a deployment configuration.
.
- getDeploymentGroup(params = {}, callback) ⇒ AWS.Request
Gets information about a deployment group.
.
- getDeploymentInstance(params = {}, callback) ⇒ AWS.Request
Gets information about an instance as part of a deployment.
.
- getDeploymentTarget(params = {}, callback) ⇒ AWS.Request
Returns information about a deployment target.
- getOnPremisesInstance(params = {}, callback) ⇒ AWS.Request
Gets information about an on-premises instance.
- listApplicationRevisions(params = {}, callback) ⇒ AWS.Request
Lists information about revisions for an application.
.
- listApplications(params = {}, callback) ⇒ AWS.Request
Lists the applications registered with the user or Amazon Web Services account.
.
- listDeploymentConfigs(params = {}, callback) ⇒ AWS.Request
Lists the deployment configurations with the user or Amazon Web Services account.
.
- listDeploymentGroups(params = {}, callback) ⇒ AWS.Request
Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.
.
- listDeploymentInstances(params = {}, callback) ⇒ AWS.Request
Note: The newerBatchGetDeploymentTargetsshould be used instead because it works with all compute types.- listDeployments(params = {}, callback) ⇒ AWS.Request
Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.
.
- listDeploymentTargets(params = {}, callback) ⇒ AWS.Request
Returns an array of target IDs that are associated a deployment.
- listGitHubAccountTokenNames(params = {}, callback) ⇒ AWS.Request
Lists the names of stored connections to GitHub accounts.
.
- listOnPremisesInstances(params = {}, callback) ⇒ AWS.Request
Gets a list of names for one or more on-premises instances.
Unless otherwise specified, both registered and deregistered on-premises instance names are listed.
- listTagsForResource(params = {}, callback) ⇒ AWS.Request
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN).
- putLifecycleEventHookExecutionStatus(params = {}, callback) ⇒ AWS.Request
Sets the result of a Lambda validation function.
- registerApplicationRevision(params = {}, callback) ⇒ AWS.Request
Registers with CodeDeploy a revision for the specified application.
.
- registerOnPremisesInstance(params = {}, callback) ⇒ AWS.Request
Registers an on-premises instance.
Note: Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request.- removeTagsFromOnPremisesInstances(params = {}, callback) ⇒ AWS.Request
Removes one or more tags from one or more on-premises instances.
.
- skipWaitTimeForInstanceTermination(params = {}, callback) ⇒ AWS.Request
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.
.
- stopDeployment(params = {}, callback) ⇒ AWS.Request
Attempts to stop an ongoing deployment.
.
- tagResource(params = {}, callback) ⇒ AWS.Request
Associates the list of tags in the input
Tagsparameter with the resource identified by theResourceArninput parameter.- untagResource(params = {}, callback) ⇒ AWS.Request
Disassociates a resource from a list of tags.
- updateApplication(params = {}, callback) ⇒ AWS.Request
Changes the name of an application.
.
- updateDeploymentGroup(params = {}, callback) ⇒ AWS.Request
Changes information about a deployment group.
.
- waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given CodeDeploy resource.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService
Constructor Details
new AWS.CodeDeploy(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Property Details
Method Details
addTagsToOnPremisesInstances(params = {}, callback) ⇒ AWS.Request
Adds tags to on-premises instances.
batchGetApplicationRevisions(params = {}, callback) ⇒ AWS.Request
Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.
batchGetApplications(params = {}, callback) ⇒ AWS.Request
Gets information about one or more applications. The maximum number of applications that can be returned is 100.
batchGetDeploymentGroups(params = {}, callback) ⇒ AWS.Request
Gets information about one or more deployment groups.
batchGetDeploymentInstances(params = {}, callback) ⇒ AWS.Request
Note: This method works, but is deprecated. UseBatchGetDeploymentTargetsinstead.Returns an array of one or more instances associated with a deployment. This method works with EC2/On-premises and Lambda compute platforms. The newer
BatchGetDeploymentTargetsworks with all compute platforms. The maximum number of instances that can be returned is 25. - batchGetDeployments(params = {}, callback) ⇒ AWS.Request