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

com.amazonaws.services.xray.AWSXRayClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS X-Ray module holds the client classes that are used for communicating with AWS X-Ray 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.xray;

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.xray.AWSXRayClientBuilder;

import com.amazonaws.AmazonServiceException;

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

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

*

* AWS X-Ray provides APIs for managing debug traces and retrieving service maps and other data created by processing * those traces. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSXRayClient extends AmazonWebServiceClient implements AWSXRay { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSXRay.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "xray"; /** 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("") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller( com.amazonaws.services.xray.model.transform.InvalidRequestExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottledException").withExceptionUnmarshaller( com.amazonaws.services.xray.model.transform.ThrottledExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("RuleLimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.xray.model.transform.RuleLimitExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("TooManyTagsException").withExceptionUnmarshaller( com.amazonaws.services.xray.model.transform.TooManyTagsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.xray.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.xray.model.AWSXRayException.class)); /** * Constructs a new client to invoke service methods on AWS X-Ray. A credentials provider chain will be used that * searches for credentials in this order: *
    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
* *

* 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 AWSXRayClientBuilder#defaultClient()} */ @Deprecated public AWSXRayClient() { this(DefaultAWSCredentialsProviderChain.getInstance(), configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS X-Ray. A credentials provider chain will be used that * searches for credentials in this order: *

    *
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • *
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • *
  • Instance profile credentials delivered through the Amazon EC2 metadata service
  • *
* *

* 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 X-Ray (ex: proxy settings, * retry counts, etc.). * * @see DefaultAWSCredentialsProviderChain * @deprecated use {@link AWSXRayClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSXRayClient(ClientConfiguration clientConfiguration) { this(DefaultAWSCredentialsProviderChain.getInstance(), clientConfiguration); } /** * Constructs a new client to invoke service methods on AWS X-Ray 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 AWSXRayClientBuilder#withCredentials(AWSCredentialsProvider)} for example: * {@code AWSXRayClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();} */ @Deprecated public AWSXRayClient(AWSCredentials awsCredentials) { this(awsCredentials, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS X-Ray 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 X-Ray (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AWSXRayClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSXRayClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSXRayClient(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 X-Ray 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 AWSXRayClientBuilder#withCredentials(AWSCredentialsProvider)} */ @Deprecated public AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider) { this(awsCredentialsProvider, configFactory.getConfig()); } /** * Constructs a new client to invoke service methods on AWS X-Ray 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 X-Ray (ex: proxy settings, * retry counts, etc.). * @deprecated use {@link AWSXRayClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSXRayClientBuilder#withClientConfiguration(ClientConfiguration)} */ @Deprecated public AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration) { this(awsCredentialsProvider, clientConfiguration, null); } /** * Constructs a new client to invoke service methods on AWS X-Ray 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 X-Ray (ex: proxy settings, * retry counts, etc.). * @param requestMetricCollector * optional request metric collector * @deprecated use {@link AWSXRayClientBuilder#withCredentials(AWSCredentialsProvider)} and * {@link AWSXRayClientBuilder#withClientConfiguration(ClientConfiguration)} and * {@link AWSXRayClientBuilder#withMetricsCollector(RequestMetricCollector)} */ @Deprecated public AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector) { super(clientConfiguration, requestMetricCollector); this.awsCredentialsProvider = awsCredentialsProvider; this.advancedConfig = AdvancedConfig.EMPTY; init(); } public static AWSXRayClientBuilder builder() { return AWSXRayClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on AWS X-Ray 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. */ AWSXRayClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on AWS X-Ray 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. */ AWSXRayClient(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("xray.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/xray/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/xray/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from * a single request. Use GetTraceSummaries to get a list of trace IDs. *

* * @param batchGetTracesRequest * @return Result of the BatchGetTraces operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.BatchGetTraces * @see AWS API * Documentation */ @Override public BatchGetTracesResult batchGetTraces(BatchGetTracesRequest request) { request = beforeClientExecution(request); return executeBatchGetTraces(request); } @SdkInternalApi final BatchGetTracesResult executeBatchGetTraces(BatchGetTracesRequest batchGetTracesRequest) { ExecutionContext executionContext = createExecutionContext(batchGetTracesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new BatchGetTracesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetTracesRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetTraces"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetTracesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a group resource with a name and a filter expression. *

* * @param createGroupRequest * @return Result of the CreateGroup operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.CreateGroup * @see AWS API * Documentation */ @Override public CreateGroupResult createGroup(CreateGroupRequest request) { request = beforeClientExecution(request); return executeCreateGroup(request); } @SdkInternalApi final CreateGroupResult executeCreateGroup(CreateGroupRequest createGroupRequest) { ExecutionContext executionContext = createExecutionContext(createGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createGroupRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a rule to control sampling behavior for instrumented applications. Services retrieve rules with * GetSamplingRules, and evaluate each rule in ascending order of priority for each request. If a rule * matches, the service records a trace, borrowing it from the reservoir size. After 10 seconds, the service reports * back to X-Ray with GetSamplingTargets to get updated versions of each in-use rule. The updated rule * contains a trace quota that the service can use instead of borrowing from the reservoir. *

* * @param createSamplingRuleRequest * @return Result of the CreateSamplingRule operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @throws RuleLimitExceededException * You have reached the maximum number of sampling rules. * @sample AWSXRay.CreateSamplingRule * @see AWS API * Documentation */ @Override public CreateSamplingRuleResult createSamplingRule(CreateSamplingRuleRequest request) { request = beforeClientExecution(request); return executeCreateSamplingRule(request); } @SdkInternalApi final CreateSamplingRuleResult executeCreateSamplingRule(CreateSamplingRuleRequest createSamplingRuleRequest) { ExecutionContext executionContext = createExecutionContext(createSamplingRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateSamplingRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createSamplingRuleRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateSamplingRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateSamplingRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a group resource. *

* * @param deleteGroupRequest * @return Result of the DeleteGroup operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.DeleteGroup * @see AWS API * Documentation */ @Override public DeleteGroupResult deleteGroup(DeleteGroupRequest request) { request = beforeClientExecution(request); return executeDeleteGroup(request); } @SdkInternalApi final DeleteGroupResult executeDeleteGroup(DeleteGroupRequest deleteGroupRequest) { ExecutionContext executionContext = createExecutionContext(deleteGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteGroupRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a sampling rule. *

* * @param deleteSamplingRuleRequest * @return Result of the DeleteSamplingRule operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.DeleteSamplingRule * @see AWS API * Documentation */ @Override public DeleteSamplingRuleResult deleteSamplingRule(DeleteSamplingRuleRequest request) { request = beforeClientExecution(request); return executeDeleteSamplingRule(request); } @SdkInternalApi final DeleteSamplingRuleResult executeDeleteSamplingRule(DeleteSamplingRuleRequest deleteSamplingRuleRequest) { ExecutionContext executionContext = createExecutionContext(deleteSamplingRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteSamplingRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteSamplingRuleRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteSamplingRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteSamplingRuleResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the current encryption configuration for X-Ray data. *

* * @param getEncryptionConfigRequest * @return Result of the GetEncryptionConfig operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetEncryptionConfig * @see AWS API * Documentation */ @Override public GetEncryptionConfigResult getEncryptionConfig(GetEncryptionConfigRequest request) { request = beforeClientExecution(request); return executeGetEncryptionConfig(request); } @SdkInternalApi final GetEncryptionConfigResult executeGetEncryptionConfig(GetEncryptionConfigRequest getEncryptionConfigRequest) { ExecutionContext executionContext = createExecutionContext(getEncryptionConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetEncryptionConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getEncryptionConfigRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetEncryptionConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetEncryptionConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves group resource details. *

* * @param getGroupRequest * @return Result of the GetGroup operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetGroup * @see AWS API * Documentation */ @Override public GetGroupResult getGroup(GetGroupRequest request) { request = beforeClientExecution(request); return executeGetGroup(request); } @SdkInternalApi final GetGroupResult executeGetGroup(GetGroupRequest getGroupRequest) { ExecutionContext executionContext = createExecutionContext(getGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getGroupRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves all active group details. *

* * @param getGroupsRequest * @return Result of the GetGroups operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetGroups * @see AWS API * Documentation */ @Override public GetGroupsResult getGroups(GetGroupsRequest request) { request = beforeClientExecution(request); return executeGetGroups(request); } @SdkInternalApi final GetGroupsResult executeGetGroups(GetGroupsRequest getGroupsRequest) { ExecutionContext executionContext = createExecutionContext(getGroupsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getGroupsRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetGroups"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetGroupsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the summary information of an insight. This includes impact to clients and root cause services, the top * anomalous services, the category, the state of the insight, and the start and end time of the insight. *

* * @param getInsightRequest * @return Result of the GetInsight operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetInsight * @see AWS API * Documentation */ @Override public GetInsightResult getInsight(GetInsightRequest request) { request = beforeClientExecution(request); return executeGetInsight(request); } @SdkInternalApi final GetInsightResult executeGetInsight(GetInsightRequest getInsightRequest) { ExecutionContext executionContext = createExecutionContext(getInsightRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetInsightRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getInsightRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInsight"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetInsightResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event. * You can review an insight's events in the Impact Timeline on the Inspect page in the X-Ray console. *

* * @param getInsightEventsRequest * @return Result of the GetInsightEvents operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetInsightEvents * @see AWS API * Documentation */ @Override public GetInsightEventsResult getInsightEvents(GetInsightEventsRequest request) { request = beforeClientExecution(request); return executeGetInsightEvents(request); } @SdkInternalApi final GetInsightEventsResult executeGetInsightEvents(GetInsightEventsRequest getInsightEventsRequest) { ExecutionContext executionContext = createExecutionContext(getInsightEventsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetInsightEventsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getInsightEventsRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInsightEvents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetInsightEventsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a service graph structure filtered by the specified insight. The service graph is limited to only * structural information. For a complete service graph, use this API with the GetServiceGraph API. *

* * @param getInsightImpactGraphRequest * @return Result of the GetInsightImpactGraph operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetInsightImpactGraph * @see AWS API * Documentation */ @Override public GetInsightImpactGraphResult getInsightImpactGraph(GetInsightImpactGraphRequest request) { request = beforeClientExecution(request); return executeGetInsightImpactGraph(request); } @SdkInternalApi final GetInsightImpactGraphResult executeGetInsightImpactGraph(GetInsightImpactGraphRequest getInsightImpactGraphRequest) { ExecutionContext executionContext = createExecutionContext(getInsightImpactGraphRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetInsightImpactGraphRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getInsightImpactGraphRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInsightImpactGraph"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetInsightImpactGraphResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the summaries of all insights in the specified group matching the provided filter values. *

* * @param getInsightSummariesRequest * @return Result of the GetInsightSummaries operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetInsightSummaries * @see AWS API * Documentation */ @Override public GetInsightSummariesResult getInsightSummaries(GetInsightSummariesRequest request) { request = beforeClientExecution(request); return executeGetInsightSummaries(request); } @SdkInternalApi final GetInsightSummariesResult executeGetInsightSummaries(GetInsightSummariesRequest getInsightSummariesRequest) { ExecutionContext executionContext = createExecutionContext(getInsightSummariesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetInsightSummariesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getInsightSummariesRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInsightSummaries"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetInsightSummariesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves all sampling rules. *

* * @param getSamplingRulesRequest * @return Result of the GetSamplingRules operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetSamplingRules * @see AWS API * Documentation */ @Override public GetSamplingRulesResult getSamplingRules(GetSamplingRulesRequest request) { request = beforeClientExecution(request); return executeGetSamplingRules(request); } @SdkInternalApi final GetSamplingRulesResult executeGetSamplingRules(GetSamplingRulesRequest getSamplingRulesRequest) { ExecutionContext executionContext = createExecutionContext(getSamplingRulesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSamplingRulesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getSamplingRulesRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSamplingRules"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetSamplingRulesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves information about recent sampling results for all sampling rules. *

* * @param getSamplingStatisticSummariesRequest * @return Result of the GetSamplingStatisticSummaries operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetSamplingStatisticSummaries * @see AWS API Documentation */ @Override public GetSamplingStatisticSummariesResult getSamplingStatisticSummaries(GetSamplingStatisticSummariesRequest request) { request = beforeClientExecution(request); return executeGetSamplingStatisticSummaries(request); } @SdkInternalApi final GetSamplingStatisticSummariesResult executeGetSamplingStatisticSummaries(GetSamplingStatisticSummariesRequest getSamplingStatisticSummariesRequest) { ExecutionContext executionContext = createExecutionContext(getSamplingStatisticSummariesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSamplingStatisticSummariesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getSamplingStatisticSummariesRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSamplingStatisticSummaries"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetSamplingStatisticSummariesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Requests a sampling quota for rules that the service is using to sample requests. *

* * @param getSamplingTargetsRequest * @return Result of the GetSamplingTargets operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetSamplingTargets * @see AWS API * Documentation */ @Override public GetSamplingTargetsResult getSamplingTargets(GetSamplingTargetsRequest request) { request = beforeClientExecution(request); return executeGetSamplingTargets(request); } @SdkInternalApi final GetSamplingTargetsResult executeGetSamplingTargets(GetSamplingTargetsRequest getSamplingTargetsRequest) { ExecutionContext executionContext = createExecutionContext(getSamplingTargetsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSamplingTargetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getSamplingTargetsRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSamplingTargets"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetSamplingTargetsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a document that describes services that process incoming requests, and downstream services that they * call as a result. Root services process incoming requests and make calls to downstream services. Root services * are applications that use the AWS X-Ray SDK. Downstream * services can be other applications, AWS resources, HTTP web APIs, or SQL databases. *

* * @param getServiceGraphRequest * @return Result of the GetServiceGraph operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetServiceGraph * @see AWS API * Documentation */ @Override public GetServiceGraphResult getServiceGraph(GetServiceGraphRequest request) { request = beforeClientExecution(request); return executeGetServiceGraph(request); } @SdkInternalApi final GetServiceGraphResult executeGetServiceGraph(GetServiceGraphRequest getServiceGraphRequest) { ExecutionContext executionContext = createExecutionContext(getServiceGraphRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetServiceGraphRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getServiceGraphRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetServiceGraph"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetServiceGraphResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get an aggregation of service statistics defined by a specific time range. *

* * @param getTimeSeriesServiceStatisticsRequest * @return Result of the GetTimeSeriesServiceStatistics operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetTimeSeriesServiceStatistics * @see AWS API Documentation */ @Override public GetTimeSeriesServiceStatisticsResult getTimeSeriesServiceStatistics(GetTimeSeriesServiceStatisticsRequest request) { request = beforeClientExecution(request); return executeGetTimeSeriesServiceStatistics(request); } @SdkInternalApi final GetTimeSeriesServiceStatisticsResult executeGetTimeSeriesServiceStatistics(GetTimeSeriesServiceStatisticsRequest getTimeSeriesServiceStatisticsRequest) { ExecutionContext executionContext = createExecutionContext(getTimeSeriesServiceStatisticsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetTimeSeriesServiceStatisticsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getTimeSeriesServiceStatisticsRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTimeSeriesServiceStatistics"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTimeSeriesServiceStatisticsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a service graph for one or more specific trace IDs. *

* * @param getTraceGraphRequest * @return Result of the GetTraceGraph operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetTraceGraph * @see AWS API * Documentation */ @Override public GetTraceGraphResult getTraceGraph(GetTraceGraphRequest request) { request = beforeClientExecution(request); return executeGetTraceGraph(request); } @SdkInternalApi final GetTraceGraphResult executeGetTraceGraph(GetTraceGraphRequest getTraceGraphRequest) { ExecutionContext executionContext = createExecutionContext(getTraceGraphRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetTraceGraphRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTraceGraphRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTraceGraph"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTraceGraphResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves IDs and annotations for traces available for a specified time frame using an optional filter. To get * the full traces, pass the trace IDs to BatchGetTraces. *

*

* A filter expression can target traced requests that hit specific service nodes or edges, have errors, or come * from a known user. For example, the following filter expression targets traces that pass through * api.example.com: *

*

* service("api.example.com") *

*

* This filter expression finds traces that have an annotation named account with the value * 12345: *

*

* annotation.account = "12345" *

*

* For a full list of indexed fields and keywords that you can use in filter expressions, see Using Filter Expressions in * the AWS X-Ray Developer Guide. *

* * @param getTraceSummariesRequest * @return Result of the GetTraceSummaries operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.GetTraceSummaries * @see AWS API * Documentation */ @Override public GetTraceSummariesResult getTraceSummaries(GetTraceSummariesRequest request) { request = beforeClientExecution(request); return executeGetTraceSummaries(request); } @SdkInternalApi final GetTraceSummariesResult executeGetTraceSummaries(GetTraceSummariesRequest getTraceSummariesRequest) { ExecutionContext executionContext = createExecutionContext(getTraceSummariesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetTraceSummariesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getTraceSummariesRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTraceSummaries"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTraceSummariesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of tags that are applied to the specified AWS X-Ray group or sampling rule. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @throws ResourceNotFoundException * The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is * correct. * @sample AWSXRay.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, "XRay"); 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); } } /** *

* Updates the encryption configuration for X-Ray data. *

* * @param putEncryptionConfigRequest * @return Result of the PutEncryptionConfig operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.PutEncryptionConfig * @see AWS API * Documentation */ @Override public PutEncryptionConfigResult putEncryptionConfig(PutEncryptionConfigRequest request) { request = beforeClientExecution(request); return executePutEncryptionConfig(request); } @SdkInternalApi final PutEncryptionConfigResult executePutEncryptionConfig(PutEncryptionConfigRequest putEncryptionConfigRequest) { ExecutionContext executionContext = createExecutionContext(putEncryptionConfigRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutEncryptionConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putEncryptionConfigRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutEncryptionConfig"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutEncryptionConfigResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Used by the AWS X-Ray daemon to upload telemetry. *

* * @param putTelemetryRecordsRequest * @return Result of the PutTelemetryRecords operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.PutTelemetryRecords * @see AWS API * Documentation */ @Override public PutTelemetryRecordsResult putTelemetryRecords(PutTelemetryRecordsRequest request) { request = beforeClientExecution(request); return executePutTelemetryRecords(request); } @SdkInternalApi final PutTelemetryRecordsResult executePutTelemetryRecords(PutTelemetryRecordsRequest putTelemetryRecordsRequest) { ExecutionContext executionContext = createExecutionContext(putTelemetryRecordsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutTelemetryRecordsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putTelemetryRecordsRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutTelemetryRecords"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutTelemetryRecordsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Uploads segment documents to AWS X-Ray. The X-Ray SDK * generates segment documents and sends them to the X-Ray daemon, which uploads them in batches. A segment document * can be a completed segment, an in-progress segment, or an array of subsegments. *

*

* Segments must include the following fields. For the full segment document schema, see AWS X-Ray Segment * Documents in the AWS X-Ray Developer Guide. *

*

* Required segment document fields *

*
    *
  • *

    * name - The name of the service that handled the request. *

    *
  • *
  • *

    * id - A 64-bit identifier for the segment, unique among segments in the same trace, in 16 hexadecimal * digits. *

    *
  • *
  • *

    * trace_id - A unique identifier that connects all segments and subsegments originating from a single * client request. *

    *
  • *
  • *

    * start_time - Time the segment or subsegment was created, in floating point seconds in epoch time, * accurate to milliseconds. For example, 1480615200.010 or 1.480615200010E9. *

    *
  • *
  • *

    * end_time - Time the segment or subsegment was closed. For example, 1480615200.090 or * 1.480615200090E9. Specify either an end_time or in_progress. *

    *
  • *
  • *

    * in_progress - Set to true instead of specifying an end_time to record that * a segment has been started, but is not complete. Send an in-progress segment when your application receives a * request that will take a long time to serve, to trace that the request was received. When the response is sent, * send the complete segment to overwrite the in-progress segment. *

    *
  • *
*

* A trace_id consists of three numbers separated by hyphens. For example, * 1-58406520-a006649127e371903a2de979. This includes: *

*

* Trace ID Format *

*
    *
  • *

    * The version number, for instance, 1. *

    *
  • *
  • *

    * The time of the original request, in Unix epoch time, in 8 hexadecimal digits. For example, 10:00AM December 2nd, * 2016 PST in epoch time is 1480615200 seconds, or 58406520 in hexadecimal. *

    *
  • *
  • *

    * A 96-bit identifier for the trace, globally unique, in 24 hexadecimal digits. *

    *
  • *
* * @param putTraceSegmentsRequest * @return Result of the PutTraceSegments operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.PutTraceSegments * @see AWS API * Documentation */ @Override public PutTraceSegmentsResult putTraceSegments(PutTraceSegmentsRequest request) { request = beforeClientExecution(request); return executePutTraceSegments(request); } @SdkInternalApi final PutTraceSegmentsResult executePutTraceSegments(PutTraceSegmentsRequest putTraceSegmentsRequest) { ExecutionContext executionContext = createExecutionContext(putTraceSegmentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutTraceSegmentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putTraceSegmentsRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutTraceSegments"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutTraceSegmentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Applies tags to an existing AWS X-Ray group or sampling rule. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @throws ResourceNotFoundException * The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is * correct. * @throws TooManyTagsException * You have exceeded the maximum number of tags you can apply to this resource. * @sample AWSXRay.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, "XRay"); 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); } } /** *

* Removes tags from an AWS X-Ray group or sampling rule. You cannot edit or delete system tags (those with an * aws: prefix). *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @throws ResourceNotFoundException * The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is * correct. * @sample AWSXRay.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, "XRay"); 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); } } /** *

* Updates a group resource. *

* * @param updateGroupRequest * @return Result of the UpdateGroup operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.UpdateGroup * @see AWS API * Documentation */ @Override public UpdateGroupResult updateGroup(UpdateGroupRequest request) { request = beforeClientExecution(request); return executeUpdateGroup(request); } @SdkInternalApi final UpdateGroupResult executeUpdateGroup(UpdateGroupRequest updateGroupRequest) { ExecutionContext executionContext = createExecutionContext(updateGroupRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateGroupRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateGroupRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateGroup"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateGroupResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Modifies a sampling rule's configuration. *

* * @param updateSamplingRuleRequest * @return Result of the UpdateSamplingRule operation returned by the service. * @throws InvalidRequestException * The request is missing required parameters or has invalid parameters. * @throws ThrottledException * The request exceeds the maximum number of requests per second. * @sample AWSXRay.UpdateSamplingRule * @see AWS API * Documentation */ @Override public UpdateSamplingRuleResult updateSamplingRule(UpdateSamplingRuleRequest request) { request = beforeClientExecution(request); return executeUpdateSamplingRule(request); } @SdkInternalApi final UpdateSamplingRuleResult executeUpdateSamplingRule(UpdateSamplingRuleRequest updateSamplingRuleRequest) { ExecutionContext executionContext = createExecutionContext(updateSamplingRuleRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateSamplingRuleRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateSamplingRuleRequest)); // 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, "XRay"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateSamplingRule"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateSamplingRuleResultJsonUnmarshaller()); 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