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

com.amazonaws.services.pipes.AmazonPipesClient Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EventBridge Pipes module holds the client classes that are used for communicating with Amazon EventBridge Pipes Service

The newest version!
/*
 * Copyright 2019-2024 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.pipes;

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.pipes.AmazonPipesClientBuilder;

import com.amazonaws.AmazonServiceException;

import com.amazonaws.services.pipes.model.*;

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

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

*

* Amazon EventBridge Pipes connects event sources to targets. Pipes reduces the need for specialized knowledge and * integration code when developing event driven architectures. This helps ensures consistency across your company’s * applications. With Pipes, the target can be any available EventBridge target. To set up a pipe, you select the event * source, add optional event filtering, define optional enrichment, and select the target for the event data. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AmazonPipesClient extends AmazonWebServiceClient implements AmazonPipes { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AmazonPipes.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "pipes"; /** Client configuration factory providing ClientConfigurations tailored to this client */ protected static final ClientConfigurationFactory configFactory = new ClientConfigurationFactory(); private final AdvancedConfig advancedConfig; private static final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory = new com.amazonaws.protocol.json.SdkJsonProtocolFactory( new JsonClientMetadata() .withProtocolVersion("1.1") .withSupportsCbor(false) .withSupportsIon(false) .withContentTypeOverride("application/json") .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ThrottlingException").withExceptionUnmarshaller( com.amazonaws.services.pipes.model.transform.ThrottlingExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("NotFoundException").withExceptionUnmarshaller( com.amazonaws.services.pipes.model.transform.NotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.pipes.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ConflictException").withExceptionUnmarshaller( com.amazonaws.services.pipes.model.transform.ConflictExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ValidationException").withExceptionUnmarshaller( com.amazonaws.services.pipes.model.transform.ValidationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InternalException").withExceptionUnmarshaller( com.amazonaws.services.pipes.model.transform.InternalExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.pipes.model.AmazonPipesException.class)); public static AmazonPipesClientBuilder builder() { return AmazonPipesClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on Amazon EventBridge Pipes 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. */ AmazonPipesClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on Amazon EventBridge Pipes 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. */ AmazonPipesClient(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("pipes.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/pipes/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/pipes/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* Create a pipe. Amazon EventBridge Pipes connect event sources to targets and reduces the need for specialized * knowledge and integration code. *

* * @param createPipeRequest * @return Result of the CreatePipe operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @throws NotFoundException * An entity that you specified does not exist. * @throws ConflictException * An action you attempted resulted in an exception. * @throws ServiceQuotaExceededException * A quota has been exceeded. * @sample AmazonPipes.CreatePipe * @see AWS API * Documentation */ @Override public CreatePipeResult createPipe(CreatePipeRequest request) { request = beforeClientExecution(request); return executeCreatePipe(request); } @SdkInternalApi final CreatePipeResult executeCreatePipe(CreatePipeRequest createPipeRequest) { ExecutionContext executionContext = createExecutionContext(createPipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreatePipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPipeRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Delete an existing pipe. For more information about pipes, see Amazon EventBridge Pipes in the * Amazon EventBridge User Guide. *

* * @param deletePipeRequest * @return Result of the DeletePipe operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @throws NotFoundException * An entity that you specified does not exist. * @throws ConflictException * An action you attempted resulted in an exception. * @sample AmazonPipes.DeletePipe * @see AWS API * Documentation */ @Override public DeletePipeResult deletePipe(DeletePipeRequest request) { request = beforeClientExecution(request); return executeDeletePipe(request); } @SdkInternalApi final DeletePipeResult executeDeletePipe(DeletePipeRequest deletePipeRequest) { ExecutionContext executionContext = createExecutionContext(deletePipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeletePipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePipeRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get the information about an existing pipe. For more information about pipes, see Amazon EventBridge Pipes in the * Amazon EventBridge User Guide. *

* * @param describePipeRequest * @return Result of the DescribePipe operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @throws NotFoundException * An entity that you specified does not exist. * @sample AmazonPipes.DescribePipe * @see AWS API * Documentation */ @Override public DescribePipeResult describePipe(DescribePipeRequest request) { request = beforeClientExecution(request); return executeDescribePipe(request); } @SdkInternalApi final DescribePipeResult executeDescribePipe(DescribePipeRequest describePipeRequest) { ExecutionContext executionContext = createExecutionContext(describePipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DescribePipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describePipeRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribePipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribePipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Get the pipes associated with this account. For more information about pipes, see Amazon EventBridge Pipes in the * Amazon EventBridge User Guide. *

* * @param listPipesRequest * @return Result of the ListPipes operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @sample AmazonPipes.ListPipes * @see AWS API * Documentation */ @Override public ListPipesResult listPipes(ListPipesRequest request) { request = beforeClientExecution(request); return executeListPipes(request); } @SdkInternalApi final ListPipesResult executeListPipes(ListPipesRequest listPipesRequest) { ExecutionContext executionContext = createExecutionContext(listPipesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListPipesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPipesRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPipes"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPipesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Displays the tags associated with a pipe. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws NotFoundException * An entity that you specified does not exist. * @sample AmazonPipes.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, "Pipes"); 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); } } /** *

* Start an existing pipe. *

* * @param startPipeRequest * @return Result of the StartPipe operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @throws NotFoundException * An entity that you specified does not exist. * @throws ConflictException * An action you attempted resulted in an exception. * @sample AmazonPipes.StartPipe * @see AWS API * Documentation */ @Override public StartPipeResult startPipe(StartPipeRequest request) { request = beforeClientExecution(request); return executeStartPipe(request); } @SdkInternalApi final StartPipeResult executeStartPipe(StartPipeRequest startPipeRequest) { ExecutionContext executionContext = createExecutionContext(startPipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartPipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startPipeRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartPipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartPipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stop an existing pipe. *

* * @param stopPipeRequest * @return Result of the StopPipe operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @throws NotFoundException * An entity that you specified does not exist. * @throws ConflictException * An action you attempted resulted in an exception. * @sample AmazonPipes.StopPipe * @see AWS API * Documentation */ @Override public StopPipeResult stopPipe(StopPipeRequest request) { request = beforeClientExecution(request); return executeStopPipe(request); } @SdkInternalApi final StopPipeResult executeStopPipe(StopPipeRequest stopPipeRequest) { ExecutionContext executionContext = createExecutionContext(stopPipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopPipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopPipeRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopPipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopPipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Assigns one or more tags (key-value pairs) to the specified pipe. Tags can help you organize and categorize your * resources. You can also use them to scope user permissions by granting a user permission to access or change only * resources with certain tag values. *

*

* Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of * characters. *

*

* You can use the TagResource action with a pipe that already has tags. If you specify a new tag key, * this tag is appended to the list of tags associated with the pipe. If you specify a tag key that is already * associated with the pipe, the new tag value that you specify replaces the previous value for that tag. *

*

* You can associate as many as 50 tags with a pipe. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws NotFoundException * An entity that you specified does not exist. * @sample AmazonPipes.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, "Pipes"); 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 one or more tags from the specified pipes. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws NotFoundException * An entity that you specified does not exist. * @sample AmazonPipes.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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UntagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UntagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Update an existing pipe. When you call UpdatePipe, EventBridge only the updates fields you have * specified in the request; the rest remain unchanged. The exception to this is if you modify any Amazon Web * Services-service specific fields in the SourceParameters, EnrichmentParameters, or * TargetParameters objects. For example, DynamoDBStreamParameters or * EventBridgeEventBusParameters. EventBridge updates the fields in these objects atomically as one and * overrides existing values. This is by design, and means that if you don't specify an optional field in one of * these Parameters objects, EventBridge sets that field to its system-default value during the update. *

*

* For more information about pipes, see Amazon EventBridge Pipes in * the Amazon EventBridge User Guide. *

* * @param updatePipeRequest * @return Result of the UpdatePipe operation returned by the service. * @throws InternalException * This exception occurs due to unexpected causes. * @throws ValidationException * Indicates that an error has occurred while performing a validate operation. * @throws ThrottlingException * An action was throttled. * @throws NotFoundException * An entity that you specified does not exist. * @throws ConflictException * An action you attempted resulted in an exception. * @sample AmazonPipes.UpdatePipe * @see AWS API * Documentation */ @Override public UpdatePipeResult updatePipe(UpdatePipeRequest request) { request = beforeClientExecution(request); return executeUpdatePipe(request); } @SdkInternalApi final UpdatePipeResult executeUpdatePipe(UpdatePipeRequest updatePipeRequest) { ExecutionContext executionContext = createExecutionContext(updatePipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdatePipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updatePipeRequest)); // 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, "Pipes"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdatePipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdatePipeResultJsonUnmarshaller()); 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