AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Implementation for accessing CodeDeploy
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
Namespace: Amazon.CodeDeploy
Assembly: AWSSDK.CodeDeploy.dll
Version: 3.x.y.z
public class AmazonCodeDeployClient : AmazonServiceClient IAmazonCodeDeploy, IAmazonService, IDisposable
The AmazonCodeDeployClient type exposes the following members
Name | Description | |
---|---|---|
AmazonCodeDeployClient() |
Constructs AmazonCodeDeployClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCodeDeployClient(RegionEndpoint) |
Constructs AmazonCodeDeployClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCodeDeployClient(AmazonCodeDeployConfig) |
Constructs AmazonCodeDeployClient with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="AWSProfileName" value="AWS Default"/> </appSettings> </configuration> |
|
AmazonCodeDeployClient(AWSCredentials) |
Constructs AmazonCodeDeployClient with AWS Credentials |
|
AmazonCodeDeployClient(AWSCredentials, RegionEndpoint) |
Constructs AmazonCodeDeployClient with AWS Credentials |
|
AmazonCodeDeployClient(AWSCredentials, AmazonCodeDeployConfig) |
Constructs AmazonCodeDeployClient with AWS Credentials and an AmazonCodeDeployClient Configuration object. |
|
AmazonCodeDeployClient(string, string) |
Constructs AmazonCodeDeployClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCodeDeployClient(string, string, RegionEndpoint) |
Constructs AmazonCodeDeployClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCodeDeployClient(string, string, AmazonCodeDeployConfig) |
Constructs AmazonCodeDeployClient with AWS Access Key ID, AWS Secret Key and an AmazonCodeDeployClient Configuration object. |
|
AmazonCodeDeployClient(string, string, string) |
Constructs AmazonCodeDeployClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCodeDeployClient(string, string, string, RegionEndpoint) |
Constructs AmazonCodeDeployClient with AWS Access Key ID and AWS Secret Key |
|
AmazonCodeDeployClient(string, string, string, AmazonCodeDeployConfig) |
Constructs AmazonCodeDeployClient with AWS Access Key ID, AWS Secret Key and an AmazonCodeDeployClient Configuration object. |
Name | Type | Description | |
---|---|---|---|
Config | Amazon.Runtime.IClientConfig | Inherited from Amazon.Runtime.AmazonServiceClient. | |
Paginators | Amazon.CodeDeploy.Model.ICodeDeployPaginatorFactory |
Paginators for the service |
Name | Description | |
---|---|---|
AddTagsToOnPremisesInstances(AddTagsToOnPremisesInstancesRequest) |
Adds tags to on-premises instances. |
|
AddTagsToOnPremisesInstancesAsync(AddTagsToOnPremisesInstancesRequest, CancellationToken) |
Adds tags to on-premises instances. |
|
BatchGetApplicationRevisions(BatchGetApplicationRevisionsRequest) |
Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25. |
|
BatchGetApplicationRevisionsAsync(BatchGetApplicationRevisionsRequest, CancellationToken) |
Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25. |
|
BatchGetApplications(BatchGetApplicationsRequest) |
Gets information about one or more applications. The maximum number of applications that can be returned is 100. |
|
BatchGetApplicationsAsync(BatchGetApplicationsRequest, CancellationToken) |
Gets information about one or more applications. The maximum number of applications that can be returned is 100. |
|
BatchGetDeploymentGroups(BatchGetDeploymentGroupsRequest) |
Gets information about one or more deployment groups. |
|
BatchGetDeploymentGroupsAsync(BatchGetDeploymentGroupsRequest, CancellationToken) |
Gets information about one or more deployment groups. |
|
BatchGetDeploymentInstances(BatchGetDeploymentInstancesRequest) |
This method works, but is deprecated. Use
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 |
|
BatchGetDeploymentInstancesAsync(BatchGetDeploymentInstancesRequest, CancellationToken) |
This method works, but is deprecated. Use
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 |
|
BatchGetDeployments(BatchGetDeploymentsRequest) |
Gets information about one or more deployments. The maximum number of deployments that can be returned is 25. |
|
BatchGetDeploymentsAsync(BatchGetDeploymentsRequest, CancellationToken) |
Gets information about one or more deployments. The maximum number of deployments that can be returned is 25. |
|
BatchGetDeploymentTargets(BatchGetDeploymentTargetsRequest) |
Returns an array of one or more targets associated with a deployment. This method
works with all compute types and should be used instead of the deprecated The type of targets returned depends on the deployment's compute platform or deployment method:
|
|
BatchGetDeploymentTargetsAsync(BatchGetDeploymentTargetsRequest, CancellationToken) |
Returns an array of one or more targets associated with a deployment. This method
works with all compute types and should be used instead of the deprecated The type of targets returned depends on the deployment's compute platform or deployment method:
|
|
BatchGetOnPremisesInstances(BatchGetOnPremisesInstancesRequest) |
Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25. |
|
BatchGetOnPremisesInstancesAsync(BatchGetOnPremisesInstancesRequest, CancellationToken) |
Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25. |
|
ContinueDeployment(ContinueDeploymentRequest) |
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.) |
|
ContinueDeploymentAsync(ContinueDeploymentRequest, CancellationToken) |
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.) |
|
CreateApplication(CreateApplicationRequest) |
Creates an application. |
|
CreateApplicationAsync(CreateApplicationRequest, CancellationToken) |
Creates an application. |
|
CreateDeployment(CreateDeploymentRequest) |
Deploys an application revision through the specified deployment group. |
|
CreateDeploymentAsync(CreateDeploymentRequest, CancellationToken) |
Deploys an application revision through the specified deployment group. |
|
CreateDeploymentConfig(CreateDeploymentConfigRequest) |
Creates a deployment configuration. |
|
CreateDeploymentConfigAsync(CreateDeploymentConfigRequest, CancellationToken) |
Creates a deployment configuration. |
|
CreateDeploymentGroup(CreateDeploymentGroupRequest) |
Creates a deployment group to which application revisions are deployed. |
|
CreateDeploymentGroupAsync(CreateDeploymentGroupRequest, CancellationToken) |
Creates a deployment group to which application revisions are deployed. |
|
DeleteApplication(DeleteApplicationRequest) |
Deletes an application. |
|
DeleteApplicationAsync(DeleteApplicationRequest, CancellationToken) |
Deletes an application. |
|
DeleteDeploymentConfig(DeleteDeploymentConfigRequest) |
Deletes a deployment configuration.
A deployment configuration cannot be deleted if it is currently in use. Predefined
configurations cannot be deleted.
|
|
DeleteDeploymentConfigAsync(DeleteDeploymentConfigRequest, CancellationToken) |
Deletes a deployment configuration.
A deployment configuration cannot be deleted if it is currently in use. Predefined
configurations cannot be deleted.
|
|
DeleteDeploymentGroup(DeleteDeploymentGroupRequest) |
Deletes a deployment group. |
|
DeleteDeploymentGroupAsync(DeleteDeploymentGroupRequest, CancellationToken) |
Deletes a deployment group. |
|
DeleteGitHubAccountToken(DeleteGitHubAccountTokenRequest) |
Deletes a GitHub account connection. |
|
DeleteGitHubAccountTokenAsync(DeleteGitHubAccountTokenRequest, CancellationToken) |
Deletes a GitHub account connection. |
|
DeleteResourcesByExternalId(DeleteResourcesByExternalIdRequest) |
Deletes resources linked to an external ID. This action only applies if you have configured
blue/green deployments through CloudFormation.
It is not necessary to call this action directly. CloudFormation calls it on your
behalf when it needs to delete stack resources. This action is offered publicly in
case you need to delete resources to comply with General Data Protection Regulation
(GDPR) requirements.
|
|
DeleteResourcesByExternalIdAsync(DeleteResourcesByExternalIdRequest, CancellationToken) |
Deletes resources linked to an external ID. This action only applies if you have configured
blue/green deployments through CloudFormation.
It is not necessary to call this action directly. CloudFormation calls it on your
behalf when it needs to delete stack resources. This action is offered publicly in
case you need to delete resources to comply with General Data Protection Regulation
(GDPR) requirements.
|
|
DeregisterOnPremisesInstance(DeregisterOnPremisesInstanceRequest) |
Deregisters an on-premises instance. |
|
DeregisterOnPremisesInstanceAsync(DeregisterOnPremisesInstanceRequest, CancellationToken) |
Deregisters an on-premises instance. |
|
DetermineServiceOperationEndpoint(AmazonWebServiceRequest) |
Returns the endpoint that will be used for a particular request. |
|
Dispose() | Inherited from Amazon.Runtime.AmazonServiceClient. | |
GetApplication(GetApplicationRequest) |
Gets information about an application. |
|
GetApplicationAsync(GetApplicationRequest, CancellationToken) |
Gets information about an application. |
|
GetApplicationRevision(GetApplicationRevisionRequest) |
Gets information about an application revision. |
|
GetApplicationRevisionAsync(GetApplicationRevisionRequest, CancellationToken) |
Gets information about an application revision. |
|
GetDeployment(GetDeploymentRequest) |
Gets information about a deployment.
The |
|
GetDeploymentAsync(GetDeploymentRequest, CancellationToken) |
Gets information about a deployment.
The |
|
GetDeploymentConfig(GetDeploymentConfigRequest) |
Gets information about a deployment configuration. |
|
GetDeploymentConfigAsync(GetDeploymentConfigRequest, CancellationToken) |
Gets information about a deployment configuration. |
|
GetDeploymentGroup(GetDeploymentGroupRequest) |
Gets information about a deployment group. |
|
GetDeploymentGroupAsync(GetDeploymentGroupRequest, CancellationToken) |
Gets information about a deployment group. |
|
GetDeploymentInstance(GetDeploymentInstanceRequest) |
Gets information about an instance as part of a deployment. |
|
GetDeploymentInstanceAsync(GetDeploymentInstanceRequest, CancellationToken) |
Gets information about an instance as part of a deployment. |
|
GetDeploymentTarget(GetDeploymentTargetRequest) |
Returns information about a deployment target. |
|
GetDeploymentTargetAsync(GetDeploymentTargetRequest, CancellationToken) |
Returns information about a deployment target. |
|
GetOnPremisesInstance(GetOnPremisesInstanceRequest) |
Gets information about an on-premises instance. |
|
GetOnPremisesInstanceAsync(GetOnPremisesInstanceRequest, CancellationToken) |
Gets information about an on-premises instance. |
|
ListApplicationRevisions(ListApplicationRevisionsRequest) |
Lists information about revisions for an application. |
|
ListApplicationRevisionsAsync(ListApplicationRevisionsRequest, CancellationToken) |
Lists information about revisions for an application. |
|
ListApplications() |
Lists the applications registered with the user or Amazon Web Services account. |
|
ListApplications(ListApplicationsRequest) |
Lists the applications registered with the user or Amazon Web Services account. |
|
ListApplicationsAsync(CancellationToken) |
Lists the applications registered with the user or Amazon Web Services account. |
|
ListApplicationsAsync(ListApplicationsRequest, CancellationToken) |
Lists the applications registered with the user or Amazon Web Services account. |
|
ListDeploymentConfigs() |
Lists the deployment configurations with the user or Amazon Web Services account. |
|
ListDeploymentConfigs(ListDeploymentConfigsRequest) |
Lists the deployment configurations with the user or Amazon Web Services account. |
|
ListDeploymentConfigsAsync(CancellationToken) |
Lists the deployment configurations with the user or Amazon Web Services account. |
|
ListDeploymentConfigsAsync(ListDeploymentConfigsRequest, CancellationToken) |
Lists the deployment configurations with the user or Amazon Web Services account. |
|
ListDeploymentGroups(ListDeploymentGroupsRequest) |
Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account. |
|
ListDeploymentGroupsAsync(ListDeploymentGroupsRequest, CancellationToken) |
Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account. |
|
ListDeploymentInstances(ListDeploymentInstancesRequest) |
The newer Lists the instance for a deployment associated with the user or Amazon Web Services account. |
|
ListDeploymentInstancesAsync(ListDeploymentInstancesRequest, CancellationToken) |
The newer Lists the instance for a deployment associated with the user or Amazon Web Services account. |
|
ListDeployments(ListDeploymentsRequest) |
Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account. |
|
ListDeploymentsAsync(ListDeploymentsRequest, CancellationToken) |
Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account. |
|
ListDeploymentTargets(ListDeploymentTargetsRequest) |
Returns an array of target IDs that are associated a deployment. |
|
ListDeploymentTargetsAsync(ListDeploymentTargetsRequest, CancellationToken) |
Returns an array of target IDs that are associated a deployment. |
|
ListGitHubAccountTokenNames(ListGitHubAccountTokenNamesRequest) |
Lists the names of stored connections to GitHub accounts. |
|
ListGitHubAccountTokenNamesAsync(ListGitHubAccountTokenNamesRequest, CancellationToken) |
Lists the names of stored connections to GitHub accounts. |
|
ListOnPremisesInstances(ListOnPremisesInstancesRequest) |
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. To list only registered or deregistered on-premises instance names, use the registration status parameter. |
|
ListOnPremisesInstancesAsync(ListOnPremisesInstancesRequest, CancellationToken) |
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. To list only registered or deregistered on-premises instance names, use the registration status parameter. |
|
ListTagsForResource(ListTagsForResourceRequest) |
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources. |
|
ListTagsForResourceAsync(ListTagsForResourceRequest, CancellationToken) |
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN). Tags are used to organize and categorize your CodeDeploy resources. |
|
PutLifecycleEventHookExecutionStatus(PutLifecycleEventHookExecutionStatusRequest) |
Sets the result of a Lambda validation function. The function validates lifecycle
hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For
Lambda deployments, the available lifecycle hooks are |
|
PutLifecycleEventHookExecutionStatusAsync(PutLifecycleEventHookExecutionStatusRequest, CancellationToken) |
Sets the result of a Lambda validation function. The function validates lifecycle
hooks during a deployment that uses the Lambda or Amazon ECS compute platform. For
Lambda deployments, the available lifecycle hooks are |
|
RegisterApplicationRevision(RegisterApplicationRevisionRequest) |
Registers with CodeDeploy a revision for the specified application. |
|
RegisterApplicationRevisionAsync(RegisterApplicationRevisionRequest, CancellationToken) |
Registers with CodeDeploy a revision for the specified application. |
|
RegisterOnPremisesInstance(RegisterOnPremisesInstanceRequest) |
Registers an on-premises instance.
Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request.
You cannot use both.
|
|
RegisterOnPremisesInstanceAsync(RegisterOnPremisesInstanceRequest, CancellationToken) |
Registers an on-premises instance.
Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request.
You cannot use both.
|
|
RemoveTagsFromOnPremisesInstances(RemoveTagsFromOnPremisesInstancesRequest) |
Removes one or more tags from one or more on-premises instances. |
|
RemoveTagsFromOnPremisesInstancesAsync(RemoveTagsFromOnPremisesInstancesRequest, CancellationToken) |
Removes one or more tags from one or more on-premises instances. |
|
SkipWaitTimeForInstanceTermination(SkipWaitTimeForInstanceTerminationRequest) |
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete. |
|
SkipWaitTimeForInstanceTerminationAsync(SkipWaitTimeForInstanceTerminationRequest, CancellationToken) |
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete. |
|
StopDeployment(StopDeploymentRequest) |
Attempts to stop an ongoing deployment. |
|
StopDeploymentAsync(StopDeploymentRequest, CancellationToken) |
Attempts to stop an ongoing deployment. |
|
TagResource(TagResourceRequest) |
Associates the list of tags in the input |
|
TagResourceAsync(TagResourceRequest, CancellationToken) |
Associates the list of tags in the input |
|
UntagResource(UntagResourceRequest) |
Disassociates a resource from a list of tags. The resource is identified by the |
|
UntagResourceAsync(UntagResourceRequest, CancellationToken) |
Disassociates a resource from a list of tags. The resource is identified by the |
|
UpdateApplication(UpdateApplicationRequest) |
Changes the name of an application. |
|
UpdateApplicationAsync(UpdateApplicationRequest, CancellationToken) |
Changes the name of an application. |
|
UpdateDeploymentGroup(UpdateDeploymentGroupRequest) |
Changes information about a deployment group. |
|
UpdateDeploymentGroupAsync(UpdateDeploymentGroupRequest, CancellationToken) |
Changes information about a deployment group. |
Name | Description | |
---|---|---|
AfterResponseEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
BeforeRequestEvent | Inherited from Amazon.Runtime.AmazonServiceClient. | |
ExceptionEvent | Inherited from Amazon.Runtime.AmazonServiceClient. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5