software.amazon.awssdk.services.appstream.DefaultAppStreamClient Maven / Gradle / Ivy
/*
* Copyright 2013-2018 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.appstream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.awscore.internal.protocol.json.AwsJsonProtocol;
import software.amazon.awssdk.awscore.protocol.json.AwsJsonProtocolFactory;
import software.amazon.awssdk.awscore.protocol.json.AwsJsonProtocolMetadata;
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.internal.client.config.SdkClientConfiguration;
import software.amazon.awssdk.core.protocol.json.JsonClientMetadata;
import software.amazon.awssdk.core.protocol.json.JsonErrorResponseMetadata;
import software.amazon.awssdk.core.protocol.json.JsonErrorShapeMetadata;
import software.amazon.awssdk.core.protocol.json.JsonOperationMetadata;
import software.amazon.awssdk.services.appstream.model.AppStreamException;
import software.amazon.awssdk.services.appstream.model.AssociateFleetRequest;
import software.amazon.awssdk.services.appstream.model.AssociateFleetResponse;
import software.amazon.awssdk.services.appstream.model.ConcurrentModificationException;
import software.amazon.awssdk.services.appstream.model.CopyImageRequest;
import software.amazon.awssdk.services.appstream.model.CopyImageResponse;
import software.amazon.awssdk.services.appstream.model.CreateDirectoryConfigRequest;
import software.amazon.awssdk.services.appstream.model.CreateDirectoryConfigResponse;
import software.amazon.awssdk.services.appstream.model.CreateFleetRequest;
import software.amazon.awssdk.services.appstream.model.CreateFleetResponse;
import software.amazon.awssdk.services.appstream.model.CreateImageBuilderRequest;
import software.amazon.awssdk.services.appstream.model.CreateImageBuilderResponse;
import software.amazon.awssdk.services.appstream.model.CreateImageBuilderStreamingUrlRequest;
import software.amazon.awssdk.services.appstream.model.CreateImageBuilderStreamingUrlResponse;
import software.amazon.awssdk.services.appstream.model.CreateStackRequest;
import software.amazon.awssdk.services.appstream.model.CreateStackResponse;
import software.amazon.awssdk.services.appstream.model.CreateStreamingUrlRequest;
import software.amazon.awssdk.services.appstream.model.CreateStreamingUrlResponse;
import software.amazon.awssdk.services.appstream.model.DeleteDirectoryConfigRequest;
import software.amazon.awssdk.services.appstream.model.DeleteDirectoryConfigResponse;
import software.amazon.awssdk.services.appstream.model.DeleteFleetRequest;
import software.amazon.awssdk.services.appstream.model.DeleteFleetResponse;
import software.amazon.awssdk.services.appstream.model.DeleteImageBuilderRequest;
import software.amazon.awssdk.services.appstream.model.DeleteImageBuilderResponse;
import software.amazon.awssdk.services.appstream.model.DeleteImagePermissionsRequest;
import software.amazon.awssdk.services.appstream.model.DeleteImagePermissionsResponse;
import software.amazon.awssdk.services.appstream.model.DeleteImageRequest;
import software.amazon.awssdk.services.appstream.model.DeleteImageResponse;
import software.amazon.awssdk.services.appstream.model.DeleteStackRequest;
import software.amazon.awssdk.services.appstream.model.DeleteStackResponse;
import software.amazon.awssdk.services.appstream.model.DescribeDirectoryConfigsRequest;
import software.amazon.awssdk.services.appstream.model.DescribeDirectoryConfigsResponse;
import software.amazon.awssdk.services.appstream.model.DescribeFleetsRequest;
import software.amazon.awssdk.services.appstream.model.DescribeFleetsResponse;
import software.amazon.awssdk.services.appstream.model.DescribeImageBuildersRequest;
import software.amazon.awssdk.services.appstream.model.DescribeImageBuildersResponse;
import software.amazon.awssdk.services.appstream.model.DescribeImagePermissionsRequest;
import software.amazon.awssdk.services.appstream.model.DescribeImagePermissionsResponse;
import software.amazon.awssdk.services.appstream.model.DescribeImagesRequest;
import software.amazon.awssdk.services.appstream.model.DescribeImagesResponse;
import software.amazon.awssdk.services.appstream.model.DescribeSessionsRequest;
import software.amazon.awssdk.services.appstream.model.DescribeSessionsResponse;
import software.amazon.awssdk.services.appstream.model.DescribeStacksRequest;
import software.amazon.awssdk.services.appstream.model.DescribeStacksResponse;
import software.amazon.awssdk.services.appstream.model.DisassociateFleetRequest;
import software.amazon.awssdk.services.appstream.model.DisassociateFleetResponse;
import software.amazon.awssdk.services.appstream.model.ExpireSessionRequest;
import software.amazon.awssdk.services.appstream.model.ExpireSessionResponse;
import software.amazon.awssdk.services.appstream.model.IncompatibleImageException;
import software.amazon.awssdk.services.appstream.model.InvalidAccountStatusException;
import software.amazon.awssdk.services.appstream.model.InvalidParameterCombinationException;
import software.amazon.awssdk.services.appstream.model.InvalidRoleException;
import software.amazon.awssdk.services.appstream.model.LimitExceededException;
import software.amazon.awssdk.services.appstream.model.ListAssociatedFleetsRequest;
import software.amazon.awssdk.services.appstream.model.ListAssociatedFleetsResponse;
import software.amazon.awssdk.services.appstream.model.ListAssociatedStacksRequest;
import software.amazon.awssdk.services.appstream.model.ListAssociatedStacksResponse;
import software.amazon.awssdk.services.appstream.model.ListTagsForResourceRequest;
import software.amazon.awssdk.services.appstream.model.ListTagsForResourceResponse;
import software.amazon.awssdk.services.appstream.model.OperationNotPermittedException;
import software.amazon.awssdk.services.appstream.model.ResourceAlreadyExistsException;
import software.amazon.awssdk.services.appstream.model.ResourceInUseException;
import software.amazon.awssdk.services.appstream.model.ResourceNotAvailableException;
import software.amazon.awssdk.services.appstream.model.ResourceNotFoundException;
import software.amazon.awssdk.services.appstream.model.StartFleetRequest;
import software.amazon.awssdk.services.appstream.model.StartFleetResponse;
import software.amazon.awssdk.services.appstream.model.StartImageBuilderRequest;
import software.amazon.awssdk.services.appstream.model.StartImageBuilderResponse;
import software.amazon.awssdk.services.appstream.model.StopFleetRequest;
import software.amazon.awssdk.services.appstream.model.StopFleetResponse;
import software.amazon.awssdk.services.appstream.model.StopImageBuilderRequest;
import software.amazon.awssdk.services.appstream.model.StopImageBuilderResponse;
import software.amazon.awssdk.services.appstream.model.TagResourceRequest;
import software.amazon.awssdk.services.appstream.model.TagResourceResponse;
import software.amazon.awssdk.services.appstream.model.UntagResourceRequest;
import software.amazon.awssdk.services.appstream.model.UntagResourceResponse;
import software.amazon.awssdk.services.appstream.model.UpdateDirectoryConfigRequest;
import software.amazon.awssdk.services.appstream.model.UpdateDirectoryConfigResponse;
import software.amazon.awssdk.services.appstream.model.UpdateFleetRequest;
import software.amazon.awssdk.services.appstream.model.UpdateFleetResponse;
import software.amazon.awssdk.services.appstream.model.UpdateImagePermissionsRequest;
import software.amazon.awssdk.services.appstream.model.UpdateImagePermissionsResponse;
import software.amazon.awssdk.services.appstream.model.UpdateStackRequest;
import software.amazon.awssdk.services.appstream.model.UpdateStackResponse;
import software.amazon.awssdk.services.appstream.transform.AssociateFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.AssociateFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CopyImageRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CopyImageResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateDirectoryConfigRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateDirectoryConfigResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateImageBuilderRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateImageBuilderResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateImageBuilderStreamingUrlRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateImageBuilderStreamingUrlResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateStackRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateStackResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateStreamingUrlRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.CreateStreamingUrlResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteDirectoryConfigRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteDirectoryConfigResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteImageBuilderRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteImageBuilderResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteImagePermissionsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteImagePermissionsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteImageRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteImageResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteStackRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DeleteStackResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeDirectoryConfigsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeDirectoryConfigsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeFleetsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeFleetsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeImageBuildersRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeImageBuildersResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeImagePermissionsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeImagePermissionsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeImagesRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeImagesResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeSessionsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeSessionsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeStacksRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DescribeStacksResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.DisassociateFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.DisassociateFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.ExpireSessionRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.ExpireSessionResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.ListAssociatedFleetsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.ListAssociatedFleetsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.ListAssociatedStacksRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.ListAssociatedStacksResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.ListTagsForResourceRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.ListTagsForResourceResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.StartFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.StartFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.StartImageBuilderRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.StartImageBuilderResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.StopFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.StopFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.StopImageBuilderRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.StopImageBuilderResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.TagResourceRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.TagResourceResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.UntagResourceRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.UntagResourceResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateDirectoryConfigRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateDirectoryConfigResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateFleetRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateFleetResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateImagePermissionsRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateImagePermissionsResponseUnmarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateStackRequestMarshaller;
import software.amazon.awssdk.services.appstream.transform.UpdateStackResponseUnmarshaller;
/**
* Internal implementation of {@link AppStreamClient}.
*
* @see AppStreamClient#builder()
*/
@Generated("software.amazon.awssdk:codegen")
@SdkInternalApi
final class DefaultAppStreamClient implements AppStreamClient {
private final SyncClientHandler clientHandler;
private final AwsJsonProtocolFactory protocolFactory;
private final SdkClientConfiguration clientConfiguration;
protected DefaultAppStreamClient(SdkClientConfiguration clientConfiguration) {
this.clientHandler = new AwsSyncClientHandler(clientConfiguration);
this.clientConfiguration = clientConfiguration;
this.protocolFactory = init(false);
}
@Override
public final String serviceName() {
return SERVICE_NAME;
}
/**
*
* Associates the specified fleet with the specified stack.
*
*
* @param associateFleetRequest
* @return Result of the AssociateFleet operation returned by the service.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.AssociateFleet
* @see AWS API
* Documentation
*/
@Override
public AssociateFleetResponse associateFleet(AssociateFleetRequest associateFleetRequest) throws LimitExceededException,
InvalidAccountStatusException, ResourceNotFoundException, ConcurrentModificationException,
IncompatibleImageException, OperationNotPermittedException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new AssociateFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(associateFleetRequest).withMarshaller(new AssociateFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Copies the image within the same region or to a new region within the same AWS account. Note that any tags you
* added to the image will not be copied.
*
*
* @param copyImageRequest
* @return Result of the CopyImage operation returned by the service.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CopyImage
* @see AWS API
* Documentation
*/
@Override
public CopyImageResponse copyImage(CopyImageRequest copyImageRequest) throws ResourceAlreadyExistsException,
ResourceNotFoundException, ResourceNotAvailableException, LimitExceededException, InvalidAccountStatusException,
IncompatibleImageException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CopyImageResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler).withInput(copyImageRequest)
.withMarshaller(new CopyImageRequestMarshaller(protocolFactory)));
}
/**
*
* Creates a Directory Config object in AppStream 2.0. This object includes the information required to join
* streaming instances to an Active Directory domain.
*
*
* @param createDirectoryConfigRequest
* @return Result of the CreateDirectoryConfig operation returned by the service.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CreateDirectoryConfig
* @see AWS API Documentation
*/
@Override
public CreateDirectoryConfigResponse createDirectoryConfig(CreateDirectoryConfigRequest createDirectoryConfigRequest)
throws ResourceAlreadyExistsException, LimitExceededException, InvalidAccountStatusException, AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateDirectoryConfigResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createDirectoryConfigRequest)
.withMarshaller(new CreateDirectoryConfigRequestMarshaller(protocolFactory)));
}
/**
*
* Creates a fleet. A fleet consists of streaming instances that run a specified image.
*
*
* @param createFleetRequest
* @return Result of the CreateFleet operation returned by the service.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws InvalidRoleException
* The specified role is invalid.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CreateFleet
* @see AWS API
* Documentation
*/
@Override
public CreateFleetResponse createFleet(CreateFleetRequest createFleetRequest) throws ResourceAlreadyExistsException,
ResourceNotAvailableException, ResourceNotFoundException, LimitExceededException, InvalidAccountStatusException,
InvalidRoleException, ConcurrentModificationException, InvalidParameterCombinationException,
IncompatibleImageException, OperationNotPermittedException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createFleetRequest).withMarshaller(new CreateFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Creates an image builder. An image builder is a virtual machine that is used to create an image.
*
*
* The initial state of the builder is PENDING
. When it is ready, the state is RUNNING
.
*
*
* @param createImageBuilderRequest
* @return Result of the CreateImageBuilder operation returned by the service.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws InvalidRoleException
* The specified role is invalid.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CreateImageBuilder
* @see AWS
* API Documentation
*/
@Override
public CreateImageBuilderResponse createImageBuilder(CreateImageBuilderRequest createImageBuilderRequest)
throws LimitExceededException, InvalidAccountStatusException, ResourceAlreadyExistsException,
ResourceNotAvailableException, ResourceNotFoundException, InvalidRoleException, ConcurrentModificationException,
InvalidParameterCombinationException, IncompatibleImageException, OperationNotPermittedException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateImageBuilderResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createImageBuilderRequest).withMarshaller(new CreateImageBuilderRequestMarshaller(protocolFactory)));
}
/**
*
* Creates a URL to start an image builder streaming session.
*
*
* @param createImageBuilderStreamingUrlRequest
* @return Result of the CreateImageBuilderStreamingURL operation returned by the service.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CreateImageBuilderStreamingURL
* @see AWS API Documentation
*/
@Override
public CreateImageBuilderStreamingUrlResponse createImageBuilderStreamingURL(
CreateImageBuilderStreamingUrlRequest createImageBuilderStreamingUrlRequest) throws OperationNotPermittedException,
ResourceNotFoundException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateImageBuilderStreamingUrlResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler
.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createImageBuilderStreamingUrlRequest)
.withMarshaller(new CreateImageBuilderStreamingUrlRequestMarshaller(protocolFactory)));
}
/**
*
* Creates a stack to start streaming applications to users. A stack consists of an associated fleet, user access
* policies, and storage configurations.
*
*
* @param createStackRequest
* @return Result of the CreateStack operation returned by the service.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws ResourceAlreadyExistsException
* The specified resource already exists.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @throws InvalidRoleException
* The specified role is invalid.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CreateStack
* @see AWS API
* Documentation
*/
@Override
public CreateStackResponse createStack(CreateStackRequest createStackRequest) throws LimitExceededException,
InvalidAccountStatusException, ResourceAlreadyExistsException, ConcurrentModificationException, InvalidRoleException,
ResourceNotFoundException, InvalidParameterCombinationException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateStackResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createStackRequest).withMarshaller(new CreateStackRequestMarshaller(protocolFactory)));
}
/**
*
* Creates a temporary URL to start an AppStream 2.0 streaming session for the specified user. A streaming URL
* enables application streaming to be tested without user setup.
*
*
* @param createStreamingUrlRequest
* @return Result of the CreateStreamingURL operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.CreateStreamingURL
* @see AWS
* API Documentation
*/
@Override
public CreateStreamingUrlResponse createStreamingURL(CreateStreamingUrlRequest createStreamingUrlRequest)
throws ResourceNotFoundException, ResourceNotAvailableException, OperationNotPermittedException,
InvalidParameterCombinationException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new CreateStreamingUrlResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(createStreamingUrlRequest).withMarshaller(new CreateStreamingUrlRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes the specified Directory Config object from AppStream 2.0. This object includes the information required
* to join streaming instances to an Active Directory domain.
*
*
* @param deleteDirectoryConfigRequest
* @return Result of the DeleteDirectoryConfig operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DeleteDirectoryConfig
* @see AWS API Documentation
*/
@Override
public DeleteDirectoryConfigResponse deleteDirectoryConfig(DeleteDirectoryConfigRequest deleteDirectoryConfigRequest)
throws ResourceInUseException, ResourceNotFoundException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteDirectoryConfigResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteDirectoryConfigRequest)
.withMarshaller(new DeleteDirectoryConfigRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes the specified fleet.
*
*
* @param deleteFleetRequest
* @return Result of the DeleteFleet operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DeleteFleet
* @see AWS API
* Documentation
*/
@Override
public DeleteFleetResponse deleteFleet(DeleteFleetRequest deleteFleetRequest) throws ResourceInUseException,
ResourceNotFoundException, ConcurrentModificationException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteFleetRequest).withMarshaller(new DeleteFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes the specified image. You cannot delete an image when it is in use. After you delete an image, you cannot
* provision new capacity using the image.
*
*
* @param deleteImageRequest
* @return Result of the DeleteImage operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DeleteImage
* @see AWS API
* Documentation
*/
@Override
public DeleteImageResponse deleteImage(DeleteImageRequest deleteImageRequest) throws ResourceInUseException,
ResourceNotFoundException, OperationNotPermittedException, ConcurrentModificationException, AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteImageResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteImageRequest).withMarshaller(new DeleteImageRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes the specified image builder and releases the capacity.
*
*
* @param deleteImageBuilderRequest
* @return Result of the DeleteImageBuilder operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DeleteImageBuilder
* @see AWS
* API Documentation
*/
@Override
public DeleteImageBuilderResponse deleteImageBuilder(DeleteImageBuilderRequest deleteImageBuilderRequest)
throws ResourceNotFoundException, OperationNotPermittedException, ConcurrentModificationException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteImageBuilderResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteImageBuilderRequest).withMarshaller(new DeleteImageBuilderRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes permissions for the specified private image. After you delete permissions for an image, AWS accounts to
* which you previously granted these permissions can no longer use the image.
*
*
* @param deleteImagePermissionsRequest
* @return Result of the DeleteImagePermissions operation returned by the service.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DeleteImagePermissions
* @see AWS API Documentation
*/
@Override
public DeleteImagePermissionsResponse deleteImagePermissions(DeleteImagePermissionsRequest deleteImagePermissionsRequest)
throws ResourceNotAvailableException, ResourceNotFoundException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteImagePermissionsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteImagePermissionsRequest)
.withMarshaller(new DeleteImagePermissionsRequestMarshaller(protocolFactory)));
}
/**
*
* Deletes the specified stack. After the stack is deleted, the application streaming environment provided by the
* stack is no longer available to users. Also, any reservations made for application streaming sessions for the
* stack are released.
*
*
* @param deleteStackRequest
* @return Result of the DeleteStack operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DeleteStack
* @see AWS API
* Documentation
*/
@Override
public DeleteStackResponse deleteStack(DeleteStackRequest deleteStackRequest) throws ResourceInUseException,
ResourceNotFoundException, ConcurrentModificationException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DeleteStackResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(deleteStackRequest).withMarshaller(new DeleteStackRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes one or more specified Directory Config objects for AppStream 2.0, if the names
* for these objects are provided. Otherwise, all Directory Config objects in the account are described. These
* objects include the information required to join streaming instances to an Active Directory domain.
*
*
* Although the response syntax in this topic includes the account password, this password is not returned in the
* actual response.
*
*
* @param describeDirectoryConfigsRequest
* @return Result of the DescribeDirectoryConfigs operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeDirectoryConfigs
* @see AWS API Documentation
*/
@Override
public DescribeDirectoryConfigsResponse describeDirectoryConfigs(
DescribeDirectoryConfigsRequest describeDirectoryConfigsRequest) throws ResourceNotFoundException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeDirectoryConfigsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler
.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeDirectoryConfigsRequest)
.withMarshaller(new DescribeDirectoryConfigsRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes one or more specified fleets, if the fleet names are provided. Otherwise, all
* fleets in the account are described.
*
*
* @param describeFleetsRequest
* @return Result of the DescribeFleets operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeFleets
* @see AWS API
* Documentation
*/
@Override
public DescribeFleetsResponse describeFleets(DescribeFleetsRequest describeFleetsRequest) throws ResourceNotFoundException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeFleetsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeFleetsRequest).withMarshaller(new DescribeFleetsRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes one or more specified image builders, if the image builder names are provided.
* Otherwise, all image builders in the account are described.
*
*
* @param describeImageBuildersRequest
* @return Result of the DescribeImageBuilders operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeImageBuilders
* @see AWS API Documentation
*/
@Override
public DescribeImageBuildersResponse describeImageBuilders(DescribeImageBuildersRequest describeImageBuildersRequest)
throws ResourceNotFoundException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeImageBuildersResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeImageBuildersRequest)
.withMarshaller(new DescribeImageBuildersRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes the permissions for shared AWS account IDs on a private image that you own.
*
*
* @param describeImagePermissionsRequest
* @return Result of the DescribeImagePermissions operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeImagePermissions
* @see AWS API Documentation
*/
@Override
public DescribeImagePermissionsResponse describeImagePermissions(
DescribeImagePermissionsRequest describeImagePermissionsRequest) throws ResourceNotFoundException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeImagePermissionsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler
.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeImagePermissionsRequest)
.withMarshaller(new DescribeImagePermissionsRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes one or more specified images, if the image names or image ARNs are provided.
* Otherwise, all images in the account are described.
*
*
* @param describeImagesRequest
* @return Result of the DescribeImages operation returned by the service.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeImages
* @see AWS API
* Documentation
*/
@Override
public DescribeImagesResponse describeImages(DescribeImagesRequest describeImagesRequest)
throws InvalidParameterCombinationException, ResourceNotFoundException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeImagesResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeImagesRequest).withMarshaller(new DescribeImagesRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes the streaming sessions for a specified stack and fleet. If a user ID is provided
* for the stack and fleet, only streaming sessions for that user are described. If an authentication type is not
* provided, the default is to authenticate users using a streaming URL.
*
*
* @param describeSessionsRequest
* @return Result of the DescribeSessions operation returned by the service.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeSessions
* @see AWS API
* Documentation
*/
@Override
public DescribeSessionsResponse describeSessions(DescribeSessionsRequest describeSessionsRequest)
throws InvalidParameterCombinationException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeSessionsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeSessionsRequest).withMarshaller(new DescribeSessionsRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list that describes one or more specified stacks, if the stack names are provided. Otherwise, all
* stacks in the account are described.
*
*
* @param describeStacksRequest
* @return Result of the DescribeStacks operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DescribeStacks
* @see AWS API
* Documentation
*/
@Override
public DescribeStacksResponse describeStacks(DescribeStacksRequest describeStacksRequest) throws ResourceNotFoundException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DescribeStacksResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(describeStacksRequest).withMarshaller(new DescribeStacksRequestMarshaller(protocolFactory)));
}
/**
*
* Disassociates the specified fleet from the specified stack.
*
*
* @param disassociateFleetRequest
* @return Result of the DisassociateFleet operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.DisassociateFleet
* @see AWS
* API Documentation
*/
@Override
public DisassociateFleetResponse disassociateFleet(DisassociateFleetRequest disassociateFleetRequest)
throws ResourceInUseException, ResourceNotFoundException, ConcurrentModificationException, AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new DisassociateFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(disassociateFleetRequest).withMarshaller(new DisassociateFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Immediately stops the specified streaming session.
*
*
* @param expireSessionRequest
* @return Result of the ExpireSession operation returned by the service.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.ExpireSession
* @see AWS API
* Documentation
*/
@Override
public ExpireSessionResponse expireSession(ExpireSessionRequest expireSessionRequest) throws AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ExpireSessionResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(expireSessionRequest).withMarshaller(new ExpireSessionRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves the name of the fleet that is associated with the specified stack.
*
*
* @param listAssociatedFleetsRequest
* @return Result of the ListAssociatedFleets operation returned by the service.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.ListAssociatedFleets
* @see AWS
* API Documentation
*/
@Override
public ListAssociatedFleetsResponse listAssociatedFleets(ListAssociatedFleetsRequest listAssociatedFleetsRequest)
throws AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListAssociatedFleetsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listAssociatedFleetsRequest)
.withMarshaller(new ListAssociatedFleetsRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves the name of the stack with which the specified fleet is associated.
*
*
* @param listAssociatedStacksRequest
* @return Result of the ListAssociatedStacks operation returned by the service.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.ListAssociatedStacks
* @see AWS
* API Documentation
*/
@Override
public ListAssociatedStacksResponse listAssociatedStacks(ListAssociatedStacksRequest listAssociatedStacksRequest)
throws AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListAssociatedStacksResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listAssociatedStacksRequest)
.withMarshaller(new ListAssociatedStacksRequestMarshaller(protocolFactory)));
}
/**
*
* Retrieves a list of all tags for the specified AppStream 2.0 resource. You can tag AppStream 2.0 image builders,
* images, fleets, and stacks.
*
*
* For more information about tags, see Tagging Your Resources
* in the Amazon AppStream 2.0 Developer Guide.
*
*
* @param listTagsForResourceRequest
* @return Result of the ListTagsForResource operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.ListTagsForResource
* @see AWS
* API Documentation
*/
@Override
public ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest)
throws ResourceNotFoundException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new ListTagsForResourceResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(listTagsForResourceRequest).withMarshaller(new ListTagsForResourceRequestMarshaller(protocolFactory)));
}
/**
*
* Starts the specified fleet.
*
*
* @param startFleetRequest
* @return Result of the StartFleet operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.StartFleet
* @see AWS API
* Documentation
*/
@Override
public StartFleetResponse startFleet(StartFleetRequest startFleetRequest) throws ResourceNotFoundException,
OperationNotPermittedException, LimitExceededException, InvalidAccountStatusException,
ConcurrentModificationException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StartFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler).withInput(startFleetRequest)
.withMarshaller(new StartFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Starts the specified image builder.
*
*
* @param startImageBuilderRequest
* @return Result of the StartImageBuilder operation returned by the service.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.StartImageBuilder
* @see AWS
* API Documentation
*/
@Override
public StartImageBuilderResponse startImageBuilder(StartImageBuilderRequest startImageBuilderRequest)
throws ResourceNotAvailableException, ResourceNotFoundException, ConcurrentModificationException,
InvalidAccountStatusException, IncompatibleImageException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StartImageBuilderResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(startImageBuilderRequest).withMarshaller(new StartImageBuilderRequestMarshaller(protocolFactory)));
}
/**
*
* Stops the specified fleet.
*
*
* @param stopFleetRequest
* @return Result of the StopFleet operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.StopFleet
* @see AWS API
* Documentation
*/
@Override
public StopFleetResponse stopFleet(StopFleetRequest stopFleetRequest) throws ResourceNotFoundException,
ConcurrentModificationException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StopFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler).withInput(stopFleetRequest)
.withMarshaller(new StopFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Stops the specified image builder.
*
*
* @param stopImageBuilderRequest
* @return Result of the StopImageBuilder operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.StopImageBuilder
* @see AWS API
* Documentation
*/
@Override
public StopImageBuilderResponse stopImageBuilder(StopImageBuilderRequest stopImageBuilderRequest)
throws ResourceNotFoundException, OperationNotPermittedException, ConcurrentModificationException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new StopImageBuilderResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(stopImageBuilderRequest).withMarshaller(new StopImageBuilderRequestMarshaller(protocolFactory)));
}
/**
*
* Adds or overwrites one or more tags for the specified AppStream 2.0 resource. You can tag AppStream 2.0 image
* builders, images, fleets, and stacks.
*
*
* Each tag consists of a key and an optional value. If a resource already has a tag with the same key, this
* operation updates its value.
*
*
* To list the current tags for your resources, use ListTagsForResource. To disassociate tags from your
* resources, use UntagResource.
*
*
* For more information about tags, see Tagging Your Resources
* in the Amazon AppStream 2.0 Developer Guide.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.TagResource
* @see AWS API
* Documentation
*/
@Override
public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws LimitExceededException,
InvalidAccountStatusException, ResourceNotFoundException, AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new TagResourceResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(tagResourceRequest).withMarshaller(new TagResourceRequestMarshaller(protocolFactory)));
}
/**
*
* Disassociates one or more specified tags from the specified AppStream 2.0 resource.
*
*
* To list the current tags for your resources, use ListTagsForResource.
*
*
* For more information about tags, see Tagging Your Resources
* in the Amazon AppStream 2.0 Developer Guide.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.UntagResource
* @see AWS API
* Documentation
*/
@Override
public UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException,
AwsServiceException, SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UntagResourceResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(untagResourceRequest).withMarshaller(new UntagResourceRequestMarshaller(protocolFactory)));
}
/**
*
* Updates the specified Directory Config object in AppStream 2.0. This object includes the information required to
* join streaming instances to an Active Directory domain.
*
*
* @param updateDirectoryConfigRequest
* @return Result of the UpdateDirectoryConfig operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.UpdateDirectoryConfig
* @see AWS API Documentation
*/
@Override
public UpdateDirectoryConfigResponse updateDirectoryConfig(UpdateDirectoryConfigRequest updateDirectoryConfigRequest)
throws ResourceInUseException, ResourceNotFoundException, ConcurrentModificationException, AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateDirectoryConfigResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateDirectoryConfigRequest)
.withMarshaller(new UpdateDirectoryConfigRequestMarshaller(protocolFactory)));
}
/**
*
* Updates the specified fleet.
*
*
* If the fleet is in the STOPPED
state, you can update any attribute except the fleet name. If the
* fleet is in the RUNNING
state, you can update the DisplayName
and
* ComputeCapacity
attributes. If the fleet is in the STARTING
or STOPPING
* state, you can't update it.
*
*
* @param updateFleetRequest
* @return Result of the UpdateFleet operation returned by the service.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws InvalidRoleException
* The specified role is invalid.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @throws ConcurrentModificationException
* An API error occurred. Wait a few minutes and try again.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.UpdateFleet
* @see AWS API
* Documentation
*/
@Override
public UpdateFleetResponse updateFleet(UpdateFleetRequest updateFleetRequest) throws ResourceInUseException,
LimitExceededException, InvalidAccountStatusException, InvalidRoleException, ResourceNotFoundException,
ResourceNotAvailableException, InvalidParameterCombinationException, ConcurrentModificationException,
IncompatibleImageException, OperationNotPermittedException, AwsServiceException, SdkClientException,
AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateFleetResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateFleetRequest).withMarshaller(new UpdateFleetRequestMarshaller(protocolFactory)));
}
/**
*
* Adds or updates permissions for the specified private image.
*
*
* @param updateImagePermissionsRequest
* @return Result of the UpdateImagePermissions operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ResourceNotAvailableException
* The specified resource exists and is not in use, but isn't available.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.UpdateImagePermissions
* @see AWS API Documentation
*/
@Override
public UpdateImagePermissionsResponse updateImagePermissions(UpdateImagePermissionsRequest updateImagePermissionsRequest)
throws ResourceNotFoundException, ResourceNotAvailableException, LimitExceededException, AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateImagePermissionsResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateImagePermissionsRequest)
.withMarshaller(new UpdateImagePermissionsRequestMarshaller(protocolFactory)));
}
/**
*
* Updates the specified fields for the specified stack.
*
*
* @param updateStackRequest
* @return Result of the UpdateStack operation returned by the service.
* @throws ResourceNotFoundException
* The specified resource was not found.
* @throws ResourceInUseException
* The specified resource is in use.
* @throws InvalidRoleException
* The specified role is invalid.
* @throws InvalidParameterCombinationException
* Indicates an incorrect combination of parameters, or a missing parameter.
* @throws LimitExceededException
* The requested limit exceeds the permitted limit for an account.
* @throws InvalidAccountStatusException
* The resource cannot be created because your AWS account is suspended. For assistance, contact AWS
* Support.
* @throws IncompatibleImageException
* The image does not support storage connectors.
* @throws OperationNotPermittedException
* The attempted operation is not permitted.
* @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 AppStreamException
* Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample AppStreamClient.UpdateStack
* @see AWS API
* Documentation
*/
@Override
public UpdateStackResponse updateStack(UpdateStackRequest updateStackRequest) throws ResourceNotFoundException,
ResourceInUseException, InvalidRoleException, InvalidParameterCombinationException, LimitExceededException,
InvalidAccountStatusException, IncompatibleImageException, OperationNotPermittedException, AwsServiceException,
SdkClientException, AppStreamException {
HttpResponseHandler responseHandler = protocolFactory.createResponseHandler(
new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false),
new UpdateStackResponseUnmarshaller());
HttpResponseHandler errorResponseHandler = createErrorResponseHandler(protocolFactory);
return clientHandler.execute(new ClientExecutionParams()
.withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)
.withInput(updateStackRequest).withMarshaller(new UpdateStackRequestMarshaller(protocolFactory)));
}
private HttpResponseHandler createErrorResponseHandler(AwsJsonProtocolFactory protocolFactory) {
return protocolFactory.createErrorResponseHandler(new JsonErrorResponseMetadata());
}
private software.amazon.awssdk.awscore.protocol.json.AwsJsonProtocolFactory init(boolean supportsCbor) {
return new AwsJsonProtocolFactory(new JsonClientMetadata()
.withSupportsCbor(supportsCbor)
.withSupportsIon(false)
.withBaseServiceExceptionClass(software.amazon.awssdk.services.appstream.model.AppStreamException.class)
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ConcurrentModificationException").withModeledClass(
ConcurrentModificationException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceInUseException").withModeledClass(
ResourceInUseException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("IncompatibleImageException").withModeledClass(
IncompatibleImageException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotAvailableException").withModeledClass(
ResourceNotAvailableException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidAccountStatusException").withModeledClass(
InvalidAccountStatusException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("OperationNotPermittedException").withModeledClass(
OperationNotPermittedException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("LimitExceededException").withModeledClass(
LimitExceededException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceNotFoundException").withModeledClass(
ResourceNotFoundException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidRoleException").withModeledClass(
InvalidRoleException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("InvalidParameterCombinationException").withModeledClass(
InvalidParameterCombinationException.class))
.addErrorMetadata(
new JsonErrorShapeMetadata().withErrorCode("ResourceAlreadyExistsException").withModeledClass(
ResourceAlreadyExistsException.class)), AwsJsonProtocolMetadata.builder().protocolVersion("1.1")
.protocol(AwsJsonProtocol.AWS_JSON).build());
}
@Override
public void close() {
clientHandler.close();
}
}