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
- Object
- Seahorse::Client::Base
- Aws::ApplicationDiscoveryService::Client
- 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']
andENV['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
Constructor collapse
-
#initialize(options = {}) ⇒ Aws::ApplicationDiscoveryService::Client
constructor
Constructs an API client.
API Operations collapse
-
#associate_configuration_items_to_application(options = {}) ⇒ Struct
Associates one or more configuration items with an application.
.
-
#batch_delete_import_data(options = {}) ⇒ Types::BatchDeleteImportDataResponse
Deletes one or more import tasks, each identified by their import ID.
-
#create_application(options = {}) ⇒ Types::CreateApplicationResponse
Creates an application with the given name and description.
.
-
#create_tags(options = {}) ⇒ Struct
Creates one or more tags for configuration items.
-
#delete_applications(options = {}) ⇒ Struct
Deletes a list of applications and their associations with configuration items.
.
-
#delete_tags(options = {}) ⇒ Struct
Deletes the association between configuration items and one or more tags.
-
#describe_agents(options = {}) ⇒ Types::DescribeAgentsResponse
Lists agents or connectors as specified by ID or other filters.
-
#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.
-
-
#describe_continuous_exports(options = {}) ⇒ Types::DescribeContinuousExportsResponse
Lists exports as specified by ID.
-
#describe_export_configurations(options = {}) ⇒ Types::DescribeExportConfigurationsResponse
DescribeExportConfigurations
is deprecated. -
#describe_export_tasks(options = {}) ⇒ Types::DescribeExportTasksResponse
Retrieve status of one or more export tasks.
-
#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.
.
-
#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. -
-
#disassociate_configuration_items_from_application(options = {}) ⇒ Struct
Disassociates one or more configuration items from an application.
.
-
#export_configurations(options = {}) ⇒ Types::ExportConfigurationsResponse
Deprecated.
-
#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.
. -
#list_configurations(options = {}) ⇒ Types::ListConfigurationsResponse
Retrieves a list of configuration items as specified by the value passed to the required parameter
configurationType
. -
#list_server_neighbors(options = {}) ⇒ Types::ListServerNeighborsResponse
Retrieves a list of servers that are one network hop away from a specified server.
.
-
#start_continuous_export(options = {}) ⇒ Types::StartContinuousExportResponse
Start the continuous flow of agent's discovered data into Amazon Athena.
.
-
#start_data_collection_by_agent_ids(options = {}) ⇒ Types::StartDataCollectionByAgentIdsResponse
Instructs the specified agents or connectors to start collecting data.
.
-
#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. -
#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.
-
#stop_continuous_export(options = {}) ⇒ Types::StopContinuousExportResponse
Stop the continuous flow of agent's discovered data into Amazon Athena.
.
-
#stop_data_collection_by_agent_ids(options = {}) ⇒ Types::StopDataCollectionByAgentIdsResponse
Instructs the specified agents or connectors to stop collecting data.
.
-
#update_application(options = {}) ⇒ Struct
Updates metadata about an application.
.
Instance Method Summary collapse
-
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean
Waiters polls an API operation until a resource enters a desired state.
-
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters.
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.
Instance Method Details
#associate_configuration_items_to_application(options = {}) ⇒ Struct
Associates one or more configuration items with an application.
#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.
#create_application(options = {}) ⇒ Types::CreateApplicationResponse
Creates an application with the given name and description.
#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.
#delete_applications(options = {}) ⇒ Struct
Deletes a list of applications and their associations with configuration items.
#delete_tags(options = {}) ⇒ Struct
Deletes the association between configuration items and one or more tags. This API accepts a list of multiple configuration items.
#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.
#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.
#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.
#describe_export_configurations(options = {}) ⇒ Types::DescribeExportConfigurationsResponse
DescribeExportConfigurations
is deprecated. Use DescribeImportTasks, instead.
#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.
#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.
#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.
#disassociate_configuration_items_from_application(options = {}) ⇒ Struct
Disassociates one or more configuration items from an application.
#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.
#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.
#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.
#list_server_neighbors(options = {}) ⇒ Types::ListServerNeighborsResponse
Retrieves a list of servers that are one network hop away from a specified server.
#start_continuous_export(options = {}) ⇒ Types::StartContinuousExportResponse
Start the continuous flow of agent's discovered data into Amazon Athena.
#start_data_collection_by_agent_ids(options = {}) ⇒ Types::StartDataCollectionByAgentIdsResponse
Instructs the specified agents or connectors to start collecting data.
#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.
#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:
-
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.
-
Fill out the template with your server and application data.
-
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.
-
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.
#stop_continuous_export(options = {}) ⇒ Types::StopContinuousExportResponse
Stop the continuous flow of agent's discovered data into Amazon Athena.
#stop_data_collection_by_agent_ids(options = {}) ⇒ Types::StopDataCollectionByAgentIdsResponse
Instructs the specified agents or connectors to stop collecting data.
#update_application(options = {}) ⇒ Struct
Updates metadata about an application.
#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
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name | Client Method | Default Delay: | Default Max Attempts: |
---|