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

com.amazonaws.services.imagebuilder.AWSimagebuilderClient Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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.imagebuilder;

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.imagebuilder.AWSimagebuilderClientBuilder;

import com.amazonaws.AmazonServiceException;

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

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

*

* EC2 Image Builder is a fully managed Amazon Web Services service that makes it easier to automate the creation, * management, and deployment of customized, secure, and up-to-date "golden" server images that are pre-installed and * pre-configured with software and settings to meet specific IT standards. *

*/ @ThreadSafe @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AWSimagebuilderClient extends AmazonWebServiceClient implements AWSimagebuilder { /** Provider for AWS credentials. */ private final AWSCredentialsProvider awsCredentialsProvider; private static final Log log = LogFactory.getLog(AWSimagebuilder.class); /** Default signing name for the service. */ private static final String DEFAULT_SIGNING_NAME = "imagebuilder"; /** 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("InvalidParameterException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.InvalidParameterExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterValueException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.InvalidParameterValueExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceInUseException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ResourceInUseExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidRequestException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.InvalidRequestExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ServiceExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceQuotaExceededException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ServiceQuotaExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("CallRateLimitExceededException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.CallRateLimitExceededExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ResourceNotFoundExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidVersionNumberException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.InvalidVersionNumberExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ClientException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ClientExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("IdempotentParameterMismatchException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.IdempotentParameterMismatchExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidParameterCombinationException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.InvalidParameterCombinationExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ServiceUnavailableException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ServiceUnavailableExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ForbiddenException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ForbiddenExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceDependencyException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ResourceDependencyExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.ResourceAlreadyExistsExceptionUnmarshaller.getInstance())) .addErrorMetadata( new JsonErrorShapeMetadata().withErrorCode("InvalidPaginationTokenException").withExceptionUnmarshaller( com.amazonaws.services.imagebuilder.model.transform.InvalidPaginationTokenExceptionUnmarshaller.getInstance())) .withBaseServiceExceptionClass(com.amazonaws.services.imagebuilder.model.AWSimagebuilderException.class)); public static AWSimagebuilderClientBuilder builder() { return AWSimagebuilderClientBuilder.standard(); } /** * Constructs a new client to invoke service methods on imagebuilder 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. */ AWSimagebuilderClient(AwsSyncClientParams clientParams) { this(clientParams, false); } /** * Constructs a new client to invoke service methods on imagebuilder 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. */ AWSimagebuilderClient(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("imagebuilder.us-east-1.amazonaws.com"); HandlerChainFactory chainFactory = new HandlerChainFactory(); requestHandler2s.addAll(chainFactory.newRequestHandlerChain("/com/amazonaws/services/imagebuilder/request.handlers")); requestHandler2s.addAll(chainFactory.newRequestHandler2Chain("/com/amazonaws/services/imagebuilder/request.handler2s")); requestHandler2s.addAll(chainFactory.getGlobalHandlers()); } /** *

* CancelImageCreation cancels the creation of Image. This operation can only be used on images in a non-terminal * state. *

* * @param cancelImageCreationRequest * @return Result of the CancelImageCreation operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @sample AWSimagebuilder.CancelImageCreation * @see AWS API Documentation */ @Override public CancelImageCreationResult cancelImageCreation(CancelImageCreationRequest request) { request = beforeClientExecution(request); return executeCancelImageCreation(request); } @SdkInternalApi final CancelImageCreationResult executeCancelImageCreation(CancelImageCreationRequest cancelImageCreationRequest) { ExecutionContext executionContext = createExecutionContext(cancelImageCreationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CancelImageCreationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(cancelImageCreationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelImageCreation"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelImageCreationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new component that can be used to build, validate, test, and assess your image. *

* * @param createComponentRequest * @return Result of the CreateComponent operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws InvalidVersionNumberException * Your version number is out of bounds or does not follow the required syntax. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws InvalidParameterCombinationException * You have specified two or more mutually exclusive parameters. Review the error message for details. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateComponent * @see AWS * API Documentation */ @Override public CreateComponentResult createComponent(CreateComponentRequest request) { request = beforeClientExecution(request); return executeCreateComponent(request); } @SdkInternalApi final CreateComponentResult executeCreateComponent(CreateComponentRequest createComponentRequest) { ExecutionContext executionContext = createExecutionContext(createComponentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateComponentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createComponentRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateComponent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateComponentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new container recipe. Container recipes define how images are configured, tested, and assessed. *

* * @param createContainerRecipeRequest * @return Result of the CreateContainerRecipe operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws InvalidVersionNumberException * Your version number is out of bounds or does not follow the required syntax. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws ResourceAlreadyExistsException * The resource that you are trying to create already exists. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateContainerRecipe * @see AWS API Documentation */ @Override public CreateContainerRecipeResult createContainerRecipe(CreateContainerRecipeRequest request) { request = beforeClientExecution(request); return executeCreateContainerRecipe(request); } @SdkInternalApi final CreateContainerRecipeResult executeCreateContainerRecipe(CreateContainerRecipeRequest createContainerRecipeRequest) { ExecutionContext executionContext = createExecutionContext(createContainerRecipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateContainerRecipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createContainerRecipeRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateContainerRecipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateContainerRecipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new distribution configuration. Distribution configurations define and configure the outputs of your * pipeline. *

* * @param createDistributionConfigurationRequest * @return Result of the CreateDistributionConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws ResourceAlreadyExistsException * The resource that you are trying to create already exists. * @throws InvalidParameterCombinationException * You have specified two or more mutually exclusive parameters. Review the error message for details. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateDistributionConfiguration * @see AWS API Documentation */ @Override public CreateDistributionConfigurationResult createDistributionConfiguration(CreateDistributionConfigurationRequest request) { request = beforeClientExecution(request); return executeCreateDistributionConfiguration(request); } @SdkInternalApi final CreateDistributionConfigurationResult executeCreateDistributionConfiguration( CreateDistributionConfigurationRequest createDistributionConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(createDistributionConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDistributionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createDistributionConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDistributionConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDistributionConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new image. This request will create a new image along with all of the configured output resources * defined in the distribution configuration. You must specify exactly one recipe for your image, using either a * ContainerRecipeArn or an ImageRecipeArn. *

* * @param createImageRequest * @return Result of the CreateImage operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateImage * @see AWS API * Documentation */ @Override public CreateImageResult createImage(CreateImageRequest request) { request = beforeClientExecution(request); return executeCreateImage(request); } @SdkInternalApi final CreateImageResult executeCreateImage(CreateImageRequest createImageRequest) { ExecutionContext executionContext = createExecutionContext(createImageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateImageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createImageRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateImage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateImageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new image pipeline. Image pipelines enable you to automate the creation and distribution of images. *

* * @param createImagePipelineRequest * @return Result of the CreateImagePipeline operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws ResourceAlreadyExistsException * The resource that you are trying to create already exists. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateImagePipeline * @see AWS API Documentation */ @Override public CreateImagePipelineResult createImagePipeline(CreateImagePipelineRequest request) { request = beforeClientExecution(request); return executeCreateImagePipeline(request); } @SdkInternalApi final CreateImagePipelineResult executeCreateImagePipeline(CreateImagePipelineRequest createImagePipelineRequest) { ExecutionContext executionContext = createExecutionContext(createImagePipelineRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateImagePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createImagePipelineRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateImagePipeline"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateImagePipelineResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new image recipe. Image recipes define how images are configured, tested, and assessed. *

* * @param createImageRecipeRequest * @return Result of the CreateImageRecipe operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws InvalidVersionNumberException * Your version number is out of bounds or does not follow the required syntax. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws ResourceAlreadyExistsException * The resource that you are trying to create already exists. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateImageRecipe * @see AWS * API Documentation */ @Override public CreateImageRecipeResult createImageRecipe(CreateImageRecipeRequest request) { request = beforeClientExecution(request); return executeCreateImageRecipe(request); } @SdkInternalApi final CreateImageRecipeResult executeCreateImageRecipe(CreateImageRecipeRequest createImageRecipeRequest) { ExecutionContext executionContext = createExecutionContext(createImageRecipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateImageRecipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createImageRecipeRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateImageRecipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateImageRecipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your * image will be built and tested. *

* * @param createInfrastructureConfigurationRequest * @return Result of the CreateInfrastructureConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws ResourceAlreadyExistsException * The resource that you are trying to create already exists. * @throws ServiceQuotaExceededException * You have exceeded the number of permitted resources or operations for this service. For service quotas, * see EC2 * Image Builder endpoints and quotas. * @sample AWSimagebuilder.CreateInfrastructureConfiguration * @see AWS API Documentation */ @Override public CreateInfrastructureConfigurationResult createInfrastructureConfiguration(CreateInfrastructureConfigurationRequest request) { request = beforeClientExecution(request); return executeCreateInfrastructureConfiguration(request); } @SdkInternalApi final CreateInfrastructureConfigurationResult executeCreateInfrastructureConfiguration( CreateInfrastructureConfigurationRequest createInfrastructureConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(createInfrastructureConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateInfrastructureConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createInfrastructureConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateInfrastructureConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateInfrastructureConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a component build version. *

* * @param deleteComponentRequest * @return Result of the DeleteComponent operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteComponent * @see AWS * API Documentation */ @Override public DeleteComponentResult deleteComponent(DeleteComponentRequest request) { request = beforeClientExecution(request); return executeDeleteComponent(request); } @SdkInternalApi final DeleteComponentResult executeDeleteComponent(DeleteComponentRequest deleteComponentRequest) { ExecutionContext executionContext = createExecutionContext(deleteComponentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteComponentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteComponentRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteComponent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteComponentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a container recipe. *

* * @param deleteContainerRecipeRequest * @return Result of the DeleteContainerRecipe operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteContainerRecipe * @see AWS API Documentation */ @Override public DeleteContainerRecipeResult deleteContainerRecipe(DeleteContainerRecipeRequest request) { request = beforeClientExecution(request); return executeDeleteContainerRecipe(request); } @SdkInternalApi final DeleteContainerRecipeResult executeDeleteContainerRecipe(DeleteContainerRecipeRequest deleteContainerRecipeRequest) { ExecutionContext executionContext = createExecutionContext(deleteContainerRecipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteContainerRecipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteContainerRecipeRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteContainerRecipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteContainerRecipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a distribution configuration. *

* * @param deleteDistributionConfigurationRequest * @return Result of the DeleteDistributionConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteDistributionConfiguration * @see AWS API Documentation */ @Override public DeleteDistributionConfigurationResult deleteDistributionConfiguration(DeleteDistributionConfigurationRequest request) { request = beforeClientExecution(request); return executeDeleteDistributionConfiguration(request); } @SdkInternalApi final DeleteDistributionConfigurationResult executeDeleteDistributionConfiguration( DeleteDistributionConfigurationRequest deleteDistributionConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(deleteDistributionConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteDistributionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteDistributionConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDistributionConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteDistributionConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images that are * created during the image build process. You must clean those up separately, using the appropriate Amazon EC2 or * Amazon ECR console actions, or API or CLI commands. *

* * * @param deleteImageRequest * @return Result of the DeleteImage operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteImage * @see AWS API * Documentation */ @Override public DeleteImageResult deleteImage(DeleteImageRequest request) { request = beforeClientExecution(request); return executeDeleteImage(request); } @SdkInternalApi final DeleteImageResult executeDeleteImage(DeleteImageRequest deleteImageRequest) { ExecutionContext executionContext = createExecutionContext(deleteImageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteImageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteImageRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteImage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteImageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an image pipeline. *

* * @param deleteImagePipelineRequest * @return Result of the DeleteImagePipeline operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteImagePipeline * @see AWS API Documentation */ @Override public DeleteImagePipelineResult deleteImagePipeline(DeleteImagePipelineRequest request) { request = beforeClientExecution(request); return executeDeleteImagePipeline(request); } @SdkInternalApi final DeleteImagePipelineResult executeDeleteImagePipeline(DeleteImagePipelineRequest deleteImagePipelineRequest) { ExecutionContext executionContext = createExecutionContext(deleteImagePipelineRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteImagePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteImagePipelineRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteImagePipeline"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteImagePipelineResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an image recipe. *

* * @param deleteImageRecipeRequest * @return Result of the DeleteImageRecipe operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteImageRecipe * @see AWS * API Documentation */ @Override public DeleteImageRecipeResult deleteImageRecipe(DeleteImageRecipeRequest request) { request = beforeClientExecution(request); return executeDeleteImageRecipe(request); } @SdkInternalApi final DeleteImageRecipeResult executeDeleteImageRecipe(DeleteImageRecipeRequest deleteImageRecipeRequest) { ExecutionContext executionContext = createExecutionContext(deleteImageRecipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteImageRecipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteImageRecipeRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteImageRecipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteImageRecipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes an infrastructure configuration. *

* * @param deleteInfrastructureConfigurationRequest * @return Result of the DeleteInfrastructureConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceDependencyException * You have attempted to mutate or delete a resource with a dependency that prohibits this action. See the * error message for more details. * @sample AWSimagebuilder.DeleteInfrastructureConfiguration * @see AWS API Documentation */ @Override public DeleteInfrastructureConfigurationResult deleteInfrastructureConfiguration(DeleteInfrastructureConfigurationRequest request) { request = beforeClientExecution(request); return executeDeleteInfrastructureConfiguration(request); } @SdkInternalApi final DeleteInfrastructureConfigurationResult executeDeleteInfrastructureConfiguration( DeleteInfrastructureConfigurationRequest deleteInfrastructureConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(deleteInfrastructureConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteInfrastructureConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteInfrastructureConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteInfrastructureConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteInfrastructureConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a component object. *

* * @param getComponentRequest * @return Result of the GetComponent operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetComponent * @see AWS API * Documentation */ @Override public GetComponentResult getComponent(GetComponentRequest request) { request = beforeClientExecution(request); return executeGetComponent(request); } @SdkInternalApi final GetComponentResult executeGetComponent(GetComponentRequest getComponentRequest) { ExecutionContext executionContext = createExecutionContext(getComponentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetComponentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getComponentRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetComponent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetComponentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a component policy. *

* * @param getComponentPolicyRequest * @return Result of the GetComponentPolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetComponentPolicy * @see AWS API Documentation */ @Override public GetComponentPolicyResult getComponentPolicy(GetComponentPolicyRequest request) { request = beforeClientExecution(request); return executeGetComponentPolicy(request); } @SdkInternalApi final GetComponentPolicyResult executeGetComponentPolicy(GetComponentPolicyRequest getComponentPolicyRequest) { ExecutionContext executionContext = createExecutionContext(getComponentPolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetComponentPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getComponentPolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetComponentPolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetComponentPolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves a container recipe. *

* * @param getContainerRecipeRequest * @return Result of the GetContainerRecipe operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetContainerRecipe * @see AWS API Documentation */ @Override public GetContainerRecipeResult getContainerRecipe(GetContainerRecipeRequest request) { request = beforeClientExecution(request); return executeGetContainerRecipe(request); } @SdkInternalApi final GetContainerRecipeResult executeGetContainerRecipe(GetContainerRecipeRequest getContainerRecipeRequest) { ExecutionContext executionContext = createExecutionContext(getContainerRecipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetContainerRecipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getContainerRecipeRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetContainerRecipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetContainerRecipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Retrieves the policy for a container recipe. *

* * @param getContainerRecipePolicyRequest * @return Result of the GetContainerRecipePolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetContainerRecipePolicy * @see AWS API Documentation */ @Override public GetContainerRecipePolicyResult getContainerRecipePolicy(GetContainerRecipePolicyRequest request) { request = beforeClientExecution(request); return executeGetContainerRecipePolicy(request); } @SdkInternalApi final GetContainerRecipePolicyResult executeGetContainerRecipePolicy(GetContainerRecipePolicyRequest getContainerRecipePolicyRequest) { ExecutionContext executionContext = createExecutionContext(getContainerRecipePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetContainerRecipePolicyRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getContainerRecipePolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetContainerRecipePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetContainerRecipePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a distribution configuration. *

* * @param getDistributionConfigurationRequest * @return Result of the GetDistributionConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetDistributionConfiguration * @see AWS API Documentation */ @Override public GetDistributionConfigurationResult getDistributionConfiguration(GetDistributionConfigurationRequest request) { request = beforeClientExecution(request); return executeGetDistributionConfiguration(request); } @SdkInternalApi final GetDistributionConfigurationResult executeGetDistributionConfiguration(GetDistributionConfigurationRequest getDistributionConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(getDistributionConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetDistributionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getDistributionConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDistributionConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDistributionConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets an image. *

* * @param getImageRequest * @return Result of the GetImage operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetImage * @see AWS API * Documentation */ @Override public GetImageResult getImage(GetImageRequest request) { request = beforeClientExecution(request); return executeGetImage(request); } @SdkInternalApi final GetImageResult executeGetImage(GetImageRequest getImageRequest) { ExecutionContext executionContext = createExecutionContext(getImageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getImageRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetImage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetImageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets an image pipeline. *

* * @param getImagePipelineRequest * @return Result of the GetImagePipeline operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetImagePipeline * @see AWS * API Documentation */ @Override public GetImagePipelineResult getImagePipeline(GetImagePipelineRequest request) { request = beforeClientExecution(request); return executeGetImagePipeline(request); } @SdkInternalApi final GetImagePipelineResult executeGetImagePipeline(GetImagePipelineRequest getImagePipelineRequest) { ExecutionContext executionContext = createExecutionContext(getImagePipelineRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImagePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getImagePipelineRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetImagePipeline"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetImagePipelineResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets an image policy. *

* * @param getImagePolicyRequest * @return Result of the GetImagePolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetImagePolicy * @see AWS * API Documentation */ @Override public GetImagePolicyResult getImagePolicy(GetImagePolicyRequest request) { request = beforeClientExecution(request); return executeGetImagePolicy(request); } @SdkInternalApi final GetImagePolicyResult executeGetImagePolicy(GetImagePolicyRequest getImagePolicyRequest) { ExecutionContext executionContext = createExecutionContext(getImagePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImagePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getImagePolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetImagePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetImagePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets an image recipe. *

* * @param getImageRecipeRequest * @return Result of the GetImageRecipe operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetImageRecipe * @see AWS * API Documentation */ @Override public GetImageRecipeResult getImageRecipe(GetImageRecipeRequest request) { request = beforeClientExecution(request); return executeGetImageRecipe(request); } @SdkInternalApi final GetImageRecipeResult executeGetImageRecipe(GetImageRecipeRequest getImageRecipeRequest) { ExecutionContext executionContext = createExecutionContext(getImageRecipeRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImageRecipeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getImageRecipeRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetImageRecipe"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetImageRecipeResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets an image recipe policy. *

* * @param getImageRecipePolicyRequest * @return Result of the GetImageRecipePolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetImageRecipePolicy * @see AWS API Documentation */ @Override public GetImageRecipePolicyResult getImageRecipePolicy(GetImageRecipePolicyRequest request) { request = beforeClientExecution(request); return executeGetImageRecipePolicy(request); } @SdkInternalApi final GetImageRecipePolicyResult executeGetImageRecipePolicy(GetImageRecipePolicyRequest getImageRecipePolicyRequest) { ExecutionContext executionContext = createExecutionContext(getImageRecipePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetImageRecipePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getImageRecipePolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetImageRecipePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetImageRecipePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets an infrastructure configuration. *

* * @param getInfrastructureConfigurationRequest * GetInfrastructureConfiguration request object. * @return Result of the GetInfrastructureConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.GetInfrastructureConfiguration * @see AWS API Documentation */ @Override public GetInfrastructureConfigurationResult getInfrastructureConfiguration(GetInfrastructureConfigurationRequest request) { request = beforeClientExecution(request); return executeGetInfrastructureConfiguration(request); } @SdkInternalApi final GetInfrastructureConfigurationResult executeGetInfrastructureConfiguration(GetInfrastructureConfigurationRequest getInfrastructureConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(getInfrastructureConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetInfrastructureConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getInfrastructureConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetInfrastructureConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetInfrastructureConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Imports a component and transforms its data into a component document. *

* * @param importComponentRequest * @return Result of the ImportComponent operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws InvalidVersionNumberException * Your version number is out of bounds or does not follow the required syntax. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws InvalidParameterCombinationException * You have specified two or more mutually exclusive parameters. Review the error message for details. * @sample AWSimagebuilder.ImportComponent * @see AWS * API Documentation */ @Override public ImportComponentResult importComponent(ImportComponentRequest request) { request = beforeClientExecution(request); return executeImportComponent(request); } @SdkInternalApi final ImportComponentResult executeImportComponent(ImportComponentRequest importComponentRequest) { ExecutionContext executionContext = createExecutionContext(importComponentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ImportComponentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importComponentRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportComponent"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportComponentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* When you export your virtual machine (VM) from its virtualization environment, that process creates a set of one * or more disk container files that act as snapshots of your VM’s environment, settings, and data. The Amazon EC2 * API ImportImage action * uses those files to import your VM and create an AMI. To import using the CLI command, see import-image *

*

* You can reference the task ID from the VM import to pull in the AMI that the import created as the base image for * your Image Builder recipe. *

* * @param importVmImageRequest * @return Result of the ImportVmImage operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @sample AWSimagebuilder.ImportVmImage * @see AWS API * Documentation */ @Override public ImportVmImageResult importVmImage(ImportVmImageRequest request) { request = beforeClientExecution(request); return executeImportVmImage(request); } @SdkInternalApi final ImportVmImageResult executeImportVmImage(ImportVmImageRequest importVmImageRequest) { ExecutionContext executionContext = createExecutionContext(importVmImageRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ImportVmImageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importVmImageRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportVmImage"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportVmImageResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the list of component build versions for the specified semantic version. *

* *

* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign * values for the first three, and can filter on all of them. *

*

* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most * recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in * any node, all nodes to the right of the first wildcard must also be wildcards. *

*
* * @param listComponentBuildVersionsRequest * @return Result of the ListComponentBuildVersions operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListComponentBuildVersions * @see AWS API Documentation */ @Override public ListComponentBuildVersionsResult listComponentBuildVersions(ListComponentBuildVersionsRequest request) { request = beforeClientExecution(request); return executeListComponentBuildVersions(request); } @SdkInternalApi final ListComponentBuildVersionsResult executeListComponentBuildVersions(ListComponentBuildVersionsRequest listComponentBuildVersionsRequest) { ExecutionContext executionContext = createExecutionContext(listComponentBuildVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListComponentBuildVersionsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listComponentBuildVersionsRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListComponentBuildVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListComponentBuildVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the list of component build versions for the specified semantic version. *

* *

* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign * values for the first three, and can filter on all of them. *

*

* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most * recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in * any node, all nodes to the right of the first wildcard must also be wildcards. *

*
* * @param listComponentsRequest * @return Result of the ListComponents operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListComponents * @see AWS * API Documentation */ @Override public ListComponentsResult listComponents(ListComponentsRequest request) { request = beforeClientExecution(request); return executeListComponents(request); } @SdkInternalApi final ListComponentsResult executeListComponents(ListComponentsRequest listComponentsRequest) { ExecutionContext executionContext = createExecutionContext(listComponentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListComponentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listComponentsRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListComponents"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListComponentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of container recipes. *

* * @param listContainerRecipesRequest * @return Result of the ListContainerRecipes operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListContainerRecipes * @see AWS API Documentation */ @Override public ListContainerRecipesResult listContainerRecipes(ListContainerRecipesRequest request) { request = beforeClientExecution(request); return executeListContainerRecipes(request); } @SdkInternalApi final ListContainerRecipesResult executeListContainerRecipes(ListContainerRecipesRequest listContainerRecipesRequest) { ExecutionContext executionContext = createExecutionContext(listContainerRecipesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListContainerRecipesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listContainerRecipesRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListContainerRecipes"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListContainerRecipesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of distribution configurations. *

* * @param listDistributionConfigurationsRequest * @return Result of the ListDistributionConfigurations operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListDistributionConfigurations * @see AWS API Documentation */ @Override public ListDistributionConfigurationsResult listDistributionConfigurations(ListDistributionConfigurationsRequest request) { request = beforeClientExecution(request); return executeListDistributionConfigurations(request); } @SdkInternalApi final ListDistributionConfigurationsResult executeListDistributionConfigurations(ListDistributionConfigurationsRequest listDistributionConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(listDistributionConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListDistributionConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listDistributionConfigurationsRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDistributionConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDistributionConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of image build versions. *

* * @param listImageBuildVersionsRequest * @return Result of the ListImageBuildVersions operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListImageBuildVersions * @see AWS API Documentation */ @Override public ListImageBuildVersionsResult listImageBuildVersions(ListImageBuildVersionsRequest request) { request = beforeClientExecution(request); return executeListImageBuildVersions(request); } @SdkInternalApi final ListImageBuildVersionsResult executeListImageBuildVersions(ListImageBuildVersionsRequest listImageBuildVersionsRequest) { ExecutionContext executionContext = createExecutionContext(listImageBuildVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImageBuildVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImageBuildVersionsRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImageBuildVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImageBuildVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* List the Packages that are associated with an Image Build Version, as determined by Amazon Web Services Systems * Manager Inventory at build time. *

* * @param listImagePackagesRequest * @return Result of the ListImagePackages operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListImagePackages * @see AWS * API Documentation */ @Override public ListImagePackagesResult listImagePackages(ListImagePackagesRequest request) { request = beforeClientExecution(request); return executeListImagePackages(request); } @SdkInternalApi final ListImagePackagesResult executeListImagePackages(ListImagePackagesRequest listImagePackagesRequest) { ExecutionContext executionContext = createExecutionContext(listImagePackagesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImagePackagesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImagePackagesRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImagePackages"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImagePackagesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of images created by the specified pipeline. *

* * @param listImagePipelineImagesRequest * @return Result of the ListImagePipelineImages operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListImagePipelineImages * @see AWS API Documentation */ @Override public ListImagePipelineImagesResult listImagePipelineImages(ListImagePipelineImagesRequest request) { request = beforeClientExecution(request); return executeListImagePipelineImages(request); } @SdkInternalApi final ListImagePipelineImagesResult executeListImagePipelineImages(ListImagePipelineImagesRequest listImagePipelineImagesRequest) { ExecutionContext executionContext = createExecutionContext(listImagePipelineImagesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImagePipelineImagesRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listImagePipelineImagesRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImagePipelineImages"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImagePipelineImagesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of image pipelines. *

* * @param listImagePipelinesRequest * @return Result of the ListImagePipelines operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListImagePipelines * @see AWS API Documentation */ @Override public ListImagePipelinesResult listImagePipelines(ListImagePipelinesRequest request) { request = beforeClientExecution(request); return executeListImagePipelines(request); } @SdkInternalApi final ListImagePipelinesResult executeListImagePipelines(ListImagePipelinesRequest listImagePipelinesRequest) { ExecutionContext executionContext = createExecutionContext(listImagePipelinesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImagePipelinesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImagePipelinesRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImagePipelines"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImagePipelinesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of image recipes. *

* * @param listImageRecipesRequest * @return Result of the ListImageRecipes operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListImageRecipes * @see AWS * API Documentation */ @Override public ListImageRecipesResult listImageRecipes(ListImageRecipesRequest request) { request = beforeClientExecution(request); return executeListImageRecipes(request); } @SdkInternalApi final ListImageRecipesResult executeListImageRecipes(ListImageRecipesRequest listImageRecipesRequest) { ExecutionContext executionContext = createExecutionContext(listImageRecipesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImageRecipesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImageRecipesRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImageRecipes"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImageRecipesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the list of images that you have access to. *

* * @param listImagesRequest * @return Result of the ListImages operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListImages * @see AWS API * Documentation */ @Override public ListImagesResult listImages(ListImagesRequest request) { request = beforeClientExecution(request); return executeListImages(request); } @SdkInternalApi final ListImagesResult executeListImages(ListImagesRequest listImagesRequest) { ExecutionContext executionContext = createExecutionContext(listImagesRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListImagesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listImagesRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListImages"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata() .withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListImagesResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of infrastructure configurations. *

* * @param listInfrastructureConfigurationsRequest * @return Result of the ListInfrastructureConfigurations operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidPaginationTokenException * You have provided an invalid pagination token in your request. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.ListInfrastructureConfigurations * @see AWS API Documentation */ @Override public ListInfrastructureConfigurationsResult listInfrastructureConfigurations(ListInfrastructureConfigurationsRequest request) { request = beforeClientExecution(request); return executeListInfrastructureConfigurations(request); } @SdkInternalApi final ListInfrastructureConfigurationsResult executeListInfrastructureConfigurations( ListInfrastructureConfigurationsRequest listInfrastructureConfigurationsRequest) { ExecutionContext executionContext = createExecutionContext(listInfrastructureConfigurationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListInfrastructureConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listInfrastructureConfigurationsRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListInfrastructureConfigurations"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListInfrastructureConfigurationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns the list of tags for the specified resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @sample AWSimagebuilder.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, "imagebuilder"); 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); } } /** *

* Applies a policy to a component. We recommend that you call the RAM API CreateResourceShare * to share resources. If you call the Image Builder API PutComponentPolicy, you must also call the RAM * API * PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the * resource is shared. *

* * @param putComponentPolicyRequest * @return Result of the PutComponentPolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidParameterValueException * The value that you provided for the specified parameter is invalid. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.PutComponentPolicy * @see AWS API Documentation */ @Override public PutComponentPolicyResult putComponentPolicy(PutComponentPolicyRequest request) { request = beforeClientExecution(request); return executePutComponentPolicy(request); } @SdkInternalApi final PutComponentPolicyResult executePutComponentPolicy(PutComponentPolicyRequest putComponentPolicyRequest) { ExecutionContext executionContext = createExecutionContext(putComponentPolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutComponentPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putComponentPolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutComponentPolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutComponentPolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Applies a policy to a container image. We recommend that you call the RAM API CreateResourceShare * (https://docs.aws.amazon.com//ram/latest/APIReference/API_CreateResourceShare.html) to share resources. If you * call the Image Builder API PutContainerImagePolicy, you must also call the RAM API * PromoteResourceShareCreatedFromPolicy * (https://docs.aws.amazon.com//ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html) in order * for the resource to be visible to all principals with whom the resource is shared. *

* * @param putContainerRecipePolicyRequest * @return Result of the PutContainerRecipePolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidParameterValueException * The value that you provided for the specified parameter is invalid. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.PutContainerRecipePolicy * @see AWS API Documentation */ @Override public PutContainerRecipePolicyResult putContainerRecipePolicy(PutContainerRecipePolicyRequest request) { request = beforeClientExecution(request); return executePutContainerRecipePolicy(request); } @SdkInternalApi final PutContainerRecipePolicyResult executePutContainerRecipePolicy(PutContainerRecipePolicyRequest putContainerRecipePolicyRequest) { ExecutionContext executionContext = createExecutionContext(putContainerRecipePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutContainerRecipePolicyRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(putContainerRecipePolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutContainerRecipePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutContainerRecipePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Applies a policy to an image. We recommend that you call the RAM API CreateResourceShare * to share resources. If you call the Image Builder API PutImagePolicy, you must also call the RAM API * * PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom the * resource is shared. *

* * @param putImagePolicyRequest * @return Result of the PutImagePolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidParameterValueException * The value that you provided for the specified parameter is invalid. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.PutImagePolicy * @see AWS * API Documentation */ @Override public PutImagePolicyResult putImagePolicy(PutImagePolicyRequest request) { request = beforeClientExecution(request); return executePutImagePolicy(request); } @SdkInternalApi final PutImagePolicyResult executePutImagePolicy(PutImagePolicyRequest putImagePolicyRequest) { ExecutionContext executionContext = createExecutionContext(putImagePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutImagePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putImagePolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutImagePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutImagePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Applies a policy to an image recipe. We recommend that you call the RAM API CreateResourceShare * to share resources. If you call the Image Builder API PutImageRecipePolicy, you must also call the * RAM API PromoteResourceShareCreatedFromPolicy in order for the resource to be visible to all principals with whom * the resource is shared. *

* * @param putImageRecipePolicyRequest * @return Result of the PutImageRecipePolicy operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws InvalidParameterValueException * The value that you provided for the specified parameter is invalid. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @sample AWSimagebuilder.PutImageRecipePolicy * @see AWS API Documentation */ @Override public PutImageRecipePolicyResult putImageRecipePolicy(PutImageRecipePolicyRequest request) { request = beforeClientExecution(request); return executePutImageRecipePolicy(request); } @SdkInternalApi final PutImageRecipePolicyResult executePutImageRecipePolicy(PutImageRecipePolicyRequest putImageRecipePolicyRequest) { ExecutionContext executionContext = createExecutionContext(putImageRecipePolicyRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new PutImageRecipePolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(putImageRecipePolicyRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "PutImageRecipePolicy"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PutImageRecipePolicyResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Manually triggers a pipeline to create an image. *

* * @param startImagePipelineExecutionRequest * @return Result of the StartImagePipelineExecution operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @sample AWSimagebuilder.StartImagePipelineExecution * @see AWS API Documentation */ @Override public StartImagePipelineExecutionResult startImagePipelineExecution(StartImagePipelineExecutionRequest request) { request = beforeClientExecution(request); return executeStartImagePipelineExecution(request); } @SdkInternalApi final StartImagePipelineExecutionResult executeStartImagePipelineExecution(StartImagePipelineExecutionRequest startImagePipelineExecutionRequest) { ExecutionContext executionContext = createExecutionContext(startImagePipelineExecutionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartImagePipelineExecutionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(startImagePipelineExecutionRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartImagePipelineExecution"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartImagePipelineExecutionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Adds a tag to a resource. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @sample AWSimagebuilder.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, "imagebuilder"); 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 a tag from a resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws InvalidParameterException * The specified parameter is invalid. Review the available parameters for the API request. * @throws ResourceNotFoundException * At least one of the resources referenced by your request does not exist. * @sample AWSimagebuilder.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, "imagebuilder"); 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 new distribution configuration. Distribution configurations define and configure the outputs of your * pipeline. *

* * @param updateDistributionConfigurationRequest * @return Result of the UpdateDistributionConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @throws InvalidParameterCombinationException * You have specified two or more mutually exclusive parameters. Review the error message for details. * @sample AWSimagebuilder.UpdateDistributionConfiguration * @see AWS API Documentation */ @Override public UpdateDistributionConfigurationResult updateDistributionConfiguration(UpdateDistributionConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateDistributionConfiguration(request); } @SdkInternalApi final UpdateDistributionConfigurationResult executeUpdateDistributionConfiguration( UpdateDistributionConfigurationRequest updateDistributionConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(updateDistributionConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateDistributionConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateDistributionConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateDistributionConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateDistributionConfigurationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates an image pipeline. Image pipelines enable you to automate the creation and distribution of images. *

* *

* UpdateImagePipeline does not support selective updates for the pipeline. You must specify all of the required * properties in the update request, not just the properties that have changed. *

*
* * @param updateImagePipelineRequest * @return Result of the UpdateImagePipeline operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @sample AWSimagebuilder.UpdateImagePipeline * @see AWS API Documentation */ @Override public UpdateImagePipelineResult updateImagePipeline(UpdateImagePipelineRequest request) { request = beforeClientExecution(request); return executeUpdateImagePipeline(request); } @SdkInternalApi final UpdateImagePipelineResult executeUpdateImagePipeline(UpdateImagePipelineRequest updateImagePipelineRequest) { ExecutionContext executionContext = createExecutionContext(updateImagePipelineRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateImagePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateImagePipelineRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateImagePipeline"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateImagePipelineResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates a new infrastructure configuration. An infrastructure configuration defines the environment in which your * image will be built and tested. *

* * @param updateInfrastructureConfigurationRequest * @return Result of the UpdateInfrastructureConfiguration operation returned by the service. * @throws ServiceException * This exception is thrown when the service encounters an unrecoverable exception. * @throws ClientException * These errors are usually caused by a client action, such as using an action or resource on behalf of a * user that doesn't have permissions to use the action or resource, or specifying an invalid resource * identifier. * @throws ServiceUnavailableException * The service is unable to process your request at this time. * @throws InvalidRequestException * You have made a request for an action that is not supported by the service. * @throws IdempotentParameterMismatchException * You have specified a client token for an operation using parameter values that differ from a previous * request that used the same client token. * @throws ForbiddenException * You are not authorized to perform the requested operation. * @throws CallRateLimitExceededException * You have exceeded the permitted request rate for the specific operation. * @throws ResourceInUseException * The resource that you are trying to operate on is currently in use. Review the message details and retry * later. * @sample AWSimagebuilder.UpdateInfrastructureConfiguration * @see AWS API Documentation */ @Override public UpdateInfrastructureConfigurationResult updateInfrastructureConfiguration(UpdateInfrastructureConfigurationRequest request) { request = beforeClientExecution(request); return executeUpdateInfrastructureConfiguration(request); } @SdkInternalApi final UpdateInfrastructureConfigurationResult executeUpdateInfrastructureConfiguration( UpdateInfrastructureConfigurationRequest updateInfrastructureConfigurationRequest) { ExecutionContext executionContext = createExecutionContext(updateInfrastructureConfigurationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateInfrastructureConfigurationRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(updateInfrastructureConfigurationRequest)); // 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, "imagebuilder"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateInfrastructureConfiguration"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateInfrastructureConfigurationResultJsonUnmarshaller()); 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