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

Class: Aws::ApplicationDiscoveryService::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for AWS Application Discovery Service. To construct a client, you need to configure a :region and :credentials.

applicationdiscoveryservice = Aws::ApplicationDiscoveryService::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::ApplicationDiscoveryService::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::ApplicationDiscoveryService::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#associate_configuration_items_to_application(options = {}) ⇒ Struct

Associates one or more configuration items with an application.

Examples:

Request syntax with placeholder values


resp = client.associate_configuration_items_to_application({
  application_configuration_id: "ApplicationId", # required
  configuration_ids: ["ConfigurationId"], # required
})

Options Hash (options):

  • :application_configuration_id (required, String)

    The configuration ID of an application with which items are to be associated.

  • :configuration_ids (required, Array<String>)

    The ID of each configuration item to be associated with an application.

Returns:

  • (Struct)

    Returns an empty response.

#create_application(options = {}) ⇒ Types::CreateApplicationResponse

Creates an application with the given name and description.

Examples:

Request syntax with placeholder values


resp = client.create_application({
  name: "String", # required
  description: "String",
})

Response structure


resp.configuration_id #=> String

Options Hash (options):

  • :name (required, String)

    Name of the application to be created.

  • :description (String)

    Description of the application to be created.

Returns:

#create_tags(options = {}) ⇒ Struct

Creates one or more tags for configuration items. Tags are metadata that help you categorize IT assets. This API accepts a list of multiple configuration items.

Examples:

Request syntax with placeholder values


resp = client.create_tags({
  configuration_ids: ["ConfigurationId"], # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :configuration_ids (required, Array<String>)

    A list of configuration items that you want to tag.

  • :tags (required, Array<Types::Tag>)

    Tags that you want to associate with one or more configuration items. Specify the tags that you want to create in a key-value format. For example:

    {"key": "serverType", "value": "webServer"}

Returns:

  • (Struct)

    Returns an empty response.

#delete_applications(options = {}) ⇒ Struct

Deletes a list of applications and their associations with configuration items.

Examples:

Request syntax with placeholder values


resp = client.delete_applications({
  configuration_ids: ["ApplicationId"], # required
})

Options Hash (options):

  • :configuration_ids (required, Array<String>)

    Configuration ID of an application to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

#delete_tags(options = {}) ⇒ Struct

Deletes the association between configuration items and one or more tags. This API accepts a list of multiple configuration items.

Examples:

Request syntax with placeholder values


resp = client.delete_tags({
  configuration_ids: ["ConfigurationId"], # required
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :configuration_ids (required, Array<String>)

    A list of configuration items with tags that you want to delete.

  • :tags (Array<Types::Tag>)

    Tags that you want to delete from one or more configuration items. Specify the tags that you want to delete in a key-value format. For example:

    {"key": "serverType", "value": "webServer"}

Returns:

  • (Struct)

    Returns an empty response.

#describe_agents(options = {}) ⇒ Types::DescribeAgentsResponse

Lists agents or the Connector by ID or lists all agents/Connectors associated with your user account if you did not specify an ID.

Examples:

Request syntax with placeholder values


resp = client.describe_agents({
  agent_ids: ["AgentId"],
  filters: [
    {
      name: "String", # required
      values: ["FilterValue"], # required
      condition: "Condition", # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.agents_info #=> Array
resp.agents_info[0].agent_id #=> String
resp.agents_info[0].host_name #=> String
resp.agents_info[0].agent_network_info_list #=> Array
resp.agents_info[0].agent_network_info_list[0].ip_address #=> String
resp.agents_info[0].agent_network_info_list[0].mac_address #=> String
resp.agents_info[0].connector_id #=> String
resp.agents_info[0].version #=> String
resp.agents_info[0].health #=> String, one of "HEALTHY", "UNHEALTHY", "RUNNING", "UNKNOWN", "BLACKLISTED", "SHUTDOWN"
resp.agents_info[0].last_health_ping_time #=> String
resp.agents_info[0].collection_status #=> String
resp.agents_info[0].agent_type #=> String
resp.agents_info[0].registered_time #=> String
resp.next_token #=> String

Options Hash (options):

  • :agent_ids (Array<String>)

    The agent or the Connector IDs for which you want information. If you specify no IDs, the system returns information about all agents/Connectors associated with your AWS user account.

  • :filters (Array<Types::Filter>)

    You can filter the request using various logical operators and a key-value format. For example:

    {"key": "collectionStatus", "value": "STARTED"}

  • :max_results (Integer)

    The total number of agents/Connectors to return in a single page of output. The maximum value is 100.

  • :next_token (String)

    Token to retrieve the next set of results. For example, if you previously specified 100 IDs for DescribeAgentsRequest$agentIds but set DescribeAgentsRequest$maxResults to 10, you received a set of 10 results along with a token. Use that token in this query to get the next set of 10.

Returns:

#describe_configurations(options = {}) ⇒ Types::DescribeConfigurationsResponse

Retrieves attributes for a list of configuration item IDs. All of the supplied IDs must be for the same asset type (server, application, process, or connection). Output fields are specific to the asset type selected. For example, the output for a server configuration item includes a list of attributes about the server, such as host name, operating system, and number of network cards.

For a complete list of outputs for each asset type, see Using the DescribeConfigurations Action.

Examples:

Request syntax with placeholder values


resp = client.describe_configurations({
  configuration_ids: ["ConfigurationId"], # required
})

Response structure


resp.configurations #=> Array
resp.configurations[0] #=> Hash
resp.configurations[0]["String"] #=> String

Options Hash (options):

  • :configuration_ids (required, Array<String>)

    One or more configuration IDs.

Returns:

#describe_export_configurations(options = {}) ⇒ Types::DescribeExportConfigurationsResponse

Deprecated. Use DescribeExportTasks instead.

Retrieves the status of a given export process. You can retrieve status from a maximum of 100 processes.

Examples:

Request syntax with placeholder values


resp = client.describe_export_configurations({
  export_ids: ["ConfigurationsExportId"],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.exports_info #=> Array
resp.exports_info[0].export_id #=> String
resp.exports_info[0].export_status #=> String, one of "FAILED", "SUCCEEDED", "IN_PROGRESS"
resp.exports_info[0].status_message #=> String
resp.exports_info[0].configurations_download_url #=> String
resp.exports_info[0].export_request_time #=> Time
resp.exports_info[0].is_truncated #=> true/false
resp.exports_info[0].requested_start_time #=> Time
resp.exports_info[0].requested_end_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :export_ids (Array<String>)

    A unique identifier that you can use to query the export status.

  • :max_results (Integer)

    The maximum number of results that you want to display as a part of the query.

  • :next_token (String)

    A token to get the next set of results. For example, if you specify 100 IDs for DescribeExportConfigurationsRequest$exportIds but set DescribeExportConfigurationsRequest$maxResults to 10, you get results in a set of 10. Use the token in the query to get the next set of 10.

Returns:

#describe_export_tasks(options = {}) ⇒ Types::DescribeExportTasksResponse

Retrieve status of one or more export tasks. You can retrieve the status of up to 100 export tasks.

Examples:

Request syntax with placeholder values


resp = client.describe_export_tasks({
  export_ids: ["ConfigurationsExportId"],
  filters: [
    {
      name: "FilterName", # required
      values: ["FilterValue"], # required
      condition: "Condition", # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.exports_info #=> Array
resp.exports_info[0].export_id #=> String
resp.exports_info[0].export_status #=> String, one of "FAILED", "SUCCEEDED", "IN_PROGRESS"
resp.exports_info[0].status_message #=> String
resp.exports_info[0].configurations_download_url #=> String
resp.exports_info[0].export_request_time #=> Time
resp.exports_info[0].is_truncated #=> true/false
resp.exports_info[0].requested_start_time #=> Time
resp.exports_info[0].requested_end_time #=> Time
resp.next_token #=> String

Options Hash (options):

  • :export_ids (Array<String>)

    One or more unique identifiers used to query the status of an export request.

  • :filters (Array<Types::ExportFilter>)

    One or more filters.

    • AgentId - ID of the agent whose collected data will be exported

    ^

  • :max_results (Integer)

    The maximum number of volume results returned by DescribeExportTasks in paginated output. When this parameter is used, DescribeExportTasks only returns maxResults results in a single page along with a nextToken response element.

  • :next_token (String)

    The nextToken value returned from a previous paginated DescribeExportTasks request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

Returns:

#describe_tags(options = {}) ⇒ Types::DescribeTagsResponse

Retrieves a list of configuration items that are tagged with a specific tag. Or retrieves a list of all tags assigned to a specific configuration item.

Examples:

Request syntax with placeholder values


resp = client.describe_tags({
  filters: [
    {
      name: "FilterName", # required
      values: ["FilterValue"], # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.tags #=> Array
resp.tags[0].configuration_type #=> String, one of "SERVER", "PROCESS", "CONNECTION", "APPLICATION"
resp.tags[0].configuration_id #=> String
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.tags[0].time_of_creation #=> Time
resp.next_token #=> String

Options Hash (options):

  • :filters (Array<Types::TagFilter>)

    You can filter the list using a key-value format. You can separate these items by using logical operators. Allowed filters include tagKey, tagValue, and configurationId.

  • :max_results (Integer)

    The total number of items to return in a single page of output. The maximum value is 100.

  • :next_token (String)

    A token to start the list. Use this token to get the next set of results.

Returns:

#disassociate_configuration_items_from_application(options = {}) ⇒ Struct

Disassociates one or more configuration items from an application.

Examples:

Request syntax with placeholder values


resp = client.disassociate_configuration_items_from_application({
  application_configuration_id: "ApplicationId", # required
  configuration_ids: ["ConfigurationId"], # required
})

Options Hash (options):

  • :application_configuration_id (required, String)

    Configuration ID of an application from which each item is disassociated.

  • :configuration_ids (required, Array<String>)

    Configuration ID of each item to be disassociated from an application.

Returns:

  • (Struct)

    Returns an empty response.

#export_configurations(options = {}) ⇒ Types::ExportConfigurationsResponse

Deprecated. Use StartExportTask instead.

Exports all discovered configuration data to an Amazon S3 bucket or an application that enables you to view and evaluate the data. Data includes tags and tag associations, processes, connections, servers, and system performance. This API returns an export ID that you can query using the DescribeExportConfigurations API. The system imposes a limit of two configuration exports in six hours.

Examples:

Request syntax with placeholder values


resp = client.export_configurations()

Response structure


resp.export_id #=> String

Returns:

#get_discovery_summary(options = {}) ⇒ Types::GetDiscoverySummaryResponse

Retrieves a short summary of discovered assets.

Examples:

Request syntax with placeholder values


resp = client.get_discovery_summary()

Response structure


resp.servers #=> Integer
resp.applications #=> Integer
resp.servers_mapped_to_applications #=> Integer
resp.servers_mappedto_tags #=> Integer
resp.agent_summary.active_agents #=> Integer
resp.agent_summary.healthy_agents #=> Integer
resp.agent_summary.black_listed_agents #=> Integer
resp.agent_summary.shutdown_agents #=> Integer
resp.agent_summary.unhealthy_agents #=> Integer
resp.agent_summary.total_agents #=> Integer
resp.agent_summary.unknown_agents #=> Integer
resp.connector_summary.active_connectors #=> Integer
resp.connector_summary.healthy_connectors #=> Integer
resp.connector_summary.black_listed_connectors #=> Integer
resp.connector_summary.shutdown_connectors #=> Integer
resp.connector_summary.unhealthy_connectors #=> Integer
resp.connector_summary.total_connectors #=> Integer
resp.connector_summary.unknown_connectors #=> Integer

Returns:

#list_configurations(options = {}) ⇒ Types::ListConfigurationsResponse

Retrieves a list of configuration items according to criteria that you specify in a filter. The filter criteria identifies the relationship requirements.

Examples:

Request syntax with placeholder values


resp = client.list_configurations({
  configuration_type: "SERVER", # required, accepts SERVER, PROCESS, CONNECTION, APPLICATION
  filters: [
    {
      name: "String", # required
      values: ["FilterValue"], # required
      condition: "Condition", # required
    },
  ],
  max_results: 1,
  next_token: "NextToken",
  order_by: [
    {
      field_name: "String", # required
      sort_order: "ASC", # accepts ASC, DESC
    },
  ],
})

Response structure


resp.configurations #=> Array
resp.configurations[0] #=> Hash
resp.configurations[0]["String"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :configuration_type (required, String)

    A valid configuration identified by Application Discovery Service.

  • :filters (Array<Types::Filter>)

    You can filter the request using various logical operators and a key-value format. For example:

    {"key": "serverType", "value": "webServer"}

    For a complete list of filter options and guidance about using them with this action, see Querying Discovered Configuration Items.

  • :max_results (Integer)

    The total number of items to return. The maximum value is 100.

  • :next_token (String)

    Token to retrieve the next set of results. For example, if a previous call to ListConfigurations returned 100 items, but you set ListConfigurationsRequest$maxResults to 10, you received a set of 10 results along with a token. Use that token in this query to get the next set of 10.

  • :order_by (Array<Types::OrderByElement>)

    Certain filter criteria return output that can be sorted in ascending or descending order. For a list of output characteristics for each filter, see Using the ListConfigurations Action.

Returns:

#list_server_neighbors(options = {}) ⇒ Types::ListServerNeighborsResponse

Retrieves a list of servers that are one network hop away from a specified server.

Examples:

Request syntax with placeholder values


resp = client.list_server_neighbors({
  configuration_id: "ConfigurationId", # required
  port_information_needed: false,
  neighbor_configuration_ids: ["ConfigurationId"],
  max_results: 1,
  next_token: "String",
})

Response structure


resp.neighbors #=> Array
resp.neighbors[0].source_server_id #=> String
resp.neighbors[0].destination_server_id #=> String
resp.neighbors[0].destination_port #=> Integer
resp.neighbors[0].transport_protocol #=> String
resp.neighbors[0].connections_count #=> Integer
resp.next_token #=> String
resp.known_dependency_count #=> Integer

Options Hash (options):

  • :configuration_id (required, String)

    Configuration ID of the server for which neighbors are being listed.

  • :port_information_needed (Boolean)

    Flag to indicate if port and protocol information is needed as part of the response.

  • :neighbor_configuration_ids (Array<String>)

    List of configuration IDs to test for one-hop-away.

  • :max_results (Integer)

    Maximum number of results to return in a single page of output.

  • :next_token (String)

    Token to retrieve the next set of results. For example, if you previously specified 100 IDs for ListServerNeighborsRequest$neighborConfigurationIds but set ListServerNeighborsRequest$maxResults to 10, you received a set of 10 results along with a token. Use that token in this query to get the next set of 10.

Returns:

#start_data_collection_by_agent_ids(options = {}) ⇒ Types::StartDataCollectionByAgentIdsResponse

Instructs the specified agents or connectors to start collecting data.

Examples:

Request syntax with placeholder values


resp = client.start_data_collection_by_agent_ids({
  agent_ids: ["AgentId"], # required
})

Response structure


resp.agents_configuration_status #=> Array
resp.agents_configuration_status[0].agent_id #=> String
resp.agents_configuration_status[0].operation_succeeded #=> true/false
resp.agents_configuration_status[0].description #=> String

Options Hash (options):

  • :agent_ids (required, Array<String>)

    The IDs of the agents or connectors from which to start collecting data. If you send a request to an agent/connector ID that you do not have permission to contact, according to your AWS account, the service does not throw an exception. Instead, it returns the error in the Description field. If you send a request to multiple agents/connectors and you do not have permission to contact some of those agents/connectors, the system does not throw an exception. Instead, the system shows Failed in the Description field.

Returns:

#start_export_task(options = {}) ⇒ Types::StartExportTaskResponse

Begins the export of discovered data to an S3 bucket.

If you specify agentId in a filter, the task exports up to 72 hours of detailed data collected by the identified Application Discovery Agent, including network, process, and performance details. A time range for exported agent data may be set by using startTime and endTime. Export of detailed agent data is limited to five concurrently running exports.

If you do not include an agentId filter, summary data is exported that includes both AWS Agentless Discovery Connector data and summary data from AWS Discovery Agents. Export of summary data is limited to two exports per day.

Examples:

Request syntax with placeholder values


resp = client.start_export_task({
  export_data_format: ["CSV"], # accepts CSV, GRAPHML
  filters: [
    {
      name: "FilterName", # required
      values: ["FilterValue"], # required
      condition: "Condition", # required
    },
  ],
  start_time: Time.now,
  end_time: Time.now,
})

Response structure


resp.export_id #=> String

Options Hash (options):

  • :export_data_format (Array<String>)

    The file format for the returned export data. Default value is CSV.

  • :filters (Array<Types::ExportFilter>)

    If a filter is present, it selects the single agentId of the Application Discovery Agent for which data is exported. The agentId can be found in the results of the DescribeAgents API or CLI. If no filter is present, startTime and endTime are ignored and exported data includes both Agentless Discovery Connector data and summary data from Application Discovery agents.

  • :start_time (Time)

    The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, data is exported starting from the first data collected by the agent.

  • :end_time (Time)

    The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no value is specified, exported data includes the most recent data collected by the agent.

Returns:

#stop_data_collection_by_agent_ids(options = {}) ⇒ Types::StopDataCollectionByAgentIdsResponse

Instructs the specified agents or connectors to stop collecting data.

Examples:

Request syntax with placeholder values


resp = client.stop_data_collection_by_agent_ids({
  agent_ids: ["AgentId"], # required
})

Response structure


resp.agents_configuration_status #=> Array
resp.agents_configuration_status[0].agent_id #=> String
resp.agents_configuration_status[0].operation_succeeded #=> true/false
resp.agents_configuration_status[0].description #=> String

Options Hash (options):

  • :agent_ids (required, Array<String>)

    The IDs of the agents or connectors from which to stop collecting data.

Returns:

#update_application(options = {}) ⇒ Struct

Updates metadata about an application.

Examples:

Request syntax with placeholder values


resp = client.update_application({
  configuration_id: "ApplicationId", # required
  name: "String",
  description: "String",
})

Options Hash (options):

  • :configuration_id (required, String)

    Configuration ID of the application to be updated.

  • :name (String)

    New name of the application to be updated.

  • :description (String)

    New description of the application to be updated.

Returns:

  • (Struct)

    Returns an empty response.

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

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(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

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

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.