/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.mainframemodernization; 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.mainframemodernization.AWSMainframeModernizationClientBuilder; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.mainframemodernization.model.*; import com.amazonaws.services.mainframemodernization.model.transform.*; /** * Client for accessing AWSMainframeModernization. All service calls made using this client are blocking, and will not * return until the service call completes. *

*

* Amazon Web Services Mainframe Modernization provides tools and resources to help you plan and implement migration and * modernization from mainframes to Amazon Web Services managed runtime environments. It provides tools for analyzing * existing mainframe applications, developing or updating mainframe applications using COBOL or PL/I, and implementing * an automated pipeline for continuous integration and continuous delivery (CI/CD) of the applications. *

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

* Cancels the running of a specific batch job execution. *

* * @param cancelBatchJobExecutionRequest * @return Result of the CancelBatchJobExecution operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.CancelBatchJobExecution * @see AWS API * Documentation */ @Override public CancelBatchJobExecutionResult cancelBatchJobExecution(CancelBatchJobExecutionRequest request) { request = beforeClientExecution(request); return executeCancelBatchJobExecution(request); } @SdkInternalApi final CancelBatchJobExecutionResult executeCancelBatchJobExecution(CancelBatchJobExecutionRequest cancelBatchJobExecutionRequest) { ExecutionContext executionContext = createExecutionContext(cancelBatchJobExecutionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CancelBatchJobExecutionRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(cancelBatchJobExecutionRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CancelBatchJobExecution"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CancelBatchJobExecutionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a new application with given parameters. Requires an existing runtime environment and application * definition file. *

* * @param createApplicationRequest * @return Result of the CreateApplication operation returned by the service. * @throws ServiceQuotaExceededException * One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.CreateApplication * @see AWS API * Documentation */ @Override public CreateApplicationResult createApplication(CreateApplicationRequest request) { request = beforeClientExecution(request); return executeCreateApplication(request); } @SdkInternalApi final CreateApplicationResult executeCreateApplication(CreateApplicationRequest createApplicationRequest) { ExecutionContext executionContext = createExecutionContext(createApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createApplicationRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts a data set import task for a specific application. *

* * @param createDataSetImportTaskRequest * @return Result of the CreateDataSetImportTask operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ServiceQuotaExceededException * One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.CreateDataSetImportTask * @see AWS API * Documentation */ @Override public CreateDataSetImportTaskResult createDataSetImportTask(CreateDataSetImportTaskRequest request) { request = beforeClientExecution(request); return executeCreateDataSetImportTask(request); } @SdkInternalApi final CreateDataSetImportTaskResult executeCreateDataSetImportTask(CreateDataSetImportTaskRequest createDataSetImportTaskRequest) { ExecutionContext executionContext = createExecutionContext(createDataSetImportTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDataSetImportTaskRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(createDataSetImportTaskRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDataSetImportTask"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDataSetImportTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates and starts a deployment to deploy an application into a runtime environment. *

* * @param createDeploymentRequest * @return Result of the CreateDeployment operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ServiceQuotaExceededException * One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.CreateDeployment * @see AWS API * Documentation */ @Override public CreateDeploymentResult createDeployment(CreateDeploymentRequest request) { request = beforeClientExecution(request); return executeCreateDeployment(request); } @SdkInternalApi final CreateDeploymentResult executeCreateDeployment(CreateDeploymentRequest createDeploymentRequest) { ExecutionContext executionContext = createExecutionContext(createDeploymentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateDeploymentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDeploymentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDeployment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDeploymentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Creates a runtime environment for a given runtime engine. *

* * @param createEnvironmentRequest * @return Result of the CreateEnvironment operation returned by the service. * @throws ServiceQuotaExceededException * One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.CreateEnvironment * @see AWS API * Documentation */ @Override public CreateEnvironmentResult createEnvironment(CreateEnvironmentRequest request) { request = beforeClientExecution(request); return executeCreateEnvironment(request); } @SdkInternalApi final CreateEnvironmentResult executeCreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest) { ExecutionContext executionContext = createExecutionContext(createEnvironmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new CreateEnvironmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createEnvironmentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateEnvironment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateEnvironmentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specific application. You cannot delete a running application. *

* * @param deleteApplicationRequest * @return Result of the DeleteApplication operation returned by the service. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.DeleteApplication * @see AWS API * Documentation */ @Override public DeleteApplicationResult deleteApplication(DeleteApplicationRequest request) { request = beforeClientExecution(request); return executeDeleteApplication(request); } @SdkInternalApi final DeleteApplicationResult executeDeleteApplication(DeleteApplicationRequest deleteApplicationRequest) { ExecutionContext executionContext = createExecutionContext(deleteApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteApplicationRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specific application from the specific runtime environment where it was previously deployed. You cannot * delete a runtime environment using DeleteEnvironment if any application has ever been deployed to it. This API * removes the association of the application with the runtime environment so you can delete the environment * smoothly. *

* * @param deleteApplicationFromEnvironmentRequest * @return Result of the DeleteApplicationFromEnvironment operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.DeleteApplicationFromEnvironment * @see AWS API Documentation */ @Override public DeleteApplicationFromEnvironmentResult deleteApplicationFromEnvironment(DeleteApplicationFromEnvironmentRequest request) { request = beforeClientExecution(request); return executeDeleteApplicationFromEnvironment(request); } @SdkInternalApi final DeleteApplicationFromEnvironmentResult executeDeleteApplicationFromEnvironment( DeleteApplicationFromEnvironmentRequest deleteApplicationFromEnvironmentRequest) { ExecutionContext executionContext = createExecutionContext(deleteApplicationFromEnvironmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteApplicationFromEnvironmentRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(deleteApplicationFromEnvironmentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteApplicationFromEnvironment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteApplicationFromEnvironmentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Deletes a specific runtime environment. The environment cannot contain deployed applications. If it does, you * must delete those applications before you delete the environment. *

* * @param deleteEnvironmentRequest * @return Result of the DeleteEnvironment operation returned by the service. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.DeleteEnvironment * @see AWS API * Documentation */ @Override public DeleteEnvironmentResult deleteEnvironment(DeleteEnvironmentRequest request) { request = beforeClientExecution(request); return executeDeleteEnvironment(request); } @SdkInternalApi final DeleteEnvironmentResult executeDeleteEnvironment(DeleteEnvironmentRequest deleteEnvironmentRequest) { ExecutionContext executionContext = createExecutionContext(deleteEnvironmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new DeleteEnvironmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteEnvironmentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteEnvironment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteEnvironmentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes the details of a specific application. *

* * @param getApplicationRequest * @return Result of the GetApplication operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetApplication * @see AWS API * Documentation */ @Override public GetApplicationResult getApplication(GetApplicationRequest request) { request = beforeClientExecution(request); return executeGetApplication(request); } @SdkInternalApi final GetApplicationResult executeGetApplication(GetApplicationRequest getApplicationRequest) { ExecutionContext executionContext = createExecutionContext(getApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getApplicationRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns details about a specific version of a specific application. *

* * @param getApplicationVersionRequest * @return Result of the GetApplicationVersion operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetApplicationVersion * @see AWS API * Documentation */ @Override public GetApplicationVersionResult getApplicationVersion(GetApplicationVersionRequest request) { request = beforeClientExecution(request); return executeGetApplicationVersion(request); } @SdkInternalApi final GetApplicationVersionResult executeGetApplicationVersion(GetApplicationVersionRequest getApplicationVersionRequest) { ExecutionContext executionContext = createExecutionContext(getApplicationVersionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetApplicationVersionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getApplicationVersionRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetApplicationVersion"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory .createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetApplicationVersionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the details of a specific batch job execution for a specific application. *

* * @param getBatchJobExecutionRequest * @return Result of the GetBatchJobExecution operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetBatchJobExecution * @see AWS API * Documentation */ @Override public GetBatchJobExecutionResult getBatchJobExecution(GetBatchJobExecutionRequest request) { request = beforeClientExecution(request); return executeGetBatchJobExecution(request); } @SdkInternalApi final GetBatchJobExecutionResult executeGetBatchJobExecution(GetBatchJobExecutionRequest getBatchJobExecutionRequest) { ExecutionContext executionContext = createExecutionContext(getBatchJobExecutionRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetBatchJobExecutionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getBatchJobExecutionRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetBatchJobExecution"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetBatchJobExecutionResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the details of a specific data set. *

* * @param getDataSetDetailsRequest * @return Result of the GetDataSetDetails operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetDataSetDetails * @see AWS API * Documentation */ @Override public GetDataSetDetailsResult getDataSetDetails(GetDataSetDetailsRequest request) { request = beforeClientExecution(request); return executeGetDataSetDetails(request); } @SdkInternalApi final GetDataSetDetailsResult executeGetDataSetDetails(GetDataSetDetailsRequest getDataSetDetailsRequest) { ExecutionContext executionContext = createExecutionContext(getDataSetDetailsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetDataSetDetailsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDataSetDetailsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDataSetDetails"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDataSetDetailsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets the status of a data set import task initiated with the CreateDataSetImportTask operation. *

* * @param getDataSetImportTaskRequest * @return Result of the GetDataSetImportTask operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetDataSetImportTask * @see AWS API * Documentation */ @Override public GetDataSetImportTaskResult getDataSetImportTask(GetDataSetImportTaskRequest request) { request = beforeClientExecution(request); return executeGetDataSetImportTask(request); } @SdkInternalApi final GetDataSetImportTaskResult executeGetDataSetImportTask(GetDataSetImportTaskRequest getDataSetImportTaskRequest) { ExecutionContext executionContext = createExecutionContext(getDataSetImportTaskRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetDataSetImportTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDataSetImportTaskRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDataSetImportTask"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDataSetImportTaskResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets details of a specific deployment with a given deployment identifier. *

* * @param getDeploymentRequest * @return Result of the GetDeployment operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetDeployment * @see AWS API * Documentation */ @Override public GetDeploymentResult getDeployment(GetDeploymentRequest request) { request = beforeClientExecution(request); return executeGetDeployment(request); } @SdkInternalApi final GetDeploymentResult executeGetDeployment(GetDeploymentRequest getDeploymentRequest) { ExecutionContext executionContext = createExecutionContext(getDeploymentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetDeploymentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getDeploymentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetDeployment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetDeploymentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Describes a specific runtime environment. *

* * @param getEnvironmentRequest * @return Result of the GetEnvironment operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetEnvironment * @see AWS API * Documentation */ @Override public GetEnvironmentResult getEnvironment(GetEnvironmentRequest request) { request = beforeClientExecution(request); return executeGetEnvironment(request); } @SdkInternalApi final GetEnvironmentResult executeGetEnvironment(GetEnvironmentRequest getEnvironmentRequest) { ExecutionContext executionContext = createExecutionContext(getEnvironmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetEnvironmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getEnvironmentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetEnvironment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetEnvironmentResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Gets a single sign-on URL that can be used to connect to AWS Blu Insights. *

* * @param getSignedBluinsightsUrlRequest * @return Result of the GetSignedBluinsightsUrl operation returned by the service. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.GetSignedBluinsightsUrl * @see AWS API * Documentation */ @Override public GetSignedBluinsightsUrlResult getSignedBluinsightsUrl(GetSignedBluinsightsUrlRequest request) { request = beforeClientExecution(request); return executeGetSignedBluinsightsUrl(request); } @SdkInternalApi final GetSignedBluinsightsUrlResult executeGetSignedBluinsightsUrl(GetSignedBluinsightsUrlRequest getSignedBluinsightsUrlRequest) { ExecutionContext executionContext = createExecutionContext(getSignedBluinsightsUrlRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new GetSignedBluinsightsUrlRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(getSignedBluinsightsUrlRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSignedBluinsightsUrl"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetSignedBluinsightsUrlResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of the application versions for a specific application. *

* * @param listApplicationVersionsRequest * @return Result of the ListApplicationVersions operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListApplicationVersions * @see AWS API * Documentation */ @Override public ListApplicationVersionsResult listApplicationVersions(ListApplicationVersionsRequest request) { request = beforeClientExecution(request); return executeListApplicationVersions(request); } @SdkInternalApi final ListApplicationVersionsResult executeListApplicationVersions(ListApplicationVersionsRequest listApplicationVersionsRequest) { ExecutionContext executionContext = createExecutionContext(listApplicationVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListApplicationVersionsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listApplicationVersionsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListApplicationVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListApplicationVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the applications associated with a specific Amazon Web Services account. You can provide the unique * identifier of a specific runtime environment in a query parameter to see all applications associated with that * environment. *

* * @param listApplicationsRequest * @return Result of the ListApplications operation returned by the service. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListApplications * @see AWS API * Documentation */ @Override public ListApplicationsResult listApplications(ListApplicationsRequest request) { request = beforeClientExecution(request); return executeListApplications(request); } @SdkInternalApi final ListApplicationsResult executeListApplications(ListApplicationsRequest listApplicationsRequest) { ExecutionContext executionContext = createExecutionContext(listApplicationsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListApplicationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listApplicationsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListApplications"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListApplicationsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists all the available batch job definitions based on the batch job resources uploaded during the application * creation. You can use the batch job definitions in the list to start a batch job. *

* * @param listBatchJobDefinitionsRequest * @return Result of the ListBatchJobDefinitions operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListBatchJobDefinitions * @see AWS API * Documentation */ @Override public ListBatchJobDefinitionsResult listBatchJobDefinitions(ListBatchJobDefinitionsRequest request) { request = beforeClientExecution(request); return executeListBatchJobDefinitions(request); } @SdkInternalApi final ListBatchJobDefinitionsResult executeListBatchJobDefinitions(ListBatchJobDefinitionsRequest listBatchJobDefinitionsRequest) { ExecutionContext executionContext = createExecutionContext(listBatchJobDefinitionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBatchJobDefinitionsRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listBatchJobDefinitionsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBatchJobDefinitions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBatchJobDefinitionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists historical, current, and scheduled batch job executions for a specific application. *

* * @param listBatchJobExecutionsRequest * @return Result of the ListBatchJobExecutions operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListBatchJobExecutions * @see AWS API * Documentation */ @Override public ListBatchJobExecutionsResult listBatchJobExecutions(ListBatchJobExecutionsRequest request) { request = beforeClientExecution(request); return executeListBatchJobExecutions(request); } @SdkInternalApi final ListBatchJobExecutionsResult executeListBatchJobExecutions(ListBatchJobExecutionsRequest listBatchJobExecutionsRequest) { ExecutionContext executionContext = createExecutionContext(listBatchJobExecutionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListBatchJobExecutionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listBatchJobExecutionsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBatchJobExecutions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBatchJobExecutionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the data set imports for the specified application. *

* * @param listDataSetImportHistoryRequest * @return Result of the ListDataSetImportHistory operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListDataSetImportHistory * @see AWS * API Documentation */ @Override public ListDataSetImportHistoryResult listDataSetImportHistory(ListDataSetImportHistoryRequest request) { request = beforeClientExecution(request); return executeListDataSetImportHistory(request); } @SdkInternalApi final ListDataSetImportHistoryResult executeListDataSetImportHistory(ListDataSetImportHistoryRequest listDataSetImportHistoryRequest) { ExecutionContext executionContext = createExecutionContext(listDataSetImportHistoryRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListDataSetImportHistoryRequestProtocolMarshaller(protocolFactory).marshall(super .beforeMarshalling(listDataSetImportHistoryRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDataSetImportHistory"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDataSetImportHistoryResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the data sets imported for a specific application. In Amazon Web Services Mainframe Modernization, data * sets are associated with applications deployed on runtime environments. This is known as importing data sets. * Currently, Amazon Web Services Mainframe Modernization can import data sets into catalogs using CreateDataSetImportTask. *

* * @param listDataSetsRequest * @return Result of the ListDataSets operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListDataSets * @see AWS API * Documentation */ @Override public ListDataSetsResult listDataSets(ListDataSetsRequest request) { request = beforeClientExecution(request); return executeListDataSets(request); } @SdkInternalApi final ListDataSetsResult executeListDataSets(ListDataSetsRequest listDataSetsRequest) { ExecutionContext executionContext = createExecutionContext(listDataSetsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListDataSetsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDataSetsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDataSets"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDataSetsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Returns a list of all deployments of a specific application. A deployment is a combination of a specific * application and a specific version of that application. Each deployment is mapped to a particular application * version. *

* * @param listDeploymentsRequest * @return Result of the ListDeployments operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListDeployments * @see AWS API * Documentation */ @Override public ListDeploymentsResult listDeployments(ListDeploymentsRequest request) { request = beforeClientExecution(request); return executeListDeployments(request); } @SdkInternalApi final ListDeploymentsResult executeListDeployments(ListDeploymentsRequest listDeploymentsRequest) { ExecutionContext executionContext = createExecutionContext(listDeploymentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListDeploymentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDeploymentsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDeployments"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDeploymentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the available engine versions. *

* * @param listEngineVersionsRequest * @return Result of the ListEngineVersions operation returned by the service. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListEngineVersions * @see AWS API * Documentation */ @Override public ListEngineVersionsResult listEngineVersions(ListEngineVersionsRequest request) { request = beforeClientExecution(request); return executeListEngineVersions(request); } @SdkInternalApi final ListEngineVersionsResult executeListEngineVersions(ListEngineVersionsRequest listEngineVersionsRequest) { ExecutionContext executionContext = createExecutionContext(listEngineVersionsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListEngineVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEngineVersionsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEngineVersions"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEngineVersionsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the runtime environments. *

* * @param listEnvironmentsRequest * @return Result of the ListEnvironments operation returned by the service. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.ListEnvironments * @see AWS API * Documentation */ @Override public ListEnvironmentsResult listEnvironments(ListEnvironmentsRequest request) { request = beforeClientExecution(request); return executeListEnvironments(request); } @SdkInternalApi final ListEnvironmentsResult executeListEnvironments(ListEnvironmentsRequest listEnvironmentsRequest) { ExecutionContext executionContext = createExecutionContext(listEnvironmentsRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new ListEnvironmentsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listEnvironmentsRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListEnvironments"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListEnvironmentsResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Lists the tags for the specified resource. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.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, "m2"); 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); } } /** *

* Starts an application that is currently stopped. *

* * @param startApplicationRequest * @return Result of the StartApplication operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.StartApplication * @see AWS API * Documentation */ @Override public StartApplicationResult startApplication(StartApplicationRequest request) { request = beforeClientExecution(request); return executeStartApplication(request); } @SdkInternalApi final StartApplicationResult executeStartApplication(StartApplicationRequest startApplicationRequest) { ExecutionContext executionContext = createExecutionContext(startApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startApplicationRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Starts a batch job and returns the unique identifier of this execution of the batch job. The associated * application must be running in order to start the batch job. *

* * @param startBatchJobRequest * @return Result of the StartBatchJob operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.StartBatchJob * @see AWS API * Documentation */ @Override public StartBatchJobResult startBatchJob(StartBatchJobRequest request) { request = beforeClientExecution(request); return executeStartBatchJob(request); } @SdkInternalApi final StartBatchJobResult executeStartBatchJob(StartBatchJobRequest startBatchJobRequest) { ExecutionContext executionContext = createExecutionContext(startBatchJobRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StartBatchJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(startBatchJobRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartBatchJob"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartBatchJobResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Stops a running application. *

* * @param stopApplicationRequest * @return Result of the StopApplication operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.StopApplication * @see AWS API * Documentation */ @Override public StopApplicationResult stopApplication(StopApplicationRequest request) { request = beforeClientExecution(request); return executeStopApplication(request); } @SdkInternalApi final StopApplicationResult executeStopApplication(StopApplicationRequest stopApplicationRequest) { ExecutionContext executionContext = createExecutionContext(stopApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new StopApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(stopApplicationRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StopApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StopApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

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

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ServiceQuotaExceededException * One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "TagResource"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new TagResourceResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Removes one or more tags from the specified resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.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, "m2"); 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 an application and creates a new version. *

* * @param updateApplicationRequest * @return Result of the UpdateApplication operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.UpdateApplication * @see AWS API * Documentation */ @Override public UpdateApplicationResult updateApplication(UpdateApplicationRequest request) { request = beforeClientExecution(request); return executeUpdateApplication(request); } @SdkInternalApi final UpdateApplicationResult executeUpdateApplication(UpdateApplicationRequest updateApplicationRequest) { ExecutionContext executionContext = createExecutionContext(updateApplicationRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateApplicationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateApplicationRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateApplication"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateApplicationResultJsonUnmarshaller()); response = invoke(request, responseHandler, executionContext); return response.getAwsResponse(); } finally { endClientExecution(awsRequestMetrics, request, response); } } /** *

* Updates the configuration details for a specific runtime environment. *

* * @param updateEnvironmentRequest * @return Result of the UpdateEnvironment operation returned by the service. * @throws ResourceNotFoundException * The specified resource was not found. * @throws ServiceQuotaExceededException * One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit. * @throws ThrottlingException * The number of requests made exceeds the limit. * @throws AccessDeniedException * The account or role doesn't have the right permissions to make the request. * @throws ConflictException * The parameters provided in the request conflict with existing resources. * @throws ValidationException * One or more parameters provided in the request is not valid. * @throws InternalServerException * An unexpected error occurred during the processing of the request. * @sample AWSMainframeModernization.UpdateEnvironment * @see AWS API * Documentation */ @Override public UpdateEnvironmentResult updateEnvironment(UpdateEnvironmentRequest request) { request = beforeClientExecution(request); return executeUpdateEnvironment(request); } @SdkInternalApi final UpdateEnvironmentResult executeUpdateEnvironment(UpdateEnvironmentRequest updateEnvironmentRequest) { ExecutionContext executionContext = createExecutionContext(updateEnvironmentRequest); AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); awsRequestMetrics.startEvent(Field.ClientExecuteTime); Request request = null; Response response = null; try { awsRequestMetrics.startEvent(Field.RequestMarshallTime); try { request = new UpdateEnvironmentRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateEnvironmentRequest)); // 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, "m2"); request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateEnvironment"); request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); } finally { awsRequestMetrics.endEvent(Field.RequestMarshallTime); } HttpResponseHandler> responseHandler = protocolFactory.createResponseHandler( new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateEnvironmentResultJsonUnmarshaller()); 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(); } }