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

software.amazon.awssdk.services.nimble.DefaultNimbleClient Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.nimble;

import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.core.ApiName;
import software.amazon.awssdk.core.RequestOverrideConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.client.config.SdkClientOption;
import software.amazon.awssdk.core.client.handler.ClientExecutionParams;
import software.amazon.awssdk.core.client.handler.SyncClientHandler;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.http.HttpResponseHandler;
import software.amazon.awssdk.core.metrics.CoreMetric;
import software.amazon.awssdk.core.util.VersionInfo;
import software.amazon.awssdk.metrics.MetricCollector;
import software.amazon.awssdk.metrics.MetricPublisher;
import software.amazon.awssdk.metrics.NoOpMetricCollector;
import software.amazon.awssdk.protocols.core.ExceptionMetadata;
import software.amazon.awssdk.protocols.json.AwsJsonProtocol;
import software.amazon.awssdk.protocols.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.BaseAwsJsonProtocolFactory;
import software.amazon.awssdk.protocols.json.JsonOperationMetadata;
import software.amazon.awssdk.services.nimble.model.AcceptEulasRequest;
import software.amazon.awssdk.services.nimble.model.AcceptEulasResponse;
import software.amazon.awssdk.services.nimble.model.AccessDeniedException;
import software.amazon.awssdk.services.nimble.model.ConflictException;
import software.amazon.awssdk.services.nimble.model.CreateLaunchProfileRequest;
import software.amazon.awssdk.services.nimble.model.CreateLaunchProfileResponse;
import software.amazon.awssdk.services.nimble.model.CreateStreamingImageRequest;
import software.amazon.awssdk.services.nimble.model.CreateStreamingImageResponse;
import software.amazon.awssdk.services.nimble.model.CreateStreamingSessionRequest;
import software.amazon.awssdk.services.nimble.model.CreateStreamingSessionResponse;
import software.amazon.awssdk.services.nimble.model.CreateStreamingSessionStreamRequest;
import software.amazon.awssdk.services.nimble.model.CreateStreamingSessionStreamResponse;
import software.amazon.awssdk.services.nimble.model.CreateStudioComponentRequest;
import software.amazon.awssdk.services.nimble.model.CreateStudioComponentResponse;
import software.amazon.awssdk.services.nimble.model.CreateStudioRequest;
import software.amazon.awssdk.services.nimble.model.CreateStudioResponse;
import software.amazon.awssdk.services.nimble.model.DeleteLaunchProfileMemberRequest;
import software.amazon.awssdk.services.nimble.model.DeleteLaunchProfileMemberResponse;
import software.amazon.awssdk.services.nimble.model.DeleteLaunchProfileRequest;
import software.amazon.awssdk.services.nimble.model.DeleteLaunchProfileResponse;
import software.amazon.awssdk.services.nimble.model.DeleteStreamingImageRequest;
import software.amazon.awssdk.services.nimble.model.DeleteStreamingImageResponse;
import software.amazon.awssdk.services.nimble.model.DeleteStreamingSessionRequest;
import software.amazon.awssdk.services.nimble.model.DeleteStreamingSessionResponse;
import software.amazon.awssdk.services.nimble.model.DeleteStudioComponentRequest;
import software.amazon.awssdk.services.nimble.model.DeleteStudioComponentResponse;
import software.amazon.awssdk.services.nimble.model.DeleteStudioMemberRequest;
import software.amazon.awssdk.services.nimble.model.DeleteStudioMemberResponse;
import software.amazon.awssdk.services.nimble.model.DeleteStudioRequest;
import software.amazon.awssdk.services.nimble.model.DeleteStudioResponse;
import software.amazon.awssdk.services.nimble.model.GetEulaRequest;
import software.amazon.awssdk.services.nimble.model.GetEulaResponse;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileDetailsRequest;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileDetailsResponse;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileInitializationRequest;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileInitializationResponse;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileMemberRequest;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileMemberResponse;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileRequest;
import software.amazon.awssdk.services.nimble.model.GetLaunchProfileResponse;
import software.amazon.awssdk.services.nimble.model.GetStreamingImageRequest;
import software.amazon.awssdk.services.nimble.model.GetStreamingImageResponse;
import software.amazon.awssdk.services.nimble.model.GetStreamingSessionRequest;
import software.amazon.awssdk.services.nimble.model.GetStreamingSessionResponse;
import software.amazon.awssdk.services.nimble.model.GetStreamingSessionStreamRequest;
import software.amazon.awssdk.services.nimble.model.GetStreamingSessionStreamResponse;
import software.amazon.awssdk.services.nimble.model.GetStudioComponentRequest;
import software.amazon.awssdk.services.nimble.model.GetStudioComponentResponse;
import software.amazon.awssdk.services.nimble.model.GetStudioMemberRequest;
import software.amazon.awssdk.services.nimble.model.GetStudioMemberResponse;
import software.amazon.awssdk.services.nimble.model.GetStudioRequest;
import software.amazon.awssdk.services.nimble.model.GetStudioResponse;
import software.amazon.awssdk.services.nimble.model.InternalServerErrorException;
import software.amazon.awssdk.services.nimble.model.ListEulaAcceptancesRequest;
import software.amazon.awssdk.services.nimble.model.ListEulaAcceptancesResponse;
import software.amazon.awssdk.services.nimble.model.ListEulasRequest;
import software.amazon.awssdk.services.nimble.model.ListEulasResponse;
import software.amazon.awssdk.services.nimble.model.ListLaunchProfileMembersRequest;
import software.amazon.awssdk.services.nimble.model.ListLaunchProfileMembersResponse;
import software.amazon.awssdk.services.nimble.model.ListLaunchProfilesRequest;
import software.amazon.awssdk.services.nimble.model.ListLaunchProfilesResponse;
import software.amazon.awssdk.services.nimble.model.ListStreamingImagesRequest;
import software.amazon.awssdk.services.nimble.model.ListStreamingImagesResponse;
import software.amazon.awssdk.services.nimble.model.ListStreamingSessionsRequest;
import software.amazon.awssdk.services.nimble.model.ListStreamingSessionsResponse;
import software.amazon.awssdk.services.nimble.model.ListStudioComponentsRequest;
import software.amazon.awssdk.services.nimble.model.ListStudioComponentsResponse;
import software.amazon.awssdk.services.nimble.model.ListStudioMembersRequest;
import software.amazon.awssdk.services.nimble.model.ListStudioMembersResponse;
import software.amazon.awssdk.services.nimble.model.ListStudiosRequest;
import software.amazon.awssdk.services.nimble.model.ListStudiosResponse;
import software.amazon.awssdk.services.nimble.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.nimble.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.nimble.model.NimbleException;
import software.amazon.awssdk.services.nimble.model.NimbleRequest;
import software.amazon.awssdk.services.nimble.model.PutLaunchProfileMembersRequest;
import software.amazon.awssdk.services.nimble.model.PutLaunchProfileMembersResponse;
import software.amazon.awssdk.services.nimble.model.PutStudioMembersRequest;
import software.amazon.awssdk.services.nimble.model.PutStudioMembersResponse;
import software.amazon.awssdk.services.nimble.model.ResourceNotFoundException;
import software.amazon.awssdk.services.nimble.model.ServiceQuotaExceededException;
import software.amazon.awssdk.services.nimble.model.StartStudioSsoConfigurationRepairRequest;
import software.amazon.awssdk.services.nimble.model.StartStudioSsoConfigurationRepairResponse;
import software.amazon.awssdk.services.nimble.model.TagResourceRequest;
import software.amazon.awssdk.services.nimble.model.TagResourceResponse;
import software.amazon.awssdk.services.nimble.model.ThrottlingException;
import software.amazon.awssdk.services.nimble.model.UntagResourceRequest;
import software.amazon.awssdk.services.nimble.model.UntagResourceResponse;
import software.amazon.awssdk.services.nimble.model.UpdateLaunchProfileMemberRequest;
import software.amazon.awssdk.services.nimble.model.UpdateLaunchProfileMemberResponse;
import software.amazon.awssdk.services.nimble.model.UpdateLaunchProfileRequest;
import software.amazon.awssdk.services.nimble.model.UpdateLaunchProfileResponse;
import software.amazon.awssdk.services.nimble.model.UpdateStreamingImageRequest;
import software.amazon.awssdk.services.nimble.model.UpdateStreamingImageResponse;
import software.amazon.awssdk.services.nimble.model.UpdateStudioComponentRequest;
import software.amazon.awssdk.services.nimble.model.UpdateStudioComponentResponse;
import software.amazon.awssdk.services.nimble.model.UpdateStudioRequest;
import software.amazon.awssdk.services.nimble.model.UpdateStudioResponse;
import software.amazon.awssdk.services.nimble.model.ValidationException;
import software.amazon.awssdk.services.nimble.paginators.ListEulaAcceptancesIterable;
import software.amazon.awssdk.services.nimble.paginators.ListEulasIterable;
import software.amazon.awssdk.services.nimble.paginators.ListLaunchProfileMembersIterable;
import software.amazon.awssdk.services.nimble.paginators.ListLaunchProfilesIterable;
import software.amazon.awssdk.services.nimble.paginators.ListStreamingImagesIterable;
import software.amazon.awssdk.services.nimble.paginators.ListStreamingSessionsIterable;
import software.amazon.awssdk.services.nimble.paginators.ListStudioComponentsIterable;
import software.amazon.awssdk.services.nimble.paginators.ListStudioMembersIterable;
import software.amazon.awssdk.services.nimble.paginators.ListStudiosIterable;
import software.amazon.awssdk.services.nimble.transform.AcceptEulasRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.CreateLaunchProfileRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.CreateStreamingImageRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.CreateStreamingSessionRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.CreateStreamingSessionStreamRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.CreateStudioComponentRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.CreateStudioRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteLaunchProfileMemberRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteLaunchProfileRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteStreamingImageRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteStreamingSessionRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteStudioComponentRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteStudioMemberRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.DeleteStudioRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetEulaRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetLaunchProfileDetailsRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetLaunchProfileInitializationRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetLaunchProfileMemberRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetLaunchProfileRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetStreamingImageRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetStreamingSessionRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetStreamingSessionStreamRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetStudioComponentRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetStudioMemberRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.GetStudioRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListEulaAcceptancesRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListEulasRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListLaunchProfileMembersRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListLaunchProfilesRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListStreamingImagesRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListStreamingSessionsRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListStudioComponentsRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListStudioMembersRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListStudiosRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.PutLaunchProfileMembersRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.PutStudioMembersRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.StartStudioSsoConfigurationRepairRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.UpdateLaunchProfileMemberRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.UpdateLaunchProfileRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.UpdateStreamingImageRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.UpdateStudioComponentRequestMarshaller;
import software.amazon.awssdk.services.nimble.transform.UpdateStudioRequestMarshaller;
import software.amazon.awssdk.utils.Logger;

/**
 * Internal implementation of {@link NimbleClient}.
 *
 * @see NimbleClient#builder()
 */
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultNimbleClient implements NimbleClient {
    private static final Logger log = Logger.loggerFor(DefaultNimbleClient.class);

    private final SyncClientHandler clientHandler;

    private final AwsJsonProtocolFactory protocolFactory;

    private final SdkClientConfiguration clientConfiguration;

    protected DefaultNimbleClient(SdkClientConfiguration clientConfiguration) {
        this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
        this.clientConfiguration = clientConfiguration;
        this.protocolFactory = init(AwsJsonProtocolFactory.builder()).build();
    }

    @Override
    public final String serviceName() {
        return SERVICE_NAME;
    }

    /**
     * 

* Accept EULAs. *

* * @param acceptEulasRequest * A collection of EULA acceptances. * @return Result of the AcceptEulas operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.AcceptEulas * @see AWS API * Documentation */ @Override public AcceptEulasResponse acceptEulas(AcceptEulasRequest acceptEulasRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, AcceptEulasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, acceptEulasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "AcceptEulas"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("AcceptEulas").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(acceptEulasRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new AcceptEulasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Create a launch profile. *

* * @param createLaunchProfileRequest * A collection of launch profiles. * @return Result of the CreateLaunchProfile operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.CreateLaunchProfile * @see AWS * API Documentation */ @Override public CreateLaunchProfileResponse createLaunchProfile(CreateLaunchProfileRequest createLaunchProfileRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateLaunchProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createLaunchProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateLaunchProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateLaunchProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createLaunchProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateLaunchProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a streaming image resource in a studio. *

* * @param createStreamingImageRequest * A collection of streaming images. * @return Result of the CreateStreamingImage operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.CreateStreamingImage * @see AWS * API Documentation */ @Override public CreateStreamingImageResponse createStreamingImage(CreateStreamingImageRequest createStreamingImageRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateStreamingImageResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createStreamingImageRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStreamingImage"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateStreamingImage").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createStreamingImageRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateStreamingImageRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a streaming session in a studio. *

*

* After invoking this operation, you must poll GetStreamingSession until the streaming session is in state READY. *

* * @param createStreamingSessionRequest * A collection of streaming sessions. * @return Result of the CreateStreamingSession operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.CreateStreamingSession * @see AWS * API Documentation */ @Override public CreateStreamingSessionResponse createStreamingSession(CreateStreamingSessionRequest createStreamingSessionRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateStreamingSessionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createStreamingSessionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStreamingSession"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateStreamingSession").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createStreamingSessionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateStreamingSessionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a streaming session stream for a streaming session. *

*

* After invoking this API, invoke GetStreamingSessionStream with the returned streamId to poll the resource until * it is in state READY. *

* * @param createStreamingSessionStreamRequest * A list collection streams. * @return Result of the CreateStreamingSessionStream operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.CreateStreamingSessionStream * @see AWS API Documentation */ @Override public CreateStreamingSessionStreamResponse createStreamingSessionStream( CreateStreamingSessionStreamRequest createStreamingSessionStreamRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateStreamingSessionStreamResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createStreamingSessionStreamRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStreamingSessionStream"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("CreateStreamingSessionStream").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createStreamingSessionStreamRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateStreamingSessionStreamRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Create a new Studio. *

*

* When creating a Studio, two IAM roles must be provided: the admin role and the user Role. These roles are assumed * by your users when they log in to the Nimble Studio portal. *

*

* The user role must have the AmazonNimbleStudio-StudioUser managed policy attached for the portal to function * properly. *

*

* The Admin Role must have the AmazonNimbleStudio-StudioAdmin managed policy attached for the portal to function * properly. *

*

* You may optionally specify a KMS key in the StudioEncryptionConfiguration. *

*

* In Nimble Studio, resource names, descriptions, initialization scripts, and other data you provide are always * encrypted at rest using an KMS key. By default, this key is owned by Amazon Web Services and managed on your * behalf. You may provide your own KMS key when calling CreateStudio to encrypt this data using a key you own and * manage. *

*

* When providing an KMS key during studio creation, Nimble Studio creates KMS grants in your account to provide * your studio user and admin roles access to these KMS keys. *

*

* If you delete this grant, the studio will no longer be accessible to your portal users. *

*

* If you delete the studio KMS key, your studio will no longer be accessible. *

* * @param createStudioRequest * A collection of studio resources. * @return Result of the CreateStudio operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.CreateStudio * @see AWS API * Documentation */ @Override public CreateStudioResponse createStudio(CreateStudioRequest createStudioRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, CreateStudioResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createStudioRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStudio"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateStudio").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createStudioRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateStudioRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates a studio component resource. *

* * @param createStudioComponentRequest * The studio components. * @return Result of the CreateStudioComponent operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.CreateStudioComponent * @see AWS * API Documentation */ @Override public CreateStudioComponentResponse createStudioComponent(CreateStudioComponentRequest createStudioComponentRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, CreateStudioComponentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, createStudioComponentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "CreateStudioComponent"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("CreateStudioComponent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(createStudioComponentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new CreateStudioComponentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Permanently delete a launch profile. *

* * @param deleteLaunchProfileRequest * @return Result of the DeleteLaunchProfile operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteLaunchProfile * @see AWS * API Documentation */ @Override public DeleteLaunchProfileResponse deleteLaunchProfile(DeleteLaunchProfileRequest deleteLaunchProfileRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteLaunchProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteLaunchProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteLaunchProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteLaunchProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteLaunchProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteLaunchProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Delete a user from launch profile membership. *

* * @param deleteLaunchProfileMemberRequest * @return Result of the DeleteLaunchProfileMember operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteLaunchProfileMember * @see AWS API Documentation */ @Override public DeleteLaunchProfileMemberResponse deleteLaunchProfileMember( DeleteLaunchProfileMemberRequest deleteLaunchProfileMemberRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteLaunchProfileMemberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteLaunchProfileMemberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteLaunchProfileMember"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteLaunchProfileMember").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteLaunchProfileMemberRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteLaunchProfileMemberRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Delete streaming image. *

* * @param deleteStreamingImageRequest * @return Result of the DeleteStreamingImage operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteStreamingImage * @see AWS * API Documentation */ @Override public DeleteStreamingImageResponse deleteStreamingImage(DeleteStreamingImageRequest deleteStreamingImageRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteStreamingImageResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStreamingImageRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStreamingImage"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteStreamingImage").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteStreamingImageRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteStreamingImageRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes streaming session resource. *

*

* After invoking this operation, use GetStreamingSession to poll the resource until it transitions to a DELETED * state. *

*

* A streaming session will count against your streaming session quota until it is marked DELETED. *

* * @param deleteStreamingSessionRequest * @return Result of the DeleteStreamingSession operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteStreamingSession * @see AWS * API Documentation */ @Override public DeleteStreamingSessionResponse deleteStreamingSession(DeleteStreamingSessionRequest deleteStreamingSessionRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteStreamingSessionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStreamingSessionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStreamingSession"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("DeleteStreamingSession").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteStreamingSessionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteStreamingSessionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Delete a studio resource. *

* * @param deleteStudioRequest * @return Result of the DeleteStudio operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteStudio * @see AWS API * Documentation */ @Override public DeleteStudioResponse deleteStudio(DeleteStudioRequest deleteStudioRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, DeleteStudioResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStudioRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStudio"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteStudio").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteStudioRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteStudioRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes a studio component resource. *

* * @param deleteStudioComponentRequest * @return Result of the DeleteStudioComponent operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteStudioComponent * @see AWS * API Documentation */ @Override public DeleteStudioComponentResponse deleteStudioComponent(DeleteStudioComponentRequest deleteStudioComponentRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteStudioComponentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStudioComponentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStudioComponent"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteStudioComponent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteStudioComponentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteStudioComponentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Delete a user from studio membership. *

* * @param deleteStudioMemberRequest * @return Result of the DeleteStudioMember operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.DeleteStudioMember * @see AWS API * Documentation */ @Override public DeleteStudioMemberResponse deleteStudioMember(DeleteStudioMemberRequest deleteStudioMemberRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, DeleteStudioMemberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, deleteStudioMemberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "DeleteStudioMember"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("DeleteStudioMember").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(deleteStudioMemberRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new DeleteStudioMemberRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get Eula. *

* * @param getEulaRequest * @return Result of the GetEula operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetEula * @see AWS API * Documentation */ @Override public GetEulaResponse getEula(GetEulaRequest getEulaRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetEulaResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getEulaRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetEula"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetEula").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getEulaRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new GetEulaRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get a launch profile. *

* * @param getLaunchProfileRequest * @return Result of the GetLaunchProfile operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetLaunchProfile * @see AWS API * Documentation */ @Override public GetLaunchProfileResponse getLaunchProfile(GetLaunchProfileRequest getLaunchProfileRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetLaunchProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getLaunchProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLaunchProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetLaunchProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getLaunchProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetLaunchProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Launch profile details include the launch profile resource and summary information of resources that are used by, * or available to, the launch profile. This includes the name and description of all studio components used by the * launch profiles, and the name and description of streaming images that can be used with this launch profile. *

* * @param getLaunchProfileDetailsRequest * @return Result of the GetLaunchProfileDetails operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetLaunchProfileDetails * @see AWS API Documentation */ @Override public GetLaunchProfileDetailsResponse getLaunchProfileDetails(GetLaunchProfileDetailsRequest getLaunchProfileDetailsRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetLaunchProfileDetailsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getLaunchProfileDetailsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLaunchProfileDetails"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetLaunchProfileDetails").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getLaunchProfileDetailsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetLaunchProfileDetailsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get a launch profile initialization. *

* * @param getLaunchProfileInitializationRequest * @return Result of the GetLaunchProfileInitialization operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetLaunchProfileInitialization * @see AWS API Documentation */ @Override public GetLaunchProfileInitializationResponse getLaunchProfileInitialization( GetLaunchProfileInitializationRequest getLaunchProfileInitializationRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetLaunchProfileInitializationResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getLaunchProfileInitializationRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLaunchProfileInitialization"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetLaunchProfileInitialization").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getLaunchProfileInitializationRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetLaunchProfileInitializationRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get a user persona in launch profile membership. *

* * @param getLaunchProfileMemberRequest * @return Result of the GetLaunchProfileMember operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetLaunchProfileMember * @see AWS * API Documentation */ @Override public GetLaunchProfileMemberResponse getLaunchProfileMember(GetLaunchProfileMemberRequest getLaunchProfileMemberRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetLaunchProfileMemberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getLaunchProfileMemberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetLaunchProfileMember"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetLaunchProfileMember").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getLaunchProfileMemberRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetLaunchProfileMemberRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get streaming image. *

* * @param getStreamingImageRequest * @return Result of the GetStreamingImage operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetStreamingImage * @see AWS API * Documentation */ @Override public GetStreamingImageResponse getStreamingImage(GetStreamingImageRequest getStreamingImageRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetStreamingImageResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStreamingImageRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStreamingImage"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetStreamingImage").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStreamingImageRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetStreamingImageRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets StreamingSession resource. *

*

* Invoke this operation to poll for a streaming session state while creating or deleting a session. *

* * @param getStreamingSessionRequest * @return Result of the GetStreamingSession operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetStreamingSession * @see AWS * API Documentation */ @Override public GetStreamingSessionResponse getStreamingSession(GetStreamingSessionRequest getStreamingSessionRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetStreamingSessionResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStreamingSessionRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStreamingSession"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetStreamingSession").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStreamingSessionRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetStreamingSessionRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a StreamingSessionStream for a streaming session. *

*

* Invoke this operation to poll the resource after invoking CreateStreamingSessionStream. *

*

* After the StreamingSessionStream changes to the state READY, the url property will contain a stream to be used * with the DCV streaming client. *

* * @param getStreamingSessionStreamRequest * @return Result of the GetStreamingSessionStream operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetStreamingSessionStream * @see AWS API Documentation */ @Override public GetStreamingSessionStreamResponse getStreamingSessionStream( GetStreamingSessionStreamRequest getStreamingSessionStreamRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetStreamingSessionStreamResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStreamingSessionStreamRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStreamingSessionStream"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("GetStreamingSessionStream").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStreamingSessionStreamRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetStreamingSessionStreamRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get a Studio resource. *

* * @param getStudioRequest * @return Result of the GetStudio operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetStudio * @see AWS API * Documentation */ @Override public GetStudioResponse getStudio(GetStudioRequest getStudioRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetStudioResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStudioRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStudio"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetStudio").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStudioRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new GetStudioRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Gets a studio component resource. *

* * @param getStudioComponentRequest * @return Result of the GetStudioComponent operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetStudioComponent * @see AWS API * Documentation */ @Override public GetStudioComponentResponse getStudioComponent(GetStudioComponentRequest getStudioComponentRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, GetStudioComponentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStudioComponentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStudioComponent"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetStudioComponent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStudioComponentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetStudioComponentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get a user's membership in a studio. *

* * @param getStudioMemberRequest * @return Result of the GetStudioMember operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.GetStudioMember * @see AWS API * Documentation */ @Override public GetStudioMemberResponse getStudioMember(GetStudioMemberRequest getStudioMemberRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, GetStudioMemberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, getStudioMemberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "GetStudioMember"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("GetStudioMember").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(getStudioMemberRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new GetStudioMemberRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List Eula Acceptances. *

* * @param listEulaAcceptancesRequest * @return Result of the ListEulaAcceptances operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListEulaAcceptances * @see AWS * API Documentation */ @Override public ListEulaAcceptancesResponse listEulaAcceptances(ListEulaAcceptancesRequest listEulaAcceptancesRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListEulaAcceptancesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listEulaAcceptancesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListEulaAcceptances"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListEulaAcceptances").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listEulaAcceptancesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListEulaAcceptancesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List Eula Acceptances. *

*
*

* This is a variant of * {@link #listEulaAcceptances(software.amazon.awssdk.services.nimble.model.ListEulaAcceptancesRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListEulaAcceptancesIterable responses = client.listEulaAcceptancesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListEulaAcceptancesIterable responses = client
     *             .listEulaAcceptancesPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListEulaAcceptancesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListEulaAcceptancesIterable responses = client.listEulaAcceptancesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null won't limit the number of results you get with the paginator. It * only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listEulaAcceptances(software.amazon.awssdk.services.nimble.model.ListEulaAcceptancesRequest)} * operation. *

* * @param listEulaAcceptancesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListEulaAcceptances * @see AWS * API Documentation */ @Override public ListEulaAcceptancesIterable listEulaAcceptancesPaginator(ListEulaAcceptancesRequest listEulaAcceptancesRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListEulaAcceptancesIterable(this, applyPaginatorUserAgent(listEulaAcceptancesRequest)); } /** *

* List Eulas. *

* * @param listEulasRequest * @return Result of the ListEulas operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListEulas * @see AWS API * Documentation */ @Override public ListEulasResponse listEulas(ListEulasRequest listEulasRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListEulasResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listEulasRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListEulas"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListEulas").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listEulasRequest) .withMetricCollector(apiCallMetricCollector).withMarshaller(new ListEulasRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List Eulas. *

*
*

* This is a variant of {@link #listEulas(software.amazon.awssdk.services.nimble.model.ListEulasRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListEulasIterable responses = client.listEulasPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListEulasIterable responses = client.listEulasPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListEulasResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListEulasIterable responses = client.listEulasPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null won't limit the number of results you get with the paginator. It * only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listEulas(software.amazon.awssdk.services.nimble.model.ListEulasRequest)} operation. *

* * @param listEulasRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListEulas * @see AWS API * Documentation */ @Override public ListEulasIterable listEulasPaginator(ListEulasRequest listEulasRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListEulasIterable(this, applyPaginatorUserAgent(listEulasRequest)); } /** *

* Get all users in a given launch profile membership. *

* * @param listLaunchProfileMembersRequest * @return Result of the ListLaunchProfileMembers operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListLaunchProfileMembers * @see AWS API Documentation */ @Override public ListLaunchProfileMembersResponse listLaunchProfileMembers( ListLaunchProfileMembersRequest listLaunchProfileMembersRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListLaunchProfileMembersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listLaunchProfileMembersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListLaunchProfileMembers"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("ListLaunchProfileMembers").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listLaunchProfileMembersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListLaunchProfileMembersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get all users in a given launch profile membership. *

*
*

* This is a variant of * {@link #listLaunchProfileMembers(software.amazon.awssdk.services.nimble.model.ListLaunchProfileMembersRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListLaunchProfileMembersIterable responses = client.listLaunchProfileMembersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListLaunchProfileMembersIterable responses = client
     *             .listLaunchProfileMembersPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListLaunchProfileMembersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListLaunchProfileMembersIterable responses = client.listLaunchProfileMembersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listLaunchProfileMembers(software.amazon.awssdk.services.nimble.model.ListLaunchProfileMembersRequest)} * operation. *

* * @param listLaunchProfileMembersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListLaunchProfileMembers * @see AWS API Documentation */ @Override public ListLaunchProfileMembersIterable listLaunchProfileMembersPaginator( ListLaunchProfileMembersRequest listLaunchProfileMembersRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListLaunchProfileMembersIterable(this, applyPaginatorUserAgent(listLaunchProfileMembersRequest)); } /** *

* List all the launch profiles a studio. *

* * @param listLaunchProfilesRequest * @return Result of the ListLaunchProfiles operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListLaunchProfiles * @see AWS API * Documentation */ @Override public ListLaunchProfilesResponse listLaunchProfiles(ListLaunchProfilesRequest listLaunchProfilesRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListLaunchProfilesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listLaunchProfilesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListLaunchProfiles"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListLaunchProfiles").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listLaunchProfilesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListLaunchProfilesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List all the launch profiles a studio. *

*
*

* This is a variant of * {@link #listLaunchProfiles(software.amazon.awssdk.services.nimble.model.ListLaunchProfilesRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListLaunchProfilesIterable responses = client.listLaunchProfilesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListLaunchProfilesIterable responses = client
     *             .listLaunchProfilesPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListLaunchProfilesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListLaunchProfilesIterable responses = client.listLaunchProfilesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listLaunchProfiles(software.amazon.awssdk.services.nimble.model.ListLaunchProfilesRequest)} * operation. *

* * @param listLaunchProfilesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListLaunchProfiles * @see AWS API * Documentation */ @Override public ListLaunchProfilesIterable listLaunchProfilesPaginator(ListLaunchProfilesRequest listLaunchProfilesRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListLaunchProfilesIterable(this, applyPaginatorUserAgent(listLaunchProfilesRequest)); } /** *

* List the streaming image resources available to this studio. *

*

* This list will contain both images provided by Amazon Web Services, as well as streaming images that you have * created in your studio. *

* * @param listStreamingImagesRequest * @return Result of the ListStreamingImages operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStreamingImages * @see AWS * API Documentation */ @Override public ListStreamingImagesResponse listStreamingImages(ListStreamingImagesRequest listStreamingImagesRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListStreamingImagesResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStreamingImagesRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStreamingImages"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListStreamingImages").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listStreamingImagesRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListStreamingImagesRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List the streaming image resources available to this studio. *

*

* This list will contain both images provided by Amazon Web Services, as well as streaming images that you have * created in your studio. *

*
*

* This is a variant of * {@link #listStreamingImages(software.amazon.awssdk.services.nimble.model.ListStreamingImagesRequest)} operation. * The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally * handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStreamingImagesIterable responses = client.listStreamingImagesPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListStreamingImagesIterable responses = client
     *             .listStreamingImagesPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListStreamingImagesResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStreamingImagesIterable responses = client.listStreamingImagesPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null won't limit the number of results you get with the paginator. It * only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listStreamingImages(software.amazon.awssdk.services.nimble.model.ListStreamingImagesRequest)} * operation. *

* * @param listStreamingImagesRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStreamingImages * @see AWS * API Documentation */ @Override public ListStreamingImagesIterable listStreamingImagesPaginator(ListStreamingImagesRequest listStreamingImagesRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListStreamingImagesIterable(this, applyPaginatorUserAgent(listStreamingImagesRequest)); } /** *

* Lists the streaming image resources in a studio. *

* * @param listStreamingSessionsRequest * @return Result of the ListStreamingSessions operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStreamingSessions * @see AWS * API Documentation */ @Override public ListStreamingSessionsResponse listStreamingSessions(ListStreamingSessionsRequest listStreamingSessionsRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListStreamingSessionsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStreamingSessionsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStreamingSessions"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListStreamingSessions").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listStreamingSessionsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListStreamingSessionsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the streaming image resources in a studio. *

*
*

* This is a variant of * {@link #listStreamingSessions(software.amazon.awssdk.services.nimble.model.ListStreamingSessionsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStreamingSessionsIterable responses = client.listStreamingSessionsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListStreamingSessionsIterable responses = client
     *             .listStreamingSessionsPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListStreamingSessionsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStreamingSessionsIterable responses = client.listStreamingSessionsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null won't limit the number of results you get with the paginator. It * only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listStreamingSessions(software.amazon.awssdk.services.nimble.model.ListStreamingSessionsRequest)} * operation. *

* * @param listStreamingSessionsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStreamingSessions * @see AWS * API Documentation */ @Override public ListStreamingSessionsIterable listStreamingSessionsPaginator(ListStreamingSessionsRequest listStreamingSessionsRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListStreamingSessionsIterable(this, applyPaginatorUserAgent(listStreamingSessionsRequest)); } /** *

* Lists the StudioComponents in a studio. *

* * @param listStudioComponentsRequest * @return Result of the ListStudioComponents operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStudioComponents * @see AWS * API Documentation */ @Override public ListStudioComponentsResponse listStudioComponents(ListStudioComponentsRequest listStudioComponentsRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListStudioComponentsResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStudioComponentsRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStudioComponents"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListStudioComponents").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listStudioComponentsRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListStudioComponentsRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Lists the StudioComponents in a studio. *

*
*

* This is a variant of * {@link #listStudioComponents(software.amazon.awssdk.services.nimble.model.ListStudioComponentsRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStudioComponentsIterable responses = client.listStudioComponentsPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListStudioComponentsIterable responses = client
     *             .listStudioComponentsPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListStudioComponentsResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStudioComponentsIterable responses = client.listStudioComponentsPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listStudioComponents(software.amazon.awssdk.services.nimble.model.ListStudioComponentsRequest)} * operation. *

* * @param listStudioComponentsRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStudioComponents * @see AWS * API Documentation */ @Override public ListStudioComponentsIterable listStudioComponentsPaginator(ListStudioComponentsRequest listStudioComponentsRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListStudioComponentsIterable(this, applyPaginatorUserAgent(listStudioComponentsRequest)); } /** *

* Get all users in a given studio membership. *

* * @param listStudioMembersRequest * @return Result of the ListStudioMembers operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStudioMembers * @see AWS API * Documentation */ @Override public ListStudioMembersResponse listStudioMembers(ListStudioMembersRequest listStudioMembersRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListStudioMembersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStudioMembersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStudioMembers"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListStudioMembers").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listStudioMembersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListStudioMembersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Get all users in a given studio membership. *

*
*

* This is a variant of * {@link #listStudioMembers(software.amazon.awssdk.services.nimble.model.ListStudioMembersRequest)} operation. The * return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle * making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStudioMembersIterable responses = client.listStudioMembersPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListStudioMembersIterable responses = client
     *             .listStudioMembersPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListStudioMembersResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStudioMembersIterable responses = client.listStudioMembersPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of maxResults won't limit the number of results you get with the * paginator. It only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listStudioMembers(software.amazon.awssdk.services.nimble.model.ListStudioMembersRequest)} operation. *

* * @param listStudioMembersRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStudioMembers * @see AWS API * Documentation */ @Override public ListStudioMembersIterable listStudioMembersPaginator(ListStudioMembersRequest listStudioMembersRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListStudioMembersIterable(this, applyPaginatorUserAgent(listStudioMembersRequest)); } /** *

* List studios in your Amazon Web Services account in the requested Amazon Web Services Region. *

* * @param listStudiosRequest * @return Result of the ListStudios operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStudios * @see AWS API * Documentation */ @Override public ListStudiosResponse listStudios(ListStudiosRequest listStudiosRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, ListStudiosResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listStudiosRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListStudios"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListStudios").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listStudiosRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListStudiosRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* List studios in your Amazon Web Services account in the requested Amazon Web Services Region. *

*
*

* This is a variant of {@link #listStudios(software.amazon.awssdk.services.nimble.model.ListStudiosRequest)} * operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will * internally handle making service calls for you. *

*

* When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no * guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response * pages by making service calls until there are no pages left or your iteration stops. If there are errors in your * request, you will see the failures only after you start iterating through the iterable. *

* *

* The following are few ways to iterate through the response pages: *

* 1) Using a Stream * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStudiosIterable responses = client.listStudiosPaginator(request);
     * responses.stream().forEach(....);
     * }
     * 
* * 2) Using For loop * *
     * {
     *     @code
     *     software.amazon.awssdk.services.nimble.paginators.ListStudiosIterable responses = client.listStudiosPaginator(request);
     *     for (software.amazon.awssdk.services.nimble.model.ListStudiosResponse response : responses) {
     *         // do something;
     *     }
     * }
     * 
* * 3) Use iterator directly * *
     * {@code
     * software.amazon.awssdk.services.nimble.paginators.ListStudiosIterable responses = client.listStudiosPaginator(request);
     * responses.iterator().forEachRemaining(....);
     * }
     * 
*

* Please notice that the configuration of null won't limit the number of results you get with the paginator. It * only limits the number of results in each page. *

*

* Note: If you prefer to have control on service calls, use the * {@link #listStudios(software.amazon.awssdk.services.nimble.model.ListStudiosRequest)} operation. *

* * @param listStudiosRequest * @return A custom iterable that can be used to iterate through all the response pages. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListStudios * @see AWS API * Documentation */ @Override public ListStudiosIterable listStudiosPaginator(ListStudiosRequest listStudiosRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { return new ListStudiosIterable(this, applyPaginatorUserAgent(listStudiosRequest)); } /** *

* Gets the tags for a resource, given its Amazon Resource Names (ARN). *

*

* This operation supports ARNs for all resource types in Nimble Studio that support tags, including studio, studio * component, launch profile, streaming image, and streaming session. All resources that can be tagged will contain * an ARN property, so you do not have to create this ARN yourself. *

* * @param listTagsForResourceRequest * @return Result of the ListTagsForResource operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.ListTagsForResource * @see AWS * API Documentation */ @Override public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, ListTagsForResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, listTagsForResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "ListTagsForResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("ListTagsForResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(listTagsForResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Add/update users with given persona to launch profile membership. *

* * @param putLaunchProfileMembersRequest * Information about a launch profile membership. * @return Result of the PutLaunchProfileMembers operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.PutLaunchProfileMembers * @see AWS API Documentation */ @Override public PutLaunchProfileMembersResponse putLaunchProfileMembers(PutLaunchProfileMembersRequest putLaunchProfileMembersRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, PutLaunchProfileMembersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, putLaunchProfileMembersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutLaunchProfileMembers"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("PutLaunchProfileMembers").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putLaunchProfileMembersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutLaunchProfileMembersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Add/update users with given persona to studio membership. *

* * @param putStudioMembersRequest * A launch profile membership collection. * @return Result of the PutStudioMembers operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.PutStudioMembers * @see AWS API * Documentation */ @Override public PutStudioMembersResponse putStudioMembers(PutStudioMembersRequest putStudioMembersRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, PutStudioMembersResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, putStudioMembersRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "PutStudioMembers"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("PutStudioMembers").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(putStudioMembersRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new PutStudioMembersRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Repairs the SSO configuration for a given studio. *

*

* If the studio has a valid Amazon Web Services SSO configuration currently associated with it, this operation will * fail with a validation error. *

*

* If the studio does not have a valid Amazon Web Services SSO configuration currently associated with it, then a * new Amazon Web Services SSO application is created for the studio and the studio is changed to the READY state. *

*

* After the Amazon Web Services SSO application is repaired, you must use the Amazon Nimble Studio console to add * administrators and users to your studio. *

* * @param startStudioSsoConfigurationRepairRequest * @return Result of the StartStudioSSOConfigurationRepair operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.StartStudioSSOConfigurationRepair * @see AWS API Documentation */ @Override public StartStudioSsoConfigurationRepairResponse startStudioSSOConfigurationRepair( StartStudioSsoConfigurationRepairRequest startStudioSsoConfigurationRepairRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, StartStudioSsoConfigurationRepairResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, startStudioSsoConfigurationRepairRequest.overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "StartStudioSSOConfigurationRepair"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("StartStudioSSOConfigurationRepair").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(startStudioSsoConfigurationRepairRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new StartStudioSsoConfigurationRepairRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Creates tags for a resource, given its ARN. *

* * @param tagResourceRequest * The ARN for the role that manages access. * @return Result of the TagResource operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.TagResource * @see AWS API * Documentation */ @Override public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, TagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, tagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "TagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("TagResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(tagResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new TagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Deletes the tags for a resource. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.UntagResource * @see AWS API * Documentation */ @Override public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UntagResourceResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, untagResourceRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UntagResource"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UntagResource").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(untagResourceRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UntagResourceRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Update a launch profile. *

* * @param updateLaunchProfileRequest * The launch profile ID. * @return Result of the UpdateLaunchProfile operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.UpdateLaunchProfile * @see AWS * API Documentation */ @Override public UpdateLaunchProfileResponse updateLaunchProfile(UpdateLaunchProfileRequest updateLaunchProfileRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateLaunchProfileResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateLaunchProfileRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateLaunchProfile"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateLaunchProfile").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateLaunchProfileRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateLaunchProfileRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Update a user persona in launch profile membership. *

* * @param updateLaunchProfileMemberRequest * The principal ID. * @return Result of the UpdateLaunchProfileMember operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.UpdateLaunchProfileMember * @see AWS API Documentation */ @Override public UpdateLaunchProfileMemberResponse updateLaunchProfileMember( UpdateLaunchProfileMemberRequest updateLaunchProfileMemberRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateLaunchProfileMemberResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateLaunchProfileMemberRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateLaunchProfileMember"); return clientHandler .execute(new ClientExecutionParams() .withOperationName("UpdateLaunchProfileMember").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateLaunchProfileMemberRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateLaunchProfileMemberRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Update streaming image. *

* * @param updateStreamingImageRequest * The streaming image ID. * @return Result of the UpdateStreamingImage operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.UpdateStreamingImage * @see AWS * API Documentation */ @Override public UpdateStreamingImageResponse updateStreamingImage(UpdateStreamingImageRequest updateStreamingImageRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateStreamingImageResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateStreamingImageRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateStreamingImage"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateStreamingImage").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateStreamingImageRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateStreamingImageRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Update a Studio resource. *

*

* Currently, this operation only supports updating the displayName of your studio. *

* * @param updateStudioRequest * The studio ID. * @return Result of the UpdateStudio operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.UpdateStudio * @see AWS API * Documentation */ @Override public UpdateStudioResponse updateStudio(UpdateStudioRequest updateStudioRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(operationMetadata, UpdateStudioResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateStudioRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateStudio"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateStudio").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateStudioRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateStudioRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } /** *

* Updates a studio component resource. *

* * @param updateStudioComponentRequest * The studio component ID. * @return Result of the UpdateStudioComponent operation returned by the service. * @throws ValidationException * One of the parameters in the request is invalid. * @throws InternalServerErrorException * A service fault has occurred. Please retry your request and contact Amazon Web Services Support if this * error continues. * @throws ServiceQuotaExceededException * This request would cause a service quota to be exceeded. Please use the Amazon Web Services Service * Quotas console to request an increase. * @throws AccessDeniedException * You do not have permission to perform this action. * @throws ResourceNotFoundException * A requested resource was not found. * @throws ThrottlingException * The request was denied due to request throttling. Please retry your request. * @throws ConflictException * This request conflicts with another concurrent request. Please retry your request. * @throws SdkException * Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for * catch all scenarios. * @throws SdkClientException * If any client side error occurs such as an IO related failure, failure to get credentials, etc. * @throws NimbleException * Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type. * @sample NimbleClient.UpdateStudioComponent * @see AWS * API Documentation */ @Override public UpdateStudioComponentResponse updateStudioComponent(UpdateStudioComponentRequest updateStudioComponentRequest) throws ValidationException, InternalServerErrorException, ServiceQuotaExceededException, AccessDeniedException, ResourceNotFoundException, ThrottlingException, ConflictException, AwsServiceException, SdkClientException, NimbleException { JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false) .isPayloadJson(true).build(); HttpResponseHandler responseHandler = protocolFactory.createResponseHandler( operationMetadata, UpdateStudioComponentResponse::builder); HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory, operationMetadata); List metricPublishers = resolveMetricPublishers(clientConfiguration, updateStudioComponentRequest .overrideConfiguration().orElse(null)); MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector .create("ApiCall"); try { apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, "nimble"); apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, "UpdateStudioComponent"); return clientHandler.execute(new ClientExecutionParams() .withOperationName("UpdateStudioComponent").withResponseHandler(responseHandler) .withErrorResponseHandler(errorResponseHandler).withInput(updateStudioComponentRequest) .withMetricCollector(apiCallMetricCollector) .withMarshaller(new UpdateStudioComponentRequestMarshaller(protocolFactory))); } finally { metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect())); } } private static List resolveMetricPublishers(SdkClientConfiguration clientConfiguration, RequestOverrideConfiguration requestOverrideConfiguration) { List publishers = null; if (requestOverrideConfiguration != null) { publishers = requestOverrideConfiguration.metricPublishers(); } if (publishers == null || publishers.isEmpty()) { publishers = clientConfiguration.option(SdkClientOption.METRIC_PUBLISHERS); } if (publishers == null) { publishers = Collections.emptyList(); } return publishers; } private HttpResponseHandler createErrorResponseHandler(BaseAwsJsonProtocolFactory protocolFactory, JsonOperationMetadata operationMetadata) { return protocolFactory.createErrorResponseHandler(operationMetadata); } private > T init(T builder) { return builder .clientConfiguration(clientConfiguration) .defaultServiceExceptionSupplier(NimbleException::builder) .protocol(AwsJsonProtocol.REST_JSON) .protocolVersion("1.1") .registerModeledException( ExceptionMetadata.builder().errorCode("ThrottlingException") .exceptionBuilderSupplier(ThrottlingException::builder).httpStatusCode(429).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ServiceQuotaExceededException") .exceptionBuilderSupplier(ServiceQuotaExceededException::builder).httpStatusCode(402).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("AccessDeniedException") .exceptionBuilderSupplier(AccessDeniedException::builder).httpStatusCode(403).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ConflictException") .exceptionBuilderSupplier(ConflictException::builder).httpStatusCode(409).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ResourceNotFoundException") .exceptionBuilderSupplier(ResourceNotFoundException::builder).httpStatusCode(404).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("ValidationException") .exceptionBuilderSupplier(ValidationException::builder).httpStatusCode(400).build()) .registerModeledException( ExceptionMetadata.builder().errorCode("InternalServerErrorException") .exceptionBuilderSupplier(InternalServerErrorException::builder).httpStatusCode(500).build()); } @Override public void close() { clientHandler.close(); } private T applyPaginatorUserAgent(T request) { Consumer userAgentApplier = b -> b.addApiName(ApiName.builder() .version(VersionInfo.SDK_VERSION).name("PAGINATED").build()); AwsRequestOverrideConfiguration overrideConfiguration = request.overrideConfiguration() .map(c -> c.toBuilder().applyMutation(userAgentApplier).build()) .orElse((AwsRequestOverrideConfiguration.builder().applyMutation(userAgentApplier).build())); return (T) request.toBuilder().overrideConfiguration(overrideConfiguration).build(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy