/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.prometheus; 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.prometheus.AmazonPrometheusClientBuilder; import com.amazonaws.services.prometheus.waiters.AmazonPrometheusWaiters; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.prometheus.model.*; import com.amazonaws.services.prometheus.model.transform.*; /** * Client for accessing Amazon Prometheus Service. All service calls made using this client are blocking, and will not * return until the service call completes. *
*
* Amazon Managed Service for Prometheus *
*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonPrometheusClient extends AmazonWebServiceClient implements AmazonPrometheus { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonPrometheus.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "aps"; private volatile AmazonPrometheusWaiters waiters; /** 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("AccessDeniedException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.AccessDeniedExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalServerException").withExceptionUnmarshaller( com.amazonaws.services.prometheus.model.transform.InternalServerExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.prometheus.model.AmazonPrometheusException.class)); public static AmazonPrometheusClientBuilder builder() { return AmazonPrometheusClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon Prometheus Service using the specified parameters. * ** All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonPrometheusClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon Prometheus Service using the specified parameters. * *
* All service calls made using this new client object are blocking, and will not return until the service call * completes. * * @param clientParams * Object providing client parameters. */ AmazonPrometheusClient(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("aps.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/prometheus/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/prometheus/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *
* Create an alert manager definition. *
* * @param createAlertManagerDefinitionRequest * Represents the input of a CreateAlertManagerDefinition operation. * @return Result of the CreateAlertManagerDefinition operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @sample AmazonPrometheus.CreateAlertManagerDefinition * @see AWS API Documentation */ @Override public CreateAlertManagerDefinitionResult createAlertManagerDefinition(CreateAlertManagerDefinitionRequest request) { request = beforeClientExecution(request); return executeCreateAlertManagerDefinition(request); } @SdkInternalApi final CreateAlertManagerDefinitionResult executeCreateAlertManagerDefinition(CreateAlertManagerDefinitionRequest createAlertManagerDefinitionRequest) { ExecutionContext executionContext = createExecutionContext(createAlertManagerDefinitionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Create logging configuration. *
* * @param createLoggingConfigurationRequest * Represents the input of a CreateLoggingConfiguration operation. * @return Result of the CreateLoggingConfiguration operation returned by the service. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.CreateLoggingConfiguration * @see AWS * API Documentation */ @Override public CreateLoggingConfigurationResult createLoggingConfiguration(CreateLoggingConfigurationRequest request) { request = beforeClientExecution(request); return executeCreateLoggingConfiguration(request); } @SdkInternalApi final CreateLoggingConfigurationResult executeCreateLoggingConfiguration(CreateLoggingConfigurationRequest createLoggingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(createLoggingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Create a rule group namespace. *
* * @param createRuleGroupsNamespaceRequest * Represents the input of a CreateRuleGroupsNamespace operation. * @return Result of the CreateRuleGroupsNamespace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @sample AmazonPrometheus.CreateRuleGroupsNamespace * @see AWS * API Documentation */ @Override public CreateRuleGroupsNamespaceResult createRuleGroupsNamespace(CreateRuleGroupsNamespaceRequest request) { request = beforeClientExecution(request); return executeCreateRuleGroupsNamespace(request); } @SdkInternalApi final CreateRuleGroupsNamespaceResult executeCreateRuleGroupsNamespace(CreateRuleGroupsNamespaceRequest createRuleGroupsNamespaceRequest) { ExecutionContext executionContext = createExecutionContext(createRuleGroupsNamespaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates a new AMP workspace. *
* * @param createWorkspaceRequest * Represents the input of a CreateWorkspace operation. * @return Result of the CreateWorkspace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @sample AmazonPrometheus.CreateWorkspace * @see AWS API * Documentation */ @Override public CreateWorkspaceResult createWorkspace(CreateWorkspaceRequest request) { request = beforeClientExecution(request); return executeCreateWorkspace(request); } @SdkInternalApi final CreateWorkspaceResult executeCreateWorkspace(CreateWorkspaceRequest createWorkspaceRequest) { ExecutionContext executionContext = createExecutionContext(createWorkspaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes an alert manager definition. *
* * @param deleteAlertManagerDefinitionRequest * Represents the input of a DeleteAlertManagerDefinition operation. * @return Result of the DeleteAlertManagerDefinition operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DeleteAlertManagerDefinition * @see AWS API Documentation */ @Override public DeleteAlertManagerDefinitionResult deleteAlertManagerDefinition(DeleteAlertManagerDefinitionRequest request) { request = beforeClientExecution(request); return executeDeleteAlertManagerDefinition(request); } @SdkInternalApi final DeleteAlertManagerDefinitionResult executeDeleteAlertManagerDefinition(DeleteAlertManagerDefinitionRequest deleteAlertManagerDefinitionRequest) { ExecutionContext executionContext = createExecutionContext(deleteAlertManagerDefinitionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Delete logging configuration. *
* * @param deleteLoggingConfigurationRequest * Represents the input of a DeleteLoggingConfiguration operation. * @return Result of the DeleteLoggingConfiguration operation returned by the service. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DeleteLoggingConfiguration * @see AWS * API Documentation */ @Override public DeleteLoggingConfigurationResult deleteLoggingConfiguration(DeleteLoggingConfigurationRequest request) { request = beforeClientExecution(request); return executeDeleteLoggingConfiguration(request); } @SdkInternalApi final DeleteLoggingConfigurationResult executeDeleteLoggingConfiguration(DeleteLoggingConfigurationRequest deleteLoggingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(deleteLoggingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Delete a rule groups namespace. *
* * @param deleteRuleGroupsNamespaceRequest * Represents the input of a DeleteRuleGroupsNamespace operation. * @return Result of the DeleteRuleGroupsNamespace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DeleteRuleGroupsNamespace * @see AWS * API Documentation */ @Override public DeleteRuleGroupsNamespaceResult deleteRuleGroupsNamespace(DeleteRuleGroupsNamespaceRequest request) { request = beforeClientExecution(request); return executeDeleteRuleGroupsNamespace(request); } @SdkInternalApi final DeleteRuleGroupsNamespaceResult executeDeleteRuleGroupsNamespace(DeleteRuleGroupsNamespaceRequest deleteRuleGroupsNamespaceRequest) { ExecutionContext executionContext = createExecutionContext(deleteRuleGroupsNamespaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Deletes an AMP workspace. *
* * @param deleteWorkspaceRequest * Represents the input of a DeleteWorkspace operation. * @return Result of the DeleteWorkspace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DeleteWorkspace * @see AWS API * Documentation */ @Override public DeleteWorkspaceResult deleteWorkspace(DeleteWorkspaceRequest request) { request = beforeClientExecution(request); return executeDeleteWorkspace(request); } @SdkInternalApi final DeleteWorkspaceResult executeDeleteWorkspace(DeleteWorkspaceRequest deleteWorkspaceRequest) { ExecutionContext executionContext = createExecutionContext(deleteWorkspaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Describes an alert manager definition. *
* * @param describeAlertManagerDefinitionRequest * Represents the input of a DescribeAlertManagerDefinition operation. * @return Result of the DescribeAlertManagerDefinition operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DescribeAlertManagerDefinition * @see AWS API Documentation */ @Override public DescribeAlertManagerDefinitionResult describeAlertManagerDefinition(DescribeAlertManagerDefinitionRequest request) { request = beforeClientExecution(request); return executeDescribeAlertManagerDefinition(request); } @SdkInternalApi final DescribeAlertManagerDefinitionResult executeDescribeAlertManagerDefinition(DescribeAlertManagerDefinitionRequest describeAlertManagerDefinitionRequest) { ExecutionContext executionContext = createExecutionContext(describeAlertManagerDefinitionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Describes logging configuration. *
* * @param describeLoggingConfigurationRequest * Represents the input of a DescribeLoggingConfiguration operation. * @return Result of the DescribeLoggingConfiguration operation returned by the service. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DescribeLoggingConfiguration * @see AWS API Documentation */ @Override public DescribeLoggingConfigurationResult describeLoggingConfiguration(DescribeLoggingConfigurationRequest request) { request = beforeClientExecution(request); return executeDescribeLoggingConfiguration(request); } @SdkInternalApi final DescribeLoggingConfigurationResult executeDescribeLoggingConfiguration(DescribeLoggingConfigurationRequest describeLoggingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(describeLoggingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Describe a rule groups namespace. *
* * @param describeRuleGroupsNamespaceRequest * Represents the input of a DescribeRuleGroupsNamespace operation. * @return Result of the DescribeRuleGroupsNamespace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DescribeRuleGroupsNamespace * @see AWS API Documentation */ @Override public DescribeRuleGroupsNamespaceResult describeRuleGroupsNamespace(DescribeRuleGroupsNamespaceRequest request) { request = beforeClientExecution(request); return executeDescribeRuleGroupsNamespace(request); } @SdkInternalApi final DescribeRuleGroupsNamespaceResult executeDescribeRuleGroupsNamespace(DescribeRuleGroupsNamespaceRequest describeRuleGroupsNamespaceRequest) { ExecutionContext executionContext = createExecutionContext(describeRuleGroupsNamespaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Describes an existing AMP workspace. *
* * @param describeWorkspaceRequest * Represents the input of a DescribeWorkspace operation. * @return Result of the DescribeWorkspace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.DescribeWorkspace * @see AWS API * Documentation */ @Override public DescribeWorkspaceResult describeWorkspace(DescribeWorkspaceRequest request) { request = beforeClientExecution(request); return executeDescribeWorkspace(request); } @SdkInternalApi final DescribeWorkspaceResult executeDescribeWorkspace(DescribeWorkspaceRequest describeWorkspaceRequest) { ExecutionContext executionContext = createExecutionContext(describeWorkspaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists rule groups namespaces. *
* * @param listRuleGroupsNamespacesRequest * Represents the input of a ListRuleGroupsNamespaces operation. * @return Result of the ListRuleGroupsNamespaces operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.ListRuleGroupsNamespaces * @see AWS * API Documentation */ @Override public ListRuleGroupsNamespacesResult listRuleGroupsNamespaces(ListRuleGroupsNamespacesRequest request) { request = beforeClientExecution(request); return executeListRuleGroupsNamespaces(request); } @SdkInternalApi final ListRuleGroupsNamespacesResult executeListRuleGroupsNamespaces(ListRuleGroupsNamespacesRequest listRuleGroupsNamespacesRequest) { ExecutionContext executionContext = createExecutionContext(listRuleGroupsNamespacesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Lists the tags you have assigned to the resource. *
* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.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* Lists all AMP workspaces, including workspaces being created or deleted. *
* * @param listWorkspacesRequest * Represents the input of a ListWorkspaces operation. * @return Result of the ListWorkspaces operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.ListWorkspaces * @see AWS API * Documentation */ @Override public ListWorkspacesResult listWorkspaces(ListWorkspacesRequest request) { request = beforeClientExecution(request); return executeListWorkspaces(request); } @SdkInternalApi final ListWorkspacesResult executeListWorkspaces(ListWorkspacesRequest listWorkspacesRequest) { ExecutionContext executionContext = createExecutionContext(listWorkspacesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Update an alert manager definition. *
* * @param putAlertManagerDefinitionRequest * Represents the input of a PutAlertManagerDefinition operation. * @return Result of the PutAlertManagerDefinition operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @sample AmazonPrometheus.PutAlertManagerDefinition * @see AWS * API Documentation */ @Override public PutAlertManagerDefinitionResult putAlertManagerDefinition(PutAlertManagerDefinitionRequest request) { request = beforeClientExecution(request); return executePutAlertManagerDefinition(request); } @SdkInternalApi final PutAlertManagerDefinitionResult executePutAlertManagerDefinition(PutAlertManagerDefinitionRequest putAlertManagerDefinitionRequest) { ExecutionContext executionContext = createExecutionContext(putAlertManagerDefinitionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Update a rule groups namespace. *
* * @param putRuleGroupsNamespaceRequest * Represents the input of a PutRuleGroupsNamespace operation. * @return Result of the PutRuleGroupsNamespace operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @sample AmazonPrometheus.PutRuleGroupsNamespace * @see AWS API * Documentation */ @Override public PutRuleGroupsNamespaceResult putRuleGroupsNamespace(PutRuleGroupsNamespaceRequest request) { request = beforeClientExecution(request); return executePutRuleGroupsNamespace(request); } @SdkInternalApi final PutRuleGroupsNamespaceResult executePutRuleGroupsNamespace(PutRuleGroupsNamespaceRequest putRuleGroupsNamespaceRequest) { ExecutionContext executionContext = createExecutionContext(putRuleGroupsNamespaceRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Creates tags for the specified resource. *
* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.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* Deletes tags from the specified resource. *
* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.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* Update logging configuration. *
* * @param updateLoggingConfigurationRequest * Represents the input of an UpdateLoggingConfiguration operation. * @return Result of the UpdateLoggingConfiguration operation returned by the service. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @sample AmazonPrometheus.UpdateLoggingConfiguration * @see AWS * API Documentation */ @Override public UpdateLoggingConfigurationResult updateLoggingConfiguration(UpdateLoggingConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateLoggingConfiguration(request); } @SdkInternalApi final UpdateLoggingConfigurationResult executeUpdateLoggingConfiguration(UpdateLoggingConfigurationRequest updateLoggingConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(updateLoggingConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request* Updates an AMP workspace alias. *
* * @param updateWorkspaceAliasRequest * Represents the input of an UpdateWorkspaceAlias operation. * @return Result of the UpdateWorkspaceAlias operation returned by the service. * @throws ThrottlingException * Request was denied due to request throttling. * @throws ConflictException * Updating or deleting a resource can cause an inconsistent state. * @throws ValidationException * The input fails to satisfy the constraints specified by an AWS service. * @throws ResourceNotFoundException * Request references a resource which does not exist. * @throws AccessDeniedException * User does not have sufficient access to perform this action. * @throws InternalServerException * Unexpected error during processing of request. * @throws ServiceQuotaExceededException * Request would cause a service quota to be exceeded. * @sample AmazonPrometheus.UpdateWorkspaceAlias * @see AWS API * Documentation */ @Override public UpdateWorkspaceAliasResult updateWorkspaceAlias(UpdateWorkspaceAliasRequest request) { request = beforeClientExecution(request); return executeUpdateWorkspaceAlias(request); } @SdkInternalApi final UpdateWorkspaceAliasResult executeUpdateWorkspaceAlias(UpdateWorkspaceAliasRequest updateWorkspaceAliasRequest) { ExecutionContext executionContext = createExecutionContext(updateWorkspaceAliasRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request
* 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