Class: Aws::ElasticBeanstalk::Waiters::EnvironmentExists

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ EnvironmentExists

Returns a new instance of EnvironmentExists.

Parameters:

  • options (Hash)

Options Hash (options):

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


86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/aws-sdk-elasticbeanstalk/waiters.rb', line 86

def initialize(options)
  @client = options.fetch(:client)
  @waiter = Aws::Waiters::Waiter.new({
    max_attempts: 20,
    delay: 20,
    poller: Aws::Waiters::Poller.new(
      operation_name: :describe_environments,
      acceptors: [
        {
          "state" => "success",
          "matcher" => "pathAll",
          "argument" => "environments[].status",
          "expected" => "Ready"
        },
        {
          "state" => "retry",
          "matcher" => "pathAll",
          "argument" => "environments[].status",
          "expected" => "Launching"
        }
      ]
    )
  }.merge(options))
end

Instance Attribute Details

#waiterObject (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.



118
119
120
# File 'lib/aws-sdk-elasticbeanstalk/waiters.rb', line 118

def waiter
  @waiter
end

Instance Method Details

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

Returns a response object which responds to the following methods:

Options Hash (params):

  • :application_name (String)

    If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application.

  • :version_label (String)

    If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that are associated with this application version.

  • :environment_ids (Array<String>)

    If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified IDs.

  • :environment_names (Array<String>)

    If specified, AWS Elastic Beanstalk restricts the returned descriptions to include only those that have the specified names.

  • :include_deleted (Boolean)

    Indicates whether to include deleted environments:

    ‘true`: Environments that have been deleted after `IncludedDeletedBackTo` are displayed.

    ‘false`: Do not include deleted environments.

  • :included_deleted_back_to (Time, DateTime, Date, Integer, String)

    If specified when ‘IncludeDeleted` is set to `true`, then environments deleted after this date are displayed.

  • :max_records (Integer)

    For a paginated request. Specify a maximum number of environments to include in each response.

    If no ‘MaxRecords` is specified, all available environments are retrieved in a single response.

  • :next_token (String)

    For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.

    If no ‘NextToken` is specified, the first page is retrieved.

Returns:



113
114
115
# File 'lib/aws-sdk-elasticbeanstalk/waiters.rb', line 113

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