/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.applicationdiscovery; import org.w3c.dom.*; import java.net.*; import java.util.*; import javax.annotation.Generated; import org.apache.commons.logging.*; import com.amazonaws.*; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.auth.*; import com.amazonaws.handlers.*; import com.amazonaws.http.*; import com.amazonaws.internal.*; import com.amazonaws.internal.auth.*; import com.amazonaws.metrics.*; import com.amazonaws.regions.*; import com.amazonaws.transform.*; import com.amazonaws.util.*; import com.amazonaws.protocol.json.*; import com.amazonaws.util.AWSRequestMetrics.Field; import com.amazonaws.annotation.ThreadSafe; import com.amazonaws.client.AwsSyncClientParams; import com.amazonaws.client.builder.AdvancedConfig; import com.amazonaws.services.applicationdiscovery.AWSApplicationDiscoveryClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.applicationdiscovery.model.*; import com.amazonaws.services.applicationdiscovery.model.transform.*; /** * Client for accessing AWS Application Discovery Service. All service calls made using this client are blocking, and * will not return until the service call completes. *

* Amazon Web Services Application Discovery Service *

* Amazon Web Services Application Discovery Service (Application Discovery Service) helps you plan application * migration projects. It automatically identifies servers, virtual machines (VMs), and network dependencies in your * on-premises data centers. For more information, see the Amazon Web Services Application Discovery Service FAQ. *

*

* Application Discovery Service offers three ways of performing discovery and collecting data about your on-premises * servers: *

* * * *

* Working With This Guide *

*

* This API reference provides descriptions, syntax, and usage examples for each of the actions and data types for * Application Discovery Service. The topic for each action shows the API request parameters and the response. * Alternatively, you can use one of the Amazon Web Services SDKs to access an API that is tailored to the programming * language or platform that you're using. For more information, see Amazon * Web Services SDKs. *

* * * *

* This guide is intended for use with the Amazon Web Services Application Discovery * Service User Guide. *

* *

* All data is handled according to the Amazon Web Services Privacy * Policy. You can operate Application Discovery Service offline to inspect collected data before it is shared with * the service. *

*
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSApplicationDiscoveryClient extends AmazonWebServiceClient implements AWSApplicationDiscovery { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSApplicationDiscovery.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "discovery"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServerInternalErrorException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.ServerInternalErrorExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.InvalidParameterExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterValueException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.InvalidParameterValueExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceInUseException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.ResourceInUseExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictErrorException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.ConflictErrorExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("OperationNotPermittedException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.OperationNotPermittedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("HomeRegionNotSetException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.HomeRegionNotSetExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AuthorizationErrorException").withExceptionUnmarshaller( com.amazonaws.services.applicationdiscovery.model.transform.AuthorizationErrorExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.applicationdiscovery.model.AWSApplicationDiscoveryException.class)); /** * Constructs a new client to invoke service methods on AWS Application Discovery Service. A credentials provider * chain will be used that searches for credentials in this order: * * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#defaultClient()} */ @Deprecated public AWSApplicationDiscoveryClient() { this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service. A credentials provider * chain will be used that searches for credentials in this order: *

* *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Application Discovery Service * (ex: proxy settings, retry counts, etc.). * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSApplicationDiscoveryClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified AWS * account credentials. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#withCredentials(AWSCredentialsProvider)} for example: * {@code AWSApplicationDiscoveryClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();} */ @Deprecated public AWSApplicationDiscoveryClient(AWSCredentials awsCredentials) { this(awsCredentials, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified AWS * account credentials and client configuration options. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentials * The AWS credentials (access key ID and secret key) to use when authenticating with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Application Discovery Service * (ex: proxy settings, retry counts, etc.). * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSApplicationDiscoveryClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSApplicationDiscoveryClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration) { super(clientConfiguration); this.awsCredentialsProvider = new StaticCredentialsProvider(awsCredentials); this.advancedConfig = AdvancedConfig.EMPTY; init(); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified AWS * account credentials provider. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSApplicationDiscoveryClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified AWS * account credentials provider and client configuration options. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Application Discovery Service * (ex: proxy settings, retry counts, etc.). * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSApplicationDiscoveryClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSApplicationDiscoveryClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, null); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified AWS * account credentials provider, client configuration options, and request metric collector. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param awsCredentialsProvider * The AWS credentials provider which will provide credentials to authenticate requests with AWS services. * @param clientConfiguration * The client configuration options controlling how this client connects to AWS Application Discovery Service * (ex: proxy settings, retry counts, etc.). * @param requestMetricCollector * optional request metric collector * @deprecated use {@link AWSApplicationDiscoveryClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSApplicationDiscoveryClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSApplicationDiscoveryClientBuilder#withMetricsCollector(RequestMetricCollector)} */ @Deprecated public AWSApplicationDiscoveryClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) { super(clientConfiguration, requestMetricCollector); this.awsCredentialsProvider = awsCredentialsProvider; this.advancedConfig = AdvancedConfig.EMPTY; init(); } public static AWSApplicationDiscoveryClientBuilder builder() { return AWSApplicationDiscoveryClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified * parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSApplicationDiscoveryClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on AWS Application Discovery Service using the specified * parameters. * *

* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AWSApplicationDiscoveryClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) { super(clientParams); this.awsCredentialsProvider = clientParams.getCredentialsProvider(); this.advancedConfig = clientParams.getAdvancedConfig(); init(); } private void init() { setServiceNameIntern(DEFAULT_SIGNING_NAME); setEndpointPrefix(ENDPOINT_PREFIX); // calling this.setEndPoint(...) will also modify the signer accordingly setEndpoint("https://discovery.us-west-2.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/applicationdiscovery/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/applicationdiscovery/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Associates one or more configuration items with an application. *

* * @param associateConfigurationItemsToApplicationRequest * @return Result of the AssociateConfigurationItemsToApplication operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.AssociateConfigurationItemsToApplication */ @Override public AssociateConfigurationItemsToApplicationResult associateConfigurationItemsToApplication(AssociateConfigurationItemsToApplicationRequest request) { request = beforeClientExecution(request); return executeAssociateConfigurationItemsToApplication(request); } @SdkInternalApi final AssociateConfigurationItemsToApplicationResult executeAssociateConfigurationItemsToApplication( AssociateConfigurationItemsToApplicationRequest associateConfigurationItemsToApplicationRequest) { ExecutionContext executionContext = createExecutionContext(associateConfigurationItemsToApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AssociateConfigurationItemsToApplicationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(associateConfigurationItemsToApplicationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateConfigurationItemsToApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateConfigurationItemsToApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. *

*

* Amazon Web Services 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. *

* * @param batchDeleteImportDataRequest * @return Result of the BatchDeleteImportData operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.BatchDeleteImportData */ @Override public BatchDeleteImportDataResult batchDeleteImportData(BatchDeleteImportDataRequest request) { request = beforeClientExecution(request); return executeBatchDeleteImportData(request); } @SdkInternalApi final BatchDeleteImportDataResult executeBatchDeleteImportData(BatchDeleteImportDataRequest batchDeleteImportDataRequest) { ExecutionContext executionContext = createExecutionContext(batchDeleteImportDataRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchDeleteImportDataRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchDeleteImportDataRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchDeleteImportData"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchDeleteImportDataResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates an application with the given name and description. *

* * @param createApplicationRequest * @return Result of the CreateApplication operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.CreateApplication */ @Override public CreateApplicationResult createApplication(CreateApplicationRequest request) { request = beforeClientExecution(request); return executeCreateApplication(request); } @SdkInternalApi final CreateApplicationResult executeCreateApplication(CreateApplicationRequest createApplicationRequest) { ExecutionContext executionContext = createExecutionContext(createApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createApplicationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. *

* *

* Do not store sensitive information (like personal data) in tags. *

*
* * @param createTagsRequest * @return Result of the CreateTags operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.CreateTags */ @Override public CreateTagsResult createTags(CreateTagsRequest request) { request = beforeClientExecution(request); return executeCreateTags(request); } @SdkInternalApi final CreateTagsResult executeCreateTags(CreateTagsRequest createTagsRequest) { ExecutionContext executionContext = createExecutionContext(createTagsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateTagsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createTagsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateTags"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateTagsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param deleteApplicationsRequest * @return Result of the DeleteApplications operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DeleteApplications */ @Override public DeleteApplicationsResult deleteApplications(DeleteApplicationsRequest request) { request = beforeClientExecution(request); return executeDeleteApplications(request); } @SdkInternalApi final DeleteApplicationsResult executeDeleteApplications(DeleteApplicationsRequest deleteApplicationsRequest) { ExecutionContext executionContext = createExecutionContext(deleteApplicationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApplicationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteApplicationsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplications"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteApplicationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param deleteTagsRequest * @return Result of the DeleteTags operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DeleteTags */ @Override public DeleteTagsResult deleteTags(DeleteTagsRequest request) { request = beforeClientExecution(request); return executeDeleteTags(request); } @SdkInternalApi final DeleteTagsResult executeDeleteTags(DeleteTagsRequest deleteTagsRequest) { ExecutionContext executionContext = createExecutionContext(deleteTagsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteTagsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteTagsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteTags"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteTagsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists agents or collectors as specified by ID or other filters. All agents/collectors associated with your user * can be listed if you call DescribeAgents as is without passing any parameters. *

* * @param describeAgentsRequest * @return Result of the DescribeAgents operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeAgents */ @Override public DescribeAgentsResult describeAgents(DescribeAgentsRequest request) { request = beforeClientExecution(request); return executeDescribeAgents(request); } @SdkInternalApi final DescribeAgentsResult executeDescribeAgents(DescribeAgentsRequest describeAgentsRequest) { ExecutionContext executionContext = createExecutionContext(describeAgentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeAgentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeAgentsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAgents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeAgentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 Amazon Web Services Application Discovery Service User * Guide. *

*
* * @param describeConfigurationsRequest * @return Result of the DescribeConfigurations operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeConfigurations */ @Override public DescribeConfigurationsResult describeConfigurations(DescribeConfigurationsRequest request) { request = beforeClientExecution(request); return executeDescribeConfigurations(request); } @SdkInternalApi final DescribeConfigurationsResult executeDescribeConfigurations(DescribeConfigurationsRequest describeConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(describeConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeConfigurationsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param describeContinuousExportsRequest * @return Result of the DescribeContinuousExports operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws OperationNotPermittedException * This operation is not permitted. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeContinuousExports */ @Override public DescribeContinuousExportsResult describeContinuousExports(DescribeContinuousExportsRequest request) { request = beforeClientExecution(request); return executeDescribeContinuousExports(request); } @SdkInternalApi final DescribeContinuousExportsResult executeDescribeContinuousExports(DescribeContinuousExportsRequest describeContinuousExportsRequest) { ExecutionContext executionContext = createExecutionContext(describeContinuousExportsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeContinuousExportsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeContinuousExportsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeContinuousExports"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeContinuousExportsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* DescribeExportConfigurations is deprecated. Use DescribeExportTasks, instead. *

* * @param describeExportConfigurationsRequest * @return Result of the DescribeExportConfigurations operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeExportConfigurations */ @Override @Deprecated public DescribeExportConfigurationsResult describeExportConfigurations(DescribeExportConfigurationsRequest request) { request = beforeClientExecution(request); return executeDescribeExportConfigurations(request); } @SdkInternalApi final DescribeExportConfigurationsResult executeDescribeExportConfigurations(DescribeExportConfigurationsRequest describeExportConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(describeExportConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeExportConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(describeExportConfigurationsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeExportConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeExportConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param describeExportTasksRequest * @return Result of the DescribeExportTasks operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeExportTasks */ @Override public DescribeExportTasksResult describeExportTasks(DescribeExportTasksRequest request) { request = beforeClientExecution(request); return executeDescribeExportTasks(request); } @SdkInternalApi final DescribeExportTasksResult executeDescribeExportTasks(DescribeExportTasksRequest describeExportTasksRequest) { ExecutionContext executionContext = createExecutionContext(describeExportTasksRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeExportTasksRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeExportTasksRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeExportTasks"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeExportTasksResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. *

* * @param describeImportTasksRequest * @return Result of the DescribeImportTasks operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeImportTasks */ @Override public DescribeImportTasksResult describeImportTasks(DescribeImportTasksRequest request) { request = beforeClientExecution(request); return executeDescribeImportTasks(request); } @SdkInternalApi final DescribeImportTasksResult executeDescribeImportTasks(DescribeImportTasksRequest describeImportTasksRequest) { ExecutionContext executionContext = createExecutionContext(describeImportTasksRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeImportTasksRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeImportTasksRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeImportTasks"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeImportTasksResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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 that have tags can be listed if you call * DescribeTags as is without passing any parameters. *

* * @param describeTagsRequest * @return Result of the DescribeTags operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DescribeTags */ @Override public DescribeTagsResult describeTags(DescribeTagsRequest request) { request = beforeClientExecution(request); return executeDescribeTags(request); } @SdkInternalApi final DescribeTagsResult executeDescribeTags(DescribeTagsRequest describeTagsRequest) { ExecutionContext executionContext = createExecutionContext(describeTagsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribeTagsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeTagsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeTags"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeTagsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Disassociates one or more configuration items from an application. *

* * @param disassociateConfigurationItemsFromApplicationRequest * @return Result of the DisassociateConfigurationItemsFromApplication operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.DisassociateConfigurationItemsFromApplication */ @Override public DisassociateConfigurationItemsFromApplicationResult disassociateConfigurationItemsFromApplication( DisassociateConfigurationItemsFromApplicationRequest request) { request = beforeClientExecution(request); return executeDisassociateConfigurationItemsFromApplication(request); } @SdkInternalApi final DisassociateConfigurationItemsFromApplicationResult executeDisassociateConfigurationItemsFromApplication( DisassociateConfigurationItemsFromApplicationRequest disassociateConfigurationItemsFromApplicationRequest) { ExecutionContext executionContext = createExecutionContext(disassociateConfigurationItemsFromApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DisassociateConfigurationItemsFromApplicationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(disassociateConfigurationItemsFromApplicationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateConfigurationItemsFromApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisassociateConfigurationItemsFromApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. *

* * @param exportConfigurationsRequest * @return Result of the ExportConfigurations operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws OperationNotPermittedException * This operation is not permitted. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.ExportConfigurations */ @Override @Deprecated public ExportConfigurationsResult exportConfigurations(ExportConfigurationsRequest request) { request = beforeClientExecution(request); return executeExportConfigurations(request); } @SdkInternalApi final ExportConfigurationsResult executeExportConfigurations(ExportConfigurationsRequest exportConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(exportConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ExportConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(exportConfigurationsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ExportConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ExportConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. *

* * @param getDiscoverySummaryRequest * @return Result of the GetDiscoverySummary operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.GetDiscoverySummary */ @Override public GetDiscoverySummaryResult getDiscoverySummary(GetDiscoverySummaryRequest request) { request = beforeClientExecution(request); return executeGetDiscoverySummary(request); } @SdkInternalApi final GetDiscoverySummaryResult executeGetDiscoverySummary(GetDiscoverySummaryRequest getDiscoverySummaryRequest) { ExecutionContext executionContext = createExecutionContext(getDiscoverySummaryRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetDiscoverySummaryRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDiscoverySummaryRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDiscoverySummary"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDiscoverySummaryResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* 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. *

* * @param listConfigurationsRequest * @return Result of the ListConfigurations operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.ListConfigurations */ @Override public ListConfigurationsResult listConfigurations(ListConfigurationsRequest request) { request = beforeClientExecution(request); return executeListConfigurations(request); } @SdkInternalApi final ListConfigurationsResult executeListConfigurations(ListConfigurationsRequest listConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(listConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listConfigurationsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param listServerNeighborsRequest * @return Result of the ListServerNeighbors operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.ListServerNeighbors */ @Override public ListServerNeighborsResult listServerNeighbors(ListServerNeighborsRequest request) { request = beforeClientExecution(request); return executeListServerNeighbors(request); } @SdkInternalApi final ListServerNeighborsResult executeListServerNeighbors(ListServerNeighborsRequest listServerNeighborsRequest) { ExecutionContext executionContext = createExecutionContext(listServerNeighborsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListServerNeighborsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listServerNeighborsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListServerNeighbors"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListServerNeighborsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param startContinuousExportRequest * @return Result of the StartContinuousExport operation returned by the service. * @throws ConflictErrorException * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws OperationNotPermittedException * This operation is not permitted. * @throws ResourceInUseException * This issue occurs when the same clientRequestToken is used with the * StartImportTask action, but with different parameters. For example, you use the same request * token but have two different import URLs, you can encounter this issue. If the import tasks are meant to * be different, use a different clientRequestToken, and try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.StartContinuousExport */ @Override public StartContinuousExportResult startContinuousExport(StartContinuousExportRequest request) { request = beforeClientExecution(request); return executeStartContinuousExport(request); } @SdkInternalApi final StartContinuousExportResult executeStartContinuousExport(StartContinuousExportRequest startContinuousExportRequest) { ExecutionContext executionContext = createExecutionContext(startContinuousExportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartContinuousExportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startContinuousExportRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartContinuousExport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartContinuousExportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Instructs the specified agents to start collecting data. *

* * @param startDataCollectionByAgentIdsRequest * @return Result of the StartDataCollectionByAgentIds operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.StartDataCollectionByAgentIds */ @Override public StartDataCollectionByAgentIdsResult startDataCollectionByAgentIds(StartDataCollectionByAgentIdsRequest request) { request = beforeClientExecution(request); return executeStartDataCollectionByAgentIds(request); } @SdkInternalApi final StartDataCollectionByAgentIdsResult executeStartDataCollectionByAgentIds(StartDataCollectionByAgentIdsRequest startDataCollectionByAgentIdsRequest) { ExecutionContext executionContext = createExecutionContext(startDataCollectionByAgentIdsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartDataCollectionByAgentIdsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(startDataCollectionByAgentIdsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartDataCollectionByAgentIds"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartDataCollectionByAgentIdsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Begins the export of a discovered data report to an Amazon S3 bucket managed by Amazon Web Services. *

* *

* Exports might provide an estimate of fees and savings based on certain information that you provide. Fee * estimates do not include any taxes that might apply. Your actual fees and savings depend on a variety of factors, * including your actual usage of Amazon Web Services services, which might vary from the estimates provided in this * report. *

*
*

* If you do not specify preferences or agentIds in the filter, a summary of all servers, * applications, tags, and performance is generated. This data is an aggregation of all server data collected * through on-premises tooling, file import, application grouping and applying tags. *

*

* 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. Export of detailed agent data is limited to two exports per * day. *

*

* If you enable ec2RecommendationsPreferences in preferences , an Amazon EC2 instance * matching the characteristics of each server in Application Discovery Service is generated. Changing the * attributes of the ec2RecommendationsPreferences changes the criteria of the recommendation. *

* * @param startExportTaskRequest * @return Result of the StartExportTask operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws OperationNotPermittedException * This operation is not permitted. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.StartExportTask */ @Override public StartExportTaskResult startExportTask(StartExportTaskRequest request) { request = beforeClientExecution(request); return executeStartExportTask(request); } @SdkInternalApi final StartExportTaskResult executeStartExportTask(StartExportTaskRequest startExportTaskRequest) { ExecutionContext executionContext = createExecutionContext(startExportTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartExportTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startExportTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartExportTask"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartExportTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts an import task, which allows you to import details of your on-premises environment directly into Amazon * Web Services Migration Hub without having to use the Amazon Web Services Application Discovery Service * (Application Discovery Service) tools such as the Amazon Web Services Application Discovery Service Agentless * Collector or Application 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. *
  3. *

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

    *
  4. *
  5. *

    * 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. *

    *
  6. *
  7. *

    * Use the console or the StartImportTask command with the Amazon Web Services CLI or one of the Amazon * Web Services SDKs to import the records from your file. *

    *
  8. *
*

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

* *

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

*
* * @param startImportTaskRequest * @return Result of the StartImportTask operation returned by the service. * @throws ResourceInUseException * This issue occurs when the same clientRequestToken is used with the * StartImportTask action, but with different parameters. For example, you use the same request * token but have two different import URLs, you can encounter this issue. If the import tasks are meant to * be different, use a different clientRequestToken, and try again. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.StartImportTask */ @Override public StartImportTaskResult startImportTask(StartImportTaskRequest request) { request = beforeClientExecution(request); return executeStartImportTask(request); } @SdkInternalApi final StartImportTaskResult executeStartImportTask(StartImportTaskRequest startImportTaskRequest) { ExecutionContext executionContext = createExecutionContext(startImportTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartImportTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startImportTaskRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartImportTask"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartImportTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param stopContinuousExportRequest * @return Result of the StopContinuousExport operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws OperationNotPermittedException * This operation is not permitted. * @throws ResourceNotFoundException * The specified configuration ID was not located. Verify the configuration ID and try again. * @throws ResourceInUseException * This issue occurs when the same clientRequestToken is used with the * StartImportTask action, but with different parameters. For example, you use the same request * token but have two different import URLs, you can encounter this issue. If the import tasks are meant to * be different, use a different clientRequestToken, and try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.StopContinuousExport */ @Override public StopContinuousExportResult stopContinuousExport(StopContinuousExportRequest request) { request = beforeClientExecution(request); return executeStopContinuousExport(request); } @SdkInternalApi final StopContinuousExportResult executeStopContinuousExport(StopContinuousExportRequest stopContinuousExportRequest) { ExecutionContext executionContext = createExecutionContext(stopContinuousExportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopContinuousExportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopContinuousExportRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopContinuousExport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopContinuousExportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Instructs the specified agents to stop collecting data. *

* * @param stopDataCollectionByAgentIdsRequest * @return Result of the StopDataCollectionByAgentIds operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.StopDataCollectionByAgentIds */ @Override public StopDataCollectionByAgentIdsResult stopDataCollectionByAgentIds(StopDataCollectionByAgentIdsRequest request) { request = beforeClientExecution(request); return executeStopDataCollectionByAgentIds(request); } @SdkInternalApi final StopDataCollectionByAgentIdsResult executeStopDataCollectionByAgentIds(StopDataCollectionByAgentIdsRequest stopDataCollectionByAgentIdsRequest) { ExecutionContext executionContext = createExecutionContext(stopDataCollectionByAgentIdsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopDataCollectionByAgentIdsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(stopDataCollectionByAgentIdsRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopDataCollectionByAgentIds"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopDataCollectionByAgentIdsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates metadata about an application. *

* * @param updateApplicationRequest * @return Result of the UpdateApplication operation returned by the service. * @throws AuthorizationErrorException * The user does not have permission to perform the action. Check the IAM policy associated with this user. * @throws InvalidParameterException * One or more parameters are not valid. Verify the parameters and try again. * @throws InvalidParameterValueException * The value of one or more parameters are either invalid or out of range. Verify the parameter values and * try again. * @throws ServerInternalErrorException * The server experienced an internal error. Try again. * @throws HomeRegionNotSetException * The home Region is not set. Set the home Region to continue. * @sample AWSApplicationDiscovery.UpdateApplication */ @Override public UpdateApplicationResult updateApplication(UpdateApplicationRequest request) { request = beforeClientExecution(request); return executeUpdateApplication(request); } @SdkInternalApi final UpdateApplicationResult executeUpdateApplication(UpdateApplicationRequest updateApplicationRequest) { ExecutionContext executionContext = createExecutionContext(updateApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateApplicationRequest)); // Binds the request metrics to the current request. request.setAWSRequestMetrics(awsRequestMetrics); request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion()); request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Application Discovery Service"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** * Returns additional metadata for a previously executed successful, request, typically used for debugging issues * where a service isn't acting as expected. This data isn't considered part of the result data returned by an * operation, so it's available through this separate, diagnostic interface. *

* Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic * information for an executed request, you should use this method to retrieve it as soon as possible after * executing the request. * * @param request * The originally executed request * * @return The response metadata for the specified request, or null if none is available. */ public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request) { return client.getResponseMetadataForRequest(request); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return invoke(request, responseHandler, executionContext, null, null); } /** * Normal invoke with authentication. Credentials are required and may be overriden at the request level. **/ private Response invoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI cachedEndpoint, URI uriFromEndpointTrait) { executionContext.setCredentialsProvider(CredentialUtils.getCredentialsProvider(request.getOriginalRequest(), awsCredentialsProvider)); return doInvoke(request, responseHandler, executionContext, cachedEndpoint, uriFromEndpointTrait); } /** * Invoke with no authentication. Credentials are not required and any credentials set on the client or request will * be ignored for this operation. **/ private Response anonymousInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext) { return doInvoke(request, responseHandler, executionContext, null, null); } /** * Invoke the request using the http client. Assumes credentials (or lack thereof) have been configured in the * ExecutionContext beforehand. **/ private Response doInvoke(Request request, HttpResponseHandler> responseHandler, ExecutionContext executionContext, URI discoveredEndpoint, URI uriFromEndpointTrait) { if (discoveredEndpoint != null) { request.setEndpoint(discoveredEndpoint); request.getOriginalRequest().getRequestClientOptions().appendUserAgent("endpoint-discovery"); } else if (uriFromEndpointTrait != null) { request.setEndpoint(uriFromEndpointTrait); } else { request.setEndpoint(endpoint); } request.setTimeOffset(timeOffset); HttpResponseHandler errorResponseHandler = protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata()); return client.execute(request, responseHandler, errorResponseHandler, executionContext); } @com.amazonaws.annotation.SdkInternalApi static com.amazonaws.protocol.json.SdkJsonProtocolFactory getProtocolFactory() { return protocolFactory; } @Override public void shutdown() { super.shutdown(); } }