You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CodeDeploy::Waiters::DeploymentSuccessful

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-codedeploy/lib/aws-sdk-codedeploy/waiters.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ DeploymentSuccessful

Returns a new instance of DeploymentSuccessful

Parameters:

  • options (Hash)

Options Hash (options):

  • :client (required, Client)
  • :max_attempts (Integer) — default: 120
  • :delay (Integer) — default: 15
  • :before_attempt (Proc)
  • :before_wait (Proc)


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'gems/aws-sdk-codedeploy/lib/aws-sdk-codedeploy/waiters.rb', line 21

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 120,
    delay: 15,
    poller: Aws::Waiters::Poller.new(
      operation_name: :get_deployment,
      acceptors: [
        {
          "expected" => "Succeeded",
          "matcher" => "path",
          "state" => "success",
          "argument" => "deployment_info.status"
        },
        {
          "expected" => "Failed",
          "matcher" => "path",
          "state" => "failure",
          "argument" => "deployment_info.status"
        },
        {
          "expected" => "Stopped",
          "matcher" => "path",
          "state" => "failure",
          "argument" => "deployment_info.status"
        }
      ]
    )
  }.merge(options))
end

Instance Method Details

#wait(params = {}) ⇒ Types::GetDeploymentOutput

Returns a response object which responds to the following methods:

Parameters:

  • params (Hash) (defaults to: {})

    a customizable set of options

Options Hash (params):

  • :deployment_id (required, String)

    A deployment ID associated with the applicable IAM user or AWS account.

Returns:



54
55
56
# File 'gems/aws-sdk-codedeploy/lib/aws-sdk-codedeploy/waiters.rb', line 54

def wait(params = {})
  @waiter.wait(client: @client, params: params)
end