Class: Aws::CodeDeploy::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CodeDeploy::Client
- Includes:
- Aws::ClientStubs
- Defined in:
- lib/aws-sdk-codedeploy/client.rb
Overview
An API client for CodeDeploy. To construct a client, you need to configure a ‘:region` and `:credentials`.
client = Aws::CodeDeploy::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
See #initialize for a full list of supported configuration options.
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_tags_to_on_premises_instances(params = {}) ⇒ Struct
Adds tags to on-premises instances.
-
#batch_get_application_revisions(params = {}) ⇒ Types::BatchGetApplicationRevisionsOutput
Gets information about one or more application revisions.
-
#batch_get_applications(params = {}) ⇒ Types::BatchGetApplicationsOutput
Gets information about one or more applications.
-
#batch_get_deployment_groups(params = {}) ⇒ Types::BatchGetDeploymentGroupsOutput
Gets information about one or more deployment groups.
-
#batch_get_deployment_instances(params = {}) ⇒ Types::BatchGetDeploymentInstancesOutput
<note markdown=“1”> This method works, but is deprecated.
-
#batch_get_deployment_targets(params = {}) ⇒ Types::BatchGetDeploymentTargetsOutput
Returns an array of one or more targets associated with a deployment.
-
#batch_get_deployments(params = {}) ⇒ Types::BatchGetDeploymentsOutput
Gets information about one or more deployments.
-
#batch_get_on_premises_instances(params = {}) ⇒ Types::BatchGetOnPremisesInstancesOutput
Gets information about one or more on-premises instances.
-
#continue_deployment(params = {}) ⇒ Struct
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(params = {}) ⇒ Types::CreateApplicationOutput
Creates an application.
-
#create_deployment(params = {}) ⇒ Types::CreateDeploymentOutput
Deploys an application revision through the specified deployment group.
-
#create_deployment_config(params = {}) ⇒ Types::CreateDeploymentConfigOutput
Creates a deployment configuration.
-
#create_deployment_group(params = {}) ⇒ Types::CreateDeploymentGroupOutput
Creates a deployment group to which application revisions are deployed.
-
#delete_application(params = {}) ⇒ Struct
Deletes an application.
-
#delete_deployment_config(params = {}) ⇒ Struct
Deletes a deployment configuration.
-
#delete_deployment_group(params = {}) ⇒ Types::DeleteDeploymentGroupOutput
Deletes a deployment group.
-
#delete_git_hub_account_token(params = {}) ⇒ Types::DeleteGitHubAccountTokenOutput
Deletes a GitHub account connection.
-
#delete_resources_by_external_id(params = {}) ⇒ Struct
Deletes resources linked to an external ID.
-
#deregister_on_premises_instance(params = {}) ⇒ Struct
Deregisters an on-premises instance.
-
#get_application(params = {}) ⇒ Types::GetApplicationOutput
Gets information about an application.
-
#get_application_revision(params = {}) ⇒ Types::GetApplicationRevisionOutput
Gets information about an application revision.
-
#get_deployment(params = {}) ⇒ Types::GetDeploymentOutput
Gets information about a deployment.
-
#get_deployment_config(params = {}) ⇒ Types::GetDeploymentConfigOutput
Gets information about a deployment configuration.
-
#get_deployment_group(params = {}) ⇒ Types::GetDeploymentGroupOutput
Gets information about a deployment group.
-
#get_deployment_instance(params = {}) ⇒ Types::GetDeploymentInstanceOutput
Gets information about an instance as part of a deployment.
-
#get_deployment_target(params = {}) ⇒ Types::GetDeploymentTargetOutput
Returns information about a deployment target.
-
#get_on_premises_instance(params = {}) ⇒ Types::GetOnPremisesInstanceOutput
Gets information about an on-premises instance.
-
#list_application_revisions(params = {}) ⇒ Types::ListApplicationRevisionsOutput
Lists information about revisions for an application.
-
#list_applications(params = {}) ⇒ Types::ListApplicationsOutput
Lists the applications registered with the user or Amazon Web Services account.
-
#list_deployment_configs(params = {}) ⇒ Types::ListDeploymentConfigsOutput
Lists the deployment configurations with the user or Amazon Web Services account.
-
#list_deployment_groups(params = {}) ⇒ Types::ListDeploymentGroupsOutput
Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.
-
#list_deployment_instances(params = {}) ⇒ Types::ListDeploymentInstancesOutput
<note markdown=“1”> The newer ‘BatchGetDeploymentTargets` should be used instead because it works with all compute types.
-
#list_deployment_targets(params = {}) ⇒ Types::ListDeploymentTargetsOutput
Returns an array of target IDs that are associated a deployment.
-
#list_deployments(params = {}) ⇒ Types::ListDeploymentsOutput
Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.
-
#list_git_hub_account_token_names(params = {}) ⇒ Types::ListGitHubAccountTokenNamesOutput
Lists the names of stored connections to GitHub accounts.
-
#list_on_premises_instances(params = {}) ⇒ Types::ListOnPremisesInstancesOutput
Gets a list of names for one or more on-premises instances.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
Returns a list of tags for the resource identified by a specified Amazon Resource Name (ARN).
-
#put_lifecycle_event_hook_execution_status(params = {}) ⇒ Types::PutLifecycleEventHookExecutionStatusOutput
Sets the result of a Lambda validation function.
-
#register_application_revision(params = {}) ⇒ Struct
Registers with CodeDeploy a revision for the specified application.
-
#register_on_premises_instance(params = {}) ⇒ Struct
Registers an on-premises instance.
-
#remove_tags_from_on_premises_instances(params = {}) ⇒ Struct
Removes one or more tags from one or more on-premises instances.
-
#skip_wait_time_for_instance_termination(params = {}) ⇒ Struct
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.
-
#stop_deployment(params = {}) ⇒ Types::StopDeploymentOutput
Attempts to stop an ongoing deployment.
-
#tag_resource(params = {}) ⇒ Struct
Associates the list of tags in the input ‘Tags` parameter with the resource identified by the `ResourceArn` input parameter.
-
#untag_resource(params = {}) ⇒ Struct
Disassociates a resource from a list of tags.
-
#update_application(params = {}) ⇒ Struct
Changes the name of an application.
-
#update_deployment_group(params = {}) ⇒ Types::UpdateDeploymentGroupOutput
Changes information about a deployment group.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
451 452 453 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 451 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3764 3765 3766 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3764 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3767 3768 3769 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3767 def errors_module Errors end |
Instance Method Details
#add_tags_to_on_premises_instances(params = {}) ⇒ Struct
Adds tags to on-premises instances.
486 487 488 489 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 486 def (params = {}, = {}) req = build_request(:add_tags_to_on_premises_instances, params) req.send_request() end |
#batch_get_application_revisions(params = {}) ⇒ Types::BatchGetApplicationRevisionsOutput
Gets information about one or more application revisions. The maximum number of application revisions that can be returned is 25.
567 568 569 570 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 567 def batch_get_application_revisions(params = {}, = {}) req = build_request(:batch_get_application_revisions, params) req.send_request() end |
#batch_get_applications(params = {}) ⇒ Types::BatchGetApplicationsOutput
Gets information about one or more applications. The maximum number of applications that can be returned is 100.
603 604 605 606 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 603 def batch_get_applications(params = {}, = {}) req = build_request(:batch_get_applications, params) req.send_request() end |
#batch_get_deployment_groups(params = {}) ⇒ Types::BatchGetDeploymentGroupsOutput
Gets information about one or more deployment groups.
721 722 723 724 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 721 def batch_get_deployment_groups(params = {}, = {}) req = build_request(:batch_get_deployment_groups, params) req.send_request() end |
#batch_get_deployment_instances(params = {}) ⇒ Types::BatchGetDeploymentInstancesOutput
<note markdown=“1”> This method works, but is deprecated. Use ‘BatchGetDeploymentTargets` instead.
</note>
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 ‘BatchGetDeploymentTargets` works with all compute platforms. The maximum number of instances that can be returned is 25.
779 780 781 782 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 779 def batch_get_deployment_instances(params = {}, = {}) req = build_request(:batch_get_deployment_instances, params) req.send_request() end |
#batch_get_deployment_targets(params = {}) ⇒ Types::BatchGetDeploymentTargetsOutput
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 ‘BatchGetDeploymentInstances`. The maximum number of targets that can be returned is 25.
The type of targets returned depends on the deployment’s compute platform or deployment method:
-
EC2/On-premises: Information about Amazon EC2 instance targets.
-
Lambda: Information about Lambda functions targets.
-
**Amazon ECS**: Information about Amazon ECS service targets.
-
CloudFormation: Information about targets of blue/green deployments initiated by a CloudFormation stack update.
918 919 920 921 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 918 def batch_get_deployment_targets(params = {}, = {}) req = build_request(:batch_get_deployment_targets, params) req.send_request() end |
#batch_get_deployments(params = {}) ⇒ Types::BatchGetDeploymentsOutput
Gets information about one or more deployments. The maximum number of deployments that can be returned is 25.
1041 1042 1043 1044 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1041 def batch_get_deployments(params = {}, = {}) req = build_request(:batch_get_deployments, params) req.send_request() end |
#batch_get_on_premises_instances(params = {}) ⇒ Types::BatchGetOnPremisesInstancesOutput
Gets information about one or more on-premises instances. The maximum number of on-premises instances that can be returned is 25.
1080 1081 1082 1083 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1080 def batch_get_on_premises_instances(params = {}, = {}) req = build_request(:batch_get_on_premises_instances, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3624 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::CodeDeploy') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-codedeploy' context[:gem_version] = '1.79.0' Seahorse::Client::Request.new(handlers, context) end |
#continue_deployment(params = {}) ⇒ Struct
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.)
1115 1116 1117 1118 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1115 def continue_deployment(params = {}, = {}) req = build_request(:continue_deployment, params) req.send_request() end |
#create_application(params = {}) ⇒ Types::CreateApplicationOutput
Creates an application.
1160 1161 1162 1163 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1160 def create_application(params = {}, = {}) req = build_request(:create_application, params) req.send_request() end |
#create_deployment(params = {}) ⇒ Types::CreateDeploymentOutput
Deploys an application revision through the specified deployment group.
1346 1347 1348 1349 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1346 def create_deployment(params = {}, = {}) req = build_request(:create_deployment, params) req.send_request() end |
#create_deployment_config(params = {}) ⇒ Types::CreateDeploymentConfigOutput
Creates a deployment configuration.
1439 1440 1441 1442 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1439 def create_deployment_config(params = {}, = {}) req = build_request(:create_deployment_config, params) req.send_request() end |
#create_deployment_group(params = {}) ⇒ Types::CreateDeploymentGroupOutput
Creates a deployment group to which application revisions are deployed.
1713 1714 1715 1716 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1713 def create_deployment_group(params = {}, = {}) req = build_request(:create_deployment_group, params) req.send_request() end |
#delete_application(params = {}) ⇒ Struct
Deletes an application.
1736 1737 1738 1739 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1736 def delete_application(params = {}, = {}) req = build_request(:delete_application, params) req.send_request() end |
#delete_deployment_config(params = {}) ⇒ Struct
Deletes a deployment configuration.
<note markdown=“1”> A deployment configuration cannot be deleted if it is currently in use. Predefined configurations cannot be deleted.
</note>
1764 1765 1766 1767 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1764 def delete_deployment_config(params = {}, = {}) req = build_request(:delete_deployment_config, params) req.send_request() end |
#delete_deployment_group(params = {}) ⇒ Types::DeleteDeploymentGroupOutput
Deletes a deployment group.
1800 1801 1802 1803 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1800 def delete_deployment_group(params = {}, = {}) req = build_request(:delete_deployment_group, params) req.send_request() end |
#delete_git_hub_account_token(params = {}) ⇒ Types::DeleteGitHubAccountTokenOutput
Deletes a GitHub account connection.
1828 1829 1830 1831 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1828 def delete_git_hub_account_token(params = {}, = {}) req = build_request(:delete_git_hub_account_token, params) req.send_request() end |
#delete_resources_by_external_id(params = {}) ⇒ Struct
Deletes resources linked to an external ID. This action only applies if you have configured blue/green deployments through CloudFormation.
<note markdown=“1”> 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.
</note>
1859 1860 1861 1862 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1859 def delete_resources_by_external_id(params = {}, = {}) req = build_request(:delete_resources_by_external_id, params) req.send_request() end |
#deregister_on_premises_instance(params = {}) ⇒ Struct
Deregisters an on-premises instance.
1881 1882 1883 1884 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1881 def deregister_on_premises_instance(params = {}, = {}) req = build_request(:deregister_on_premises_instance, params) req.send_request() end |
#get_application(params = {}) ⇒ Types::GetApplicationOutput
Gets information about an application.
1915 1916 1917 1918 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1915 def get_application(params = {}, = {}) req = build_request(:get_application, params) req.send_request() end |
#get_application_revision(params = {}) ⇒ Types::GetApplicationRevisionOutput
Gets information about an application revision.
1989 1990 1991 1992 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 1989 def get_application_revision(params = {}, = {}) req = build_request(:get_application_revision, params) req.send_request() end |
#get_deployment(params = {}) ⇒ Types::GetDeploymentOutput
Gets information about a deployment.
<note markdown=“1”> The ‘content` property of the `appSpecContent` object in the returned revision is always null. Use `GetApplicationRevision` and the `sha256` property of the returned `appSpecContent` object to get the content of the deployment’s AppSpec file.
</note>
The following waiters are defined for this operation (see #wait_until for detailed usage):
* deployment_successful
2122 2123 2124 2125 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2122 def get_deployment(params = {}, = {}) req = build_request(:get_deployment, params) req.send_request() end |
#get_deployment_config(params = {}) ⇒ Types::GetDeploymentConfigOutput
Gets information about a deployment configuration.
2165 2166 2167 2168 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2165 def get_deployment_config(params = {}, = {}) req = build_request(:get_deployment_config, params) req.send_request() end |
#get_deployment_group(params = {}) ⇒ Types::GetDeploymentGroupOutput
Gets information about a deployment group.
2280 2281 2282 2283 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2280 def get_deployment_group(params = {}, = {}) req = build_request(:get_deployment_group, params) req.send_request() end |
#get_deployment_instance(params = {}) ⇒ Types::GetDeploymentInstanceOutput
Gets information about an instance as part of a deployment.
2325 2326 2327 2328 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2325 def get_deployment_instance(params = {}, = {}) req = build_request(:get_deployment_instance, params) req.send_request() end |
#get_deployment_target(params = {}) ⇒ Types::GetDeploymentTargetOutput
Returns information about a deployment target.
2429 2430 2431 2432 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2429 def get_deployment_target(params = {}, = {}) req = build_request(:get_deployment_target, params) req.send_request() end |
#get_on_premises_instance(params = {}) ⇒ Types::GetOnPremisesInstanceOutput
Gets information about an on-premises instance.
2465 2466 2467 2468 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2465 def get_on_premises_instance(params = {}, = {}) req = build_request(:get_on_premises_instance, params) req.send_request() end |
#list_application_revisions(params = {}) ⇒ Types::ListApplicationRevisionsOutput
Lists information about revisions for an application.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2568 2569 2570 2571 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2568 def list_application_revisions(params = {}, = {}) req = build_request(:list_application_revisions, params) req.send_request() end |
#list_applications(params = {}) ⇒ Types::ListApplicationsOutput
Lists the applications registered with the user or Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2603 2604 2605 2606 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2603 def list_applications(params = {}, = {}) req = build_request(:list_applications, params) req.send_request() end |
#list_deployment_configs(params = {}) ⇒ Types::ListDeploymentConfigsOutput
Lists the deployment configurations with the user or Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2639 2640 2641 2642 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2639 def list_deployment_configs(params = {}, = {}) req = build_request(:list_deployment_configs, params) req.send_request() end |
#list_deployment_groups(params = {}) ⇒ Types::ListDeploymentGroupsOutput
Lists the deployment groups for an application registered with the Amazon Web Services user or Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2682 2683 2684 2685 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2682 def list_deployment_groups(params = {}, = {}) req = build_request(:list_deployment_groups, params) req.send_request() end |
#list_deployment_instances(params = {}) ⇒ Types::ListDeploymentInstancesOutput
<note markdown=“1”> The newer ‘BatchGetDeploymentTargets` should be used instead because it works with all compute types. `ListDeploymentInstances` throws an exception if it is used with a compute platform other than EC2/On-premises or Lambda.
</note>
Lists the instance for a deployment associated with the user or Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2754 2755 2756 2757 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2754 def list_deployment_instances(params = {}, = {}) req = build_request(:list_deployment_instances, params) req.send_request() end |
#list_deployment_targets(params = {}) ⇒ Types::ListDeploymentTargetsOutput
Returns an array of target IDs that are associated a deployment.
2804 2805 2806 2807 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2804 def list_deployment_targets(params = {}, = {}) req = build_request(:list_deployment_targets, params) req.send_request() end |
#list_deployments(params = {}) ⇒ Types::ListDeploymentsOutput
Lists the deployments in a deployment group for an application registered with the user or Amazon Web Services account.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2890 2891 2892 2893 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2890 def list_deployments(params = {}, = {}) req = build_request(:list_deployments, params) req.send_request() end |
#list_git_hub_account_token_names(params = {}) ⇒ Types::ListGitHubAccountTokenNamesOutput
Lists the names of stored connections to GitHub accounts.
2922 2923 2924 2925 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2922 def list_git_hub_account_token_names(params = {}, = {}) req = build_request(:list_git_hub_account_token_names, params) req.send_request() end |
#list_on_premises_instances(params = {}) ⇒ Types::ListOnPremisesInstancesOutput
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.
2981 2982 2983 2984 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 2981 def list_on_premises_instances(params = {}, = {}) req = build_request(:list_on_premises_instances, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceOutput
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.
3022 3023 3024 3025 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3022 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() end |
#put_lifecycle_event_hook_execution_status(params = {}) ⇒ Types::PutLifecycleEventHookExecutionStatusOutput
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 ‘BeforeAllowTraffic` and `AfterAllowTraffic`. For Amazon ECS deployments, the available lifecycle hooks are `BeforeInstall`, `AfterInstall`, `AfterAllowTestTraffic`, `BeforeAllowTraffic`, and `AfterAllowTraffic`. Lambda validation functions return `Succeeded` or `Failed`. For more information, see
- AppSpec ‘hooks’ Section for an Lambda Deployment ][1
-
and [AppSpec
‘hooks’ Section for an Amazon ECS Deployment].
[1]: docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-lambda [2]: docs.aws.amazon.com/codedeploy/latest/userguide/reference-appspec-file-structure-hooks.html#appspec-hooks-ecs
3078 3079 3080 3081 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3078 def put_lifecycle_event_hook_execution_status(params = {}, = {}) req = build_request(:put_lifecycle_event_hook_execution_status, params) req.send_request() end |
#register_application_revision(params = {}) ⇒ Struct
Registers with CodeDeploy a revision for the specified application.
3131 3132 3133 3134 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3131 def register_application_revision(params = {}, = {}) req = build_request(:register_application_revision, params) req.send_request() end |
#register_on_premises_instance(params = {}) ⇒ Struct
Registers an on-premises instance.
<note markdown=“1”> Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.
</note>
3166 3167 3168 3169 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3166 def register_on_premises_instance(params = {}, = {}) req = build_request(:register_on_premises_instance, params) req.send_request() end |
#remove_tags_from_on_premises_instances(params = {}) ⇒ Struct
Removes one or more tags from one or more on-premises instances.
3197 3198 3199 3200 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3197 def (params = {}, = {}) req = build_request(:remove_tags_from_on_premises_instances, params) req.send_request() end |
#skip_wait_time_for_instance_termination(params = {}) ⇒ Struct
In a blue/green deployment, overrides any specified wait time and starts terminating instances immediately after the traffic routing is complete.
3222 3223 3224 3225 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3222 def skip_wait_time_for_instance_termination(params = {}, = {}) req = build_request(:skip_wait_time_for_instance_termination, params) req.send_request() end |
#stop_deployment(params = {}) ⇒ Types::StopDeploymentOutput
Attempts to stop an ongoing deployment.
3258 3259 3260 3261 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3258 def stop_deployment(params = {}, = {}) req = build_request(:stop_deployment, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Associates the list of tags in the input ‘Tags` parameter with the resource identified by the `ResourceArn` input parameter.
3292 3293 3294 3295 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3292 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Disassociates a resource from a list of tags. The resource is identified by the ‘ResourceArn` input parameter. The tags are identified by the list of keys in the `TagKeys` input parameter.
3323 3324 3325 3326 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3323 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_application(params = {}) ⇒ Struct
Changes the name of an application.
3349 3350 3351 3352 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3349 def update_application(params = {}, = {}) req = build_request(:update_application, params) req.send_request() end |
#update_deployment_group(params = {}) ⇒ Types::UpdateDeploymentGroupOutput
Changes information about a deployment group.
3615 3616 3617 3618 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3615 def update_deployment_group(params = {}, = {}) req = build_request(:update_deployment_group, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | ——————— | ———————– | ——– | ————- | | deployment_successful | #get_deployment | 15 | 120 |
3730 3731 3732 3733 3734 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3730 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3738 3739 3740 |
# File 'lib/aws-sdk-codedeploy/client.rb', line 3738 def waiter_names waiters.keys end |