You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::ApplicationDiscoveryService::Client OverviewAn 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.
RegionYou can configure a default region in the following locations:
ENV['AWS_REGION']
Aws.config[:region]
Go here for a list of supported regions.
CredentialsDefault credentials are loaded automatically from the following locations:
ENV['AWS_ACCESS_KEY_ID']
and ENV['AWS_SECRET_ACCESS_KEY']
Aws.config[:credentials]
~/.aws/credentials
(more information)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
:
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.
Attribute Summary collapseConstructs an API client.
Associates one or more configuration items with an application.
.
Deletes one or more import tasks, each identified by their import ID.
Creates an application with the given name and description.
.
Creates one or more tags for configuration items.
Deletes a list of applications and their associations with configuration items.
.
Deletes the association between configuration items and one or more tags.
Lists agents or connectors as specified by ID or other filters.
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.
Lists exports as specified by ID.
DescribeExportConfigurations
is deprecated.
Retrieve status of one or more export tasks.
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.
.
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.
.
Disassociates one or more configuration items from an application.
.
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.
.
Retrieves a list of configuration items as specified by the value passed to the required parameter configurationType
.
Retrieves a list of servers that are one network hop away from a specified server.
.
Start the continuous flow of agent's discovered data into Amazon Athena.
.
Instructs the specified agents or connectors to start collecting data.
.
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.
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 the continuous flow of agent's discovered data into Amazon Athena.
.
Instructs the specified agents or connectors to stop collecting data.
.
Updates metadata about an application.
.
Waiters polls an API operation until a resource enters a desired state.
Returns the list of supported waiters.
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
Instance Method Details #associate_configuration_items_to_application(options = {}) ⇒ StructAssociates one or more configuration items with an application.
#batch_delete_import_data(options = {}) ⇒ Types::BatchDeleteImportDataResponseDeletes 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_tags(options = {}) ⇒ StructCreates 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 = {}) ⇒ StructDeletes a list of applications and their associations with configuration items.
#delete_tags(options = {}) ⇒ StructDeletes the association between configuration items and one or more tags. This API accepts a list of multiple configuration items.
#describe_agents(options = {}) ⇒ Types::DescribeAgentsResponseLists 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.
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::DescribeContinuousExportsResponseLists 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.
Retrieve status of one or more export tasks. You can retrieve the status of up to 100 export tasks.
#describe_import_tasks(options = {}) ⇒ Types::DescribeImportTasksResponseReturns 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::DescribeTagsResponseRetrieves 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.
Disassociates one or more configuration items from an application.
#export_configurations(options = {}) ⇒ Types::ExportConfigurationsResponseDeprecated. 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::GetDiscoverySummaryResponseRetrieves 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::ListConfigurationsResponseRetrieves 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.
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.
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.
#update_application(options = {}) ⇒ StructUpdates metadata about an application.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ BooleanWaiters polls an API operation until a resource enters a desired state.
Basic UsageWaiters 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)
ConfigurationYou 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:RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4