Client
codedeploy | R Documentation |
AWS CodeDeploy¶
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
-
CodeDeploy Developer Forum
Usage¶
Arguments¶
config
Optional configuration of credentials, endpoint, and/or region.
credentials:
creds:
access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
endpoint: The complete URL to use for the constructed client.
region: The AWS Region used in instantiating the client.
close_connection: Immediately close all HTTP connections.
timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.
s3_force_path_style: Set this to
true
to force the request to use path-style addressing, i.e.http://s3.amazonaws.com/BUCKET/KEY
.sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html
credentials
Optional credentials shorthand for the config parameter
creds:
access_key_id: AWS access key ID
secret_access_key: AWS secret access key
session_token: AWS temporary session token
profile: The name of a profile to use. If not given, then the default profile is used.
anonymous: Set anonymous credentials.
endpoint
Optional shorthand for complete URL to use for the constructed client.
region
Optional shorthand for AWS Region used in instantiating the client.
Value¶
A client for the service. You can call the service's operations using
syntax like svc$operation(...)
, where svc
is the name you've
assigned to the client. The available operations are listed in the
Operations section.
Service syntax¶
svc <- codedeploy(
config = list(
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string",
close_connection = "logical",
timeout = "numeric",
s3_force_path_style = "logical",
sts_regional_endpoint = "string"
),
credentials = list(
creds = list(
access_key_id = "string",
secret_access_key = "string",
session_token = "string"
),
profile = "string",
anonymous = "logical"
),
endpoint = "string",
region = "string"
)
Operations¶
- add_tags_to_on_premises_instances
- Adds tags to on-premises instances
- batch_get_application_revisions
- Gets information about one or more application revisions
- batch_get_applications
- Gets information about one or more applications
- batch_get_deployment_groups
- Gets information about one or more deployment groups
- batch_get_deployment_instances
- This method works, but is deprecated
- batch_get_deployments
- Gets information about one or more deployments
- batch_get_deployment_targets
- Returns an array of one or more targets associated with a deployment
- batch_get_on_premises_instances
- Gets information about one or more on-premises instances
- continue_deployment
- 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
- create_application
- Creates an application
- create_deployment
- Deploys an application revision through the specified deployment group
- create_deployment_config
- Creates a deployment configuration
- create_deployment_group
- Creates a deployment group to which application revisions are deployed
- delete_application
- Deletes an application
- delete_deployment_config
- Deletes a deployment configuration
- delete_deployment_group
- Deletes a deployment group
- delete_git_hub_account_token
- Deletes a GitHub account connection
- delete_resources_by_external_id
- Deletes resources linked to an external ID
- deregister_on_premises_instance
- Deregisters an on-premises instance
- get_application
- Gets information about an application
- get_application_revision
- Gets information about an application revision
- get_deployment
- Gets information about a deployment
- get_deployment_config
- Gets information about a deployment configuration
- get_deployment_group
- Gets information about a deployment group
- get_deployment_instance
- Gets information about an instance as part of a deployment
- get_deployment_target
- Returns information about a deployment target
- get_on_premises_instance
- Gets information about an on-premises instance
- list_application_revisions
- Lists information about revisions for an application
- list_applications
- Lists the applications registered with the user or Amazon Web Services account
- list_deployment_configs
- Lists the deployment configurations with the user or Amazon Web Services account
- list_deployment_groups
- Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account
- list_deployment_instances
- The newer BatchGetDeploymentTargets should be used instead because it works with all compute types
- list_deployments
- Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account
- list_deployment_targets
- Returns an array of target IDs that are associated a deployment
- list_git_hub_account_token_names
- Lists the names of stored connections to GitHub accounts
- list_on_premises_instances
- Gets a list of names for one or more on-premises instances
- list_tags_for_resource
- Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN)
- Sets the result of a Lambda validation function
- register_application_revision
- Registers with CodeDeploy a revision for the specified application
- register_on_premises_instance
- Registers an on-premises instance
- Removes one or more tags from one or more on-premises instances
- In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete
- stop_deployment
- Attempts to stop an ongoing deployment
- tag_resource
- Associates the list of tags in the input Tags parameter with the resource identified by the ResourceArn input parameter
- untag_resource
- Disassociates a resource from a list of tags
- update_application
- Changes the name of an application
- update_deployment_group
- Changes information about a deployment group