All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.wellarchitected.AWSWellArchitectedClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Well-Architected Tool module holds the client classes that are used for communicating with AWS Well-Architected Tool Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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.wellarchitected;

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.wellarchitected.AWSWellArchitectedClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.wellarchitected.model.*;
import com.amazonaws.services.wellarchitected.model.transform.*;

/**
 * Client for accessing Well-Architected. All service calls made using this client are blocking, and will not return
 * until the service call completes.
 * 

* AWS Well-Architected Tool *

* This is the AWS Well-Architected Tool API Reference. The AWS Well-Architected Tool API provides programmatic * access to the AWS Well-Architected Tool in the AWS Management Console. For information about the AWS * Well-Architected Tool, see the AWS * Well-Architected Tool User Guide. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSWellArchitectedClient extends AmazonWebServiceClient implements AWSWellArchitected { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSWellArchitected.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "wellarchitected"; /** 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) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.wellarchitected.model.transform.ValidationExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.wellarchitected.model.AWSWellArchitectedException.class)); public static AWSWellArchitectedClientBuilder builder() { return AWSWellArchitectedClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Well-Architected 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. */ AWSWellArchitectedClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Well-Architected 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. */ AWSWellArchitectedClient(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("wellarchitected.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/wellarchitected/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/wellarchitected/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Associate a lens to a workload. *

* * @param associateLensesRequest * Input to associate lens reviews. * @return Result of the AssociateLenses operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.AssociateLenses * @see AWS API Documentation */ @Override public AssociateLensesResult associateLenses(AssociateLensesRequest request) { request = beforeClientExecution(request); return executeAssociateLenses(request); } @SdkInternalApi final AssociateLensesResult executeAssociateLenses(AssociateLensesRequest associateLensesRequest) { ExecutionContext executionContext = createExecutionContext(associateLensesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new AssociateLensesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateLensesRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateLenses"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateLensesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Create a milestone for an existing workload. *

* * @param createMilestoneRequest * Input for milestone creation. * @return Result of the CreateMilestone operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ServiceQuotaExceededException * The user has reached their resource quota. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.CreateMilestone * @see AWS API Documentation */ @Override public CreateMilestoneResult createMilestone(CreateMilestoneRequest request) { request = beforeClientExecution(request); return executeCreateMilestone(request); } @SdkInternalApi final CreateMilestoneResult executeCreateMilestone(CreateMilestoneRequest createMilestoneRequest) { ExecutionContext executionContext = createExecutionContext(createMilestoneRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateMilestoneRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createMilestoneRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateMilestone"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateMilestoneResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Create a new workload. *

*

* The owner of a workload can share the workload with other AWS accounts and IAM users in the same AWS Region. Only * the owner of a workload can delete it. *

*

* For more information, see Defining a Workload * in the AWS Well-Architected Tool User Guide. *

* * @param createWorkloadRequest * Input for workload creation. * @return Result of the CreateWorkload operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ConflictException * The resource already exists. * @throws ServiceQuotaExceededException * The user has reached their resource quota. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.CreateWorkload * @see AWS * API Documentation */ @Override public CreateWorkloadResult createWorkload(CreateWorkloadRequest request) { request = beforeClientExecution(request); return executeCreateWorkload(request); } @SdkInternalApi final CreateWorkloadResult executeCreateWorkload(CreateWorkloadRequest createWorkloadRequest) { ExecutionContext executionContext = createExecutionContext(createWorkloadRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateWorkloadRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createWorkloadRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateWorkload"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateWorkloadResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Create a workload share. *

*

* The owner of a workload can share it with other AWS accounts and IAM users in the same AWS Region. Shared access * to a workload is not removed until the workload invitation is deleted. *

*

* For more information, see Sharing a Workload * in the AWS Well-Architected Tool User Guide. *

* * @param createWorkloadShareRequest * Input for Create Workload Share * @return Result of the CreateWorkloadShare operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ServiceQuotaExceededException * The user has reached their resource quota. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.CreateWorkloadShare * @see AWS API Documentation */ @Override public CreateWorkloadShareResult createWorkloadShare(CreateWorkloadShareRequest request) { request = beforeClientExecution(request); return executeCreateWorkloadShare(request); } @SdkInternalApi final CreateWorkloadShareResult executeCreateWorkloadShare(CreateWorkloadShareRequest createWorkloadShareRequest) { ExecutionContext executionContext = createExecutionContext(createWorkloadShareRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateWorkloadShareRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createWorkloadShareRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateWorkloadShare"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateWorkloadShareResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Delete an existing workload. *

* * @param deleteWorkloadRequest * Input for workload deletion. * @return Result of the DeleteWorkload operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.DeleteWorkload * @see AWS * API Documentation */ @Override public DeleteWorkloadResult deleteWorkload(DeleteWorkloadRequest request) { request = beforeClientExecution(request); return executeDeleteWorkload(request); } @SdkInternalApi final DeleteWorkloadResult executeDeleteWorkload(DeleteWorkloadRequest deleteWorkloadRequest) { ExecutionContext executionContext = createExecutionContext(deleteWorkloadRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteWorkloadRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteWorkloadRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteWorkload"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteWorkloadResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Delete a workload share. *

* * @param deleteWorkloadShareRequest * Input for Delete Workload Share * @return Result of the DeleteWorkloadShare operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.DeleteWorkloadShare * @see AWS API Documentation */ @Override public DeleteWorkloadShareResult deleteWorkloadShare(DeleteWorkloadShareRequest request) { request = beforeClientExecution(request); return executeDeleteWorkloadShare(request); } @SdkInternalApi final DeleteWorkloadShareResult executeDeleteWorkloadShare(DeleteWorkloadShareRequest deleteWorkloadShareRequest) { ExecutionContext executionContext = createExecutionContext(deleteWorkloadShareRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteWorkloadShareRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteWorkloadShareRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteWorkloadShare"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteWorkloadShareResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Disassociate a lens from a workload. *

* *

* The AWS Well-Architected Framework lens (wellarchitected) cannot be removed from a workload. *

*
* * @param disassociateLensesRequest * Input to disassociate lens reviews. * @return Result of the DisassociateLenses operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.DisassociateLenses * @see AWS API Documentation */ @Override public DisassociateLensesResult disassociateLenses(DisassociateLensesRequest request) { request = beforeClientExecution(request); return executeDisassociateLenses(request); } @SdkInternalApi final DisassociateLensesResult executeDisassociateLenses(DisassociateLensesRequest disassociateLensesRequest) { ExecutionContext executionContext = createExecutionContext(disassociateLensesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DisassociateLensesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disassociateLensesRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateLenses"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisassociateLensesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get the answer to a specific question in a workload review. *

* * @param getAnswerRequest * Input to get answer. * @return Result of the GetAnswer operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.GetAnswer * @see AWS API * Documentation */ @Override public GetAnswerResult getAnswer(GetAnswerRequest request) { request = beforeClientExecution(request); return executeGetAnswer(request); } @SdkInternalApi final GetAnswerResult executeGetAnswer(GetAnswerRequest getAnswerRequest) { ExecutionContext executionContext = createExecutionContext(getAnswerRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetAnswerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getAnswerRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetAnswer"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetAnswerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get lens review. *

* * @param getLensReviewRequest * Input to get lens review. * @return Result of the GetLensReview operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.GetLensReview * @see AWS * API Documentation */ @Override public GetLensReviewResult getLensReview(GetLensReviewRequest request) { request = beforeClientExecution(request); return executeGetLensReview(request); } @SdkInternalApi final GetLensReviewResult executeGetLensReview(GetLensReviewRequest getLensReviewRequest) { ExecutionContext executionContext = createExecutionContext(getLensReviewRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetLensReviewRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLensReviewRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLensReview"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLensReviewResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get lens review report. *

* * @param getLensReviewReportRequest * Input to get lens review report. * @return Result of the GetLensReviewReport operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.GetLensReviewReport * @see AWS API Documentation */ @Override public GetLensReviewReportResult getLensReviewReport(GetLensReviewReportRequest request) { request = beforeClientExecution(request); return executeGetLensReviewReport(request); } @SdkInternalApi final GetLensReviewReportResult executeGetLensReviewReport(GetLensReviewReportRequest getLensReviewReportRequest) { ExecutionContext executionContext = createExecutionContext(getLensReviewReportRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetLensReviewReportRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getLensReviewReportRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLensReviewReport"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLensReviewReportResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get lens version differences. *

* * @param getLensVersionDifferenceRequest * @return Result of the GetLensVersionDifference operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.GetLensVersionDifference * @see AWS API Documentation */ @Override public GetLensVersionDifferenceResult getLensVersionDifference(GetLensVersionDifferenceRequest request) { request = beforeClientExecution(request); return executeGetLensVersionDifference(request); } @SdkInternalApi final GetLensVersionDifferenceResult executeGetLensVersionDifference(GetLensVersionDifferenceRequest getLensVersionDifferenceRequest) { ExecutionContext executionContext = createExecutionContext(getLensVersionDifferenceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetLensVersionDifferenceRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getLensVersionDifferenceRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLensVersionDifference"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLensVersionDifferenceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get a milestone for an existing workload. *

* * @param getMilestoneRequest * Input to get a milestone. * @return Result of the GetMilestone operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.GetMilestone * @see AWS * API Documentation */ @Override public GetMilestoneResult getMilestone(GetMilestoneRequest request) { request = beforeClientExecution(request); return executeGetMilestone(request); } @SdkInternalApi final GetMilestoneResult executeGetMilestone(GetMilestoneRequest getMilestoneRequest) { ExecutionContext executionContext = createExecutionContext(getMilestoneRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetMilestoneRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getMilestoneRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetMilestone"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetMilestoneResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get an existing workload. *

* * @param getWorkloadRequest * Input to get a workload. * @return Result of the GetWorkload operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.GetWorkload * @see AWS * API Documentation */ @Override public GetWorkloadResult getWorkload(GetWorkloadRequest request) { request = beforeClientExecution(request); return executeGetWorkload(request); } @SdkInternalApi final GetWorkloadResult executeGetWorkload(GetWorkloadRequest getWorkloadRequest) { ExecutionContext executionContext = createExecutionContext(getWorkloadRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetWorkloadRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getWorkloadRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetWorkload"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetWorkloadResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List of answers. *

* * @param listAnswersRequest * Input to list answers. * @return Result of the ListAnswers operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListAnswers * @see AWS * API Documentation */ @Override public ListAnswersResult listAnswers(ListAnswersRequest request) { request = beforeClientExecution(request); return executeListAnswers(request); } @SdkInternalApi final ListAnswersResult executeListAnswers(ListAnswersRequest listAnswersRequest) { ExecutionContext executionContext = createExecutionContext(listAnswersRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListAnswersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listAnswersRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListAnswers"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListAnswersResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List lens review improvements. *

* * @param listLensReviewImprovementsRequest * Input to list lens review improvements. * @return Result of the ListLensReviewImprovements operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListLensReviewImprovements * @see AWS API Documentation */ @Override public ListLensReviewImprovementsResult listLensReviewImprovements(ListLensReviewImprovementsRequest request) { request = beforeClientExecution(request); return executeListLensReviewImprovements(request); } @SdkInternalApi final ListLensReviewImprovementsResult executeListLensReviewImprovements(ListLensReviewImprovementsRequest listLensReviewImprovementsRequest) { ExecutionContext executionContext = createExecutionContext(listLensReviewImprovementsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListLensReviewImprovementsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listLensReviewImprovementsRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLensReviewImprovements"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLensReviewImprovementsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List lens reviews. *

* * @param listLensReviewsRequest * Input to list lens reviews. * @return Result of the ListLensReviews operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListLensReviews * @see AWS API Documentation */ @Override public ListLensReviewsResult listLensReviews(ListLensReviewsRequest request) { request = beforeClientExecution(request); return executeListLensReviews(request); } @SdkInternalApi final ListLensReviewsResult executeListLensReviews(ListLensReviewsRequest listLensReviewsRequest) { ExecutionContext executionContext = createExecutionContext(listLensReviewsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListLensReviewsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listLensReviewsRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLensReviews"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLensReviewsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List the available lenses. *

* * @param listLensesRequest * Input to list lenses. * @return Result of the ListLenses operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListLenses * @see AWS API * Documentation */ @Override public ListLensesResult listLenses(ListLensesRequest request) { request = beforeClientExecution(request); return executeListLenses(request); } @SdkInternalApi final ListLensesResult executeListLenses(ListLensesRequest listLensesRequest) { ExecutionContext executionContext = createExecutionContext(listLensesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListLensesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listLensesRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListLenses"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListLensesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List all milestones for an existing workload. *

* * @param listMilestonesRequest * Input to list all milestones for a workload. * @return Result of the ListMilestones operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListMilestones * @see AWS * API Documentation */ @Override public ListMilestonesResult listMilestones(ListMilestonesRequest request) { request = beforeClientExecution(request); return executeListMilestones(request); } @SdkInternalApi final ListMilestonesResult executeListMilestones(ListMilestonesRequest listMilestonesRequest) { ExecutionContext executionContext = createExecutionContext(listMilestonesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListMilestonesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listMilestonesRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListMilestones"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListMilestonesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List lens notifications. *

* * @param listNotificationsRequest * @return Result of the ListNotifications operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListNotifications * @see AWS API Documentation */ @Override public ListNotificationsResult listNotifications(ListNotificationsRequest request) { request = beforeClientExecution(request); return executeListNotifications(request); } @SdkInternalApi final ListNotificationsResult executeListNotifications(ListNotificationsRequest listNotificationsRequest) { ExecutionContext executionContext = createExecutionContext(listNotificationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListNotificationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listNotificationsRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNotifications"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNotificationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List the workload invitations. *

* * @param listShareInvitationsRequest * Input for List Share Invitations * @return Result of the ListShareInvitations operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListShareInvitations * @see AWS API Documentation */ @Override public ListShareInvitationsResult listShareInvitations(ListShareInvitationsRequest request) { request = beforeClientExecution(request); return executeListShareInvitations(request); } @SdkInternalApi final ListShareInvitationsResult executeListShareInvitations(ListShareInvitationsRequest listShareInvitationsRequest) { ExecutionContext executionContext = createExecutionContext(listShareInvitationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListShareInvitationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listShareInvitationsRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListShareInvitations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListShareInvitationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List the tags for a resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @sample AWSWellArchitected.ListTagsForResource * @see AWS API Documentation */ @Override public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request) { request = beforeClientExecution(request); return executeListTagsForResource(request); } @SdkInternalApi final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) { ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List the workload shares associated with the workload. *

* * @param listWorkloadSharesRequest * Input for List Workload Share * @return Result of the ListWorkloadShares operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListWorkloadShares * @see AWS API Documentation */ @Override public ListWorkloadSharesResult listWorkloadShares(ListWorkloadSharesRequest request) { request = beforeClientExecution(request); return executeListWorkloadShares(request); } @SdkInternalApi final ListWorkloadSharesResult executeListWorkloadShares(ListWorkloadSharesRequest listWorkloadSharesRequest) { ExecutionContext executionContext = createExecutionContext(listWorkloadSharesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListWorkloadSharesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listWorkloadSharesRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListWorkloadShares"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListWorkloadSharesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List workloads. Paginated. *

* * @param listWorkloadsRequest * Input to list all workloads. * @return Result of the ListWorkloads operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.ListWorkloads * @see AWS * API Documentation */ @Override public ListWorkloadsResult listWorkloads(ListWorkloadsRequest request) { request = beforeClientExecution(request); return executeListWorkloads(request); } @SdkInternalApi final ListWorkloadsResult executeListWorkloads(ListWorkloadsRequest listWorkloadsRequest) { ExecutionContext executionContext = createExecutionContext(listWorkloadsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListWorkloadsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listWorkloadsRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListWorkloads"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListWorkloadsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds one or more tags to the specified resource. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @sample AWSWellArchitected.TagResource * @see AWS * API Documentation */ @Override public TagResourceResult tagResource(TagResourceRequest request) { request = beforeClientExecution(request); return executeTagResource(request); } @SdkInternalApi final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) { ExecutionContext executionContext = createExecutionContext(tagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new TagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(tagResourceRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes specified tags from a resource. *

*

* To specify multiple tags, use separate tagKeys parameters, for example: *

*

* DELETE /tags/WorkloadArn?tagKeys=key1&tagKeys=key2 *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @sample AWSWellArchitected.UntagResource * @see AWS * API Documentation */ @Override public UntagResourceResult untagResource(UntagResourceRequest request) { request = beforeClientExecution(request); return executeUntagResource(request); } @SdkInternalApi final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) { ExecutionContext executionContext = createExecutionContext(untagResourceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UntagResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(untagResourceRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update the answer to a specific question in a workload review. *

* * @param updateAnswerRequest * Input to update answer. * @return Result of the UpdateAnswer operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.UpdateAnswer * @see AWS * API Documentation */ @Override public UpdateAnswerResult updateAnswer(UpdateAnswerRequest request) { request = beforeClientExecution(request); return executeUpdateAnswer(request); } @SdkInternalApi final UpdateAnswerResult executeUpdateAnswer(UpdateAnswerRequest updateAnswerRequest) { ExecutionContext executionContext = createExecutionContext(updateAnswerRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateAnswerRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAnswerRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAnswer"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAnswerResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update lens review. *

* * @param updateLensReviewRequest * Input for update lens review. * @return Result of the UpdateLensReview operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.UpdateLensReview * @see AWS API Documentation */ @Override public UpdateLensReviewResult updateLensReview(UpdateLensReviewRequest request) { request = beforeClientExecution(request); return executeUpdateLensReview(request); } @SdkInternalApi final UpdateLensReviewResult executeUpdateLensReview(UpdateLensReviewRequest updateLensReviewRequest) { ExecutionContext executionContext = createExecutionContext(updateLensReviewRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateLensReviewRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLensReviewRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLensReview"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLensReviewResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update a workload invitation. *

* * @param updateShareInvitationRequest * Input for Update Share Invitation * @return Result of the UpdateShareInvitation operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.UpdateShareInvitation * @see AWS API Documentation */ @Override public UpdateShareInvitationResult updateShareInvitation(UpdateShareInvitationRequest request) { request = beforeClientExecution(request); return executeUpdateShareInvitation(request); } @SdkInternalApi final UpdateShareInvitationResult executeUpdateShareInvitation(UpdateShareInvitationRequest updateShareInvitationRequest) { ExecutionContext executionContext = createExecutionContext(updateShareInvitationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateShareInvitationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateShareInvitationRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateShareInvitation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateShareInvitationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update an existing workload. *

* * @param updateWorkloadRequest * Input to update a workload. * @return Result of the UpdateWorkload operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.UpdateWorkload * @see AWS * API Documentation */ @Override public UpdateWorkloadResult updateWorkload(UpdateWorkloadRequest request) { request = beforeClientExecution(request); return executeUpdateWorkload(request); } @SdkInternalApi final UpdateWorkloadResult executeUpdateWorkload(UpdateWorkloadRequest updateWorkloadRequest) { ExecutionContext executionContext = createExecutionContext(updateWorkloadRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateWorkloadRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateWorkloadRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateWorkload"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateWorkloadResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update a workload share. *

* * @param updateWorkloadShareRequest * Input for Update Workload Share * @return Result of the UpdateWorkloadShare operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.UpdateWorkloadShare * @see AWS API Documentation */ @Override public UpdateWorkloadShareResult updateWorkloadShare(UpdateWorkloadShareRequest request) { request = beforeClientExecution(request); return executeUpdateWorkloadShare(request); } @SdkInternalApi final UpdateWorkloadShareResult executeUpdateWorkloadShare(UpdateWorkloadShareRequest updateWorkloadShareRequest) { ExecutionContext executionContext = createExecutionContext(updateWorkloadShareRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateWorkloadShareRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateWorkloadShareRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateWorkloadShare"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateWorkloadShareResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Upgrade lens review. *

* * @param upgradeLensReviewRequest * @return Result of the UpgradeLensReview operation returned by the service. * @throws ValidationException * The user input is not valid. * @throws ResourceNotFoundException * The requested resource was not found. * @throws ConflictException * The resource already exists. * @throws InternalServerException * There is a problem with the AWS Well-Architected Tool API service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws ThrottlingException * Request was denied due to request throttling. * @sample AWSWellArchitected.UpgradeLensReview * @see AWS API Documentation */ @Override public UpgradeLensReviewResult upgradeLensReview(UpgradeLensReviewRequest request) { request = beforeClientExecution(request); return executeUpgradeLensReview(request); } @SdkInternalApi final UpgradeLensReviewResult executeUpgradeLensReview(UpgradeLensReviewRequest upgradeLensReviewRequest) { ExecutionContext executionContext = createExecutionContext(upgradeLensReviewRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpgradeLensReviewRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(upgradeLensReviewRequest)); // 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, "WellArchitected"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpgradeLensReview"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpgradeLensReviewResultJsonUnmarshaller()); 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(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy