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.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery 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.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

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

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery 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.

#batch_delete_import_data(options = {}) ⇒ Types::BatchDeleteImportDataResponse

Deletes one or more import tasks, each identified by their import ID. Each import task has a number of records that can identify servers or applications.

AWS Application Discovery Service has built-in matching logic that will identify when discovered servers match existing entries that you've previously discovered, the information for the already-existing discovered server is updated. When you delete an import task that contains records that were used to match, the information in those matched records that comes from the deleted records will also be deleted.

Examples:

Request syntax with placeholder values


resp = client.batch_delete_import_data({
  import_task_ids: ["ImportTaskIdentifier"], # required
})

Response structure


resp.errors #=> Array
resp.errors[0].import_task_id #=> String
resp.errors[0].error_code #=> String, one of "NOT_FOUND", "INTERNAL_SERVER_ERROR", "OVER_LIMIT"
resp.errors[0].error_description #=> String

Options Hash (options):

  • :import_task_ids (required, Array<String>)

    The IDs for the import tasks that you want to delete.

Returns:

#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 connectors as specified by ID or other filters. All agents/connectors associated with your user account can be listed if you call DescribeAgents as is without passing any parameters.

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 from one of the following:

  • server

  • application

  • process

  • connection

Output fields are specific to the asset type specified. For example, the output for a server configuration item includes a list of attributes about the server, such as host name, operating system, number of network cards, etc.

For a complete list of outputs for each asset type, see Using the DescribeConfigurations Action in the AWS Application Discovery Service User Guide.

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_continuous_exports(options = {}) ⇒ Types::DescribeContinuousExportsResponse

Lists exports as specified by ID. All continuous exports associated with your user account can be listed if you call DescribeContinuousExports as is without passing any parameters.

Examples:

Request syntax with placeholder values


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

Response structure


resp.descriptions #=> Array
resp.descriptions[0].export_id #=> String
resp.descriptions[0].status #=> String, one of "START_IN_PROGRESS", "START_FAILED", "ACTIVE", "ERROR", "STOP_IN_PROGRESS", "STOP_FAILED", "INACTIVE"
resp.descriptions[0].status_detail #=> String
resp.descriptions[0].s3_bucket #=> String
resp.descriptions[0].start_time #=> Time
resp.descriptions[0].stop_time #=> Time
resp.descriptions[0].data_source #=> String, one of "AGENT"
resp.descriptions[0].schema_storage_config #=> Hash
resp.descriptions[0].schema_storage_config["DatabaseName"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :export_ids (Array<String>)

    The unique IDs assigned to the exports.

  • :max_results (Integer)

    A number between 1 and 100 specifying the maximum number of continuous export descriptions returned.

  • :next_token (String)

    The token from the previous call to DescribeExportTasks.

Returns:

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

DescribeExportConfigurations is deprecated. Use DescribeImportTasks, instead.

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 list of continuous export IDs to search for.

  • :max_results (Integer)

    A number between 1 and 100 specifying the maximum number of continuous export descriptions returned.

  • :next_token (String)

    The token from the previous call to describe-export-tasks.

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_import_tasks(options = {}) ⇒ Types::DescribeImportTasksResponse

Returns an array of import tasks for your account, including status information, times, IDs, the Amazon S3 Object URL for the import file, and more.

Examples:

Request syntax with placeholder values


resp = client.describe_import_tasks({
  filters: [
    {
      name: "IMPORT_TASK_ID", # accepts IMPORT_TASK_ID, STATUS, NAME
      values: ["ImportTaskFilterValue"],
    },
  ],
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.next_token #=> String
resp.tasks #=> Array
resp.tasks[0].import_task_id #=> String
resp.tasks[0].client_request_token #=> String
resp.tasks[0].name #=> String
resp.tasks[0].import_url #=> String
resp.tasks[0].status #=> String, one of "IMPORT_IN_PROGRESS", "IMPORT_COMPLETE", "IMPORT_COMPLETE_WITH_ERRORS", "IMPORT_FAILED", "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED", "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED", "DELETE_IN_PROGRESS", "DELETE_COMPLETE", "DELETE_FAILED", "DELETE_FAILED_LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.tasks[0].import_request_time #=> Time
resp.tasks[0].import_completion_time #=> Time
resp.tasks[0].import_deleted_time #=> Time
resp.tasks[0].server_import_success #=> Integer
resp.tasks[0].server_import_failure #=> Integer
resp.tasks[0].application_import_success #=> Integer
resp.tasks[0].application_import_failure #=> Integer
resp.tasks[0].errors_and_failed_entries_zip #=> String

Options Hash (options):

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

    An array of name-value pairs that you provide to filter the results for the DescribeImportTask request to a specific subset of results. Currently, wildcard values aren\'t supported for filters.

  • :max_results (Integer)

    The maximum number of results that you want this request to return, up to 100.

  • :next_token (String)

    The token to request a specific page of results.

Returns:

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

Retrieves a list of configuration items that have tags as specified by the key-value pairs, name and value, passed to the optional parameter filters.

There are three valid tag filter names:

  • tagKey

  • tagValue

  • configurationId

Also, all configuration items associated with your user account that have tags can be listed if you call DescribeTags as is without passing any parameters.

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.

This API operation takes no request parameters and is called as is at the command prompt as shown in the example.

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 as specified by the value passed to the required parameter configurationType. Optional filtering may be applied to refine search results.

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 Using the ListConfigurations Action in the AWS Application Discovery Service User Guide.

  • :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 in the AWS Application Discovery Service User Guide.

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_continuous_export(options = {}) ⇒ Types::StartContinuousExportResponse

Start the continuous flow of agent's discovered data into Amazon Athena.

Examples:

Request syntax with placeholder values


resp = client.start_continuous_export()

Response structure


resp.export_id #=> String
resp.s3_bucket #=> String
resp.start_time #=> Time
resp.data_source #=> String, one of "AGENT"
resp.schema_storage_config #=> Hash
resp.schema_storage_config["DatabaseName"] #=> String

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 agentIds 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 agentIds 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. Note: The GRAPHML option has been deprecated.

  • :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:

#start_import_task(options = {}) ⇒ Types::StartImportTaskResponse

Starts an import task, which allows you to import details of your on-premises environment directly into AWS Migration Hub without having to use the Application Discovery Service (ADS) tools such as the Discovery Connector or Discovery Agent. This gives you the option to perform migration assessment and planning directly from your imported data, including the ability to group your devices as applications and track their migration status.

To start an import request, do this:

  1. Download the specially formatted comma separated value (CSV) import template, which you can find here: https://s3-us-west-2.amazonaws.com/templates-7cffcf56-bd96-4b1c-b45b-a5b42f282e46/import_template.csv.

  2. Fill out the template with your server and application data.

  3. Upload your import file to an Amazon S3 bucket, and make a note of it's Object URL. Your import file must be in the CSV format.

  4. Use the console or the StartImportTask command with the AWS CLI or one of the AWS SDKs to import the records from your file.

For more information, including step-by-step procedures, see Migration Hub Import in the AWS Application Discovery Service User Guide.

There are limits to the number of import tasks you can create (and delete) in an AWS account. For more information, see AWS Application Discovery Service Limits in the AWS Application Discovery Service User Guide.

Examples:

Request syntax with placeholder values


resp = client.start_import_task({
  client_request_token: "ClientRequestToken",
  name: "ImportTaskName", # required
  import_url: "ImportURL", # required
})

Response structure


resp.task.import_task_id #=> String
resp.task.client_request_token #=> String
resp.task.name #=> String
resp.task.import_url #=> String
resp.task.status #=> String, one of "IMPORT_IN_PROGRESS", "IMPORT_COMPLETE", "IMPORT_COMPLETE_WITH_ERRORS", "IMPORT_FAILED", "IMPORT_FAILED_SERVER_LIMIT_EXCEEDED", "IMPORT_FAILED_RECORD_LIMIT_EXCEEDED", "DELETE_IN_PROGRESS", "DELETE_COMPLETE", "DELETE_FAILED", "DELETE_FAILED_LIMIT_EXCEEDED", "INTERNAL_ERROR"
resp.task.import_request_time #=> Time
resp.task.import_completion_time #=> Time
resp.task.import_deleted_time #=> Time
resp.task.server_import_success #=> Integer
resp.task.server_import_failure #=> Integer
resp.task.application_import_success #=> Integer
resp.task.application_import_failure #=> Integer
resp.task.errors_and_failed_entries_zip #=> String

Options Hash (options):

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. Optional. A unique token that you can provide to prevent the same import request from occurring more than once. If you don\'t provide a token, a token is automatically generated.

    Sending more than one StartImportTask request with the same client request token will return information about the original import task with that client request token.

  • :name (required, String)

    A descriptive name for this request. You can use this name to filter future requests related to this import task, such as identifying applications and servers that were included in this import task. We recommend that you use a meaningful name for each import task.

  • :import_url (required, String)

    The URL for your import file that you\'ve uploaded to Amazon S3.

    If you\'re using the AWS CLI, this URL is structured as follows: s3://BucketName/ImportFileName.CSV

Returns:

#stop_continuous_export(options = {}) ⇒ Types::StopContinuousExportResponse

Stop the continuous flow of agent's discovered data into Amazon Athena.

Examples:

Request syntax with placeholder values


resp = client.stop_continuous_export({
  export_id: "ConfigurationsExportId", # required
})

Response structure


resp.start_time #=> Time
resp.stop_time #=> Time

Options Hash (options):

  • :export_id (required, String)

    The unique ID assigned to this export.

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.