Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.workspaces;
 
 
 
Asynchronous client for accessing AmazonWorkspaces. All asynchronous calls made using this client are non-blocking. Callers could either process the result and handle the exceptions in the worker thread by providing a callback handler when making the call, or use the returned Future object to check the result of the call in the calling thread. Amazon WorkSpaces Service

This is the Amazon WorkSpaces API Reference . This guide provides detailed information about Amazon WorkSpaces operations, data types, parameters, and errors.

 
         implements AmazonWorkspacesAsync {

    
Executor service for executing asynchronous requests.
 
     private ExecutorService executorService;
 
     private static final int DEFAULT_THREAD_POOL_SIZE = 50;

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces. A credentials provider chain will be used that searches for credentials in this order:
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

 
     public AmazonWorkspacesAsyncClient() {
         this(new DefaultAWSCredentialsProviderChain());
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces. A credentials provider chain will be used that searches for credentials in this order:
  • Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  • Java System Properties - aws.accessKeyId and aws.secretKey
  • Instance profile credentials delivered through the Amazon EC2 metadata service

All service calls made using this new client object are blocking, and will not return until the service call completes.

Parameters:
clientConfiguration The client configuration options controlling how this client connects to AmazonWorkspaces (ex: proxy settings, retry counts, etc.).
See also:
com.amazonaws.auth.DefaultAWSCredentialsProviderChain
 
     public AmazonWorkspacesAsyncClient(ClientConfiguration clientConfiguration) {
         this(new DefaultAWSCredentialsProviderChain(), clientConfiguration, Executors.newFixedThreadPool(clientConfiguration.getMaxConnections()));
     }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials. Default client settings will be used, and a fixed size thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
    public AmazonWorkspacesAsyncClient(AWSCredentials awsCredentials) {
        this(awsCredentials, Executors.newFixedThreadPool());
    }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
executorService The executor service by which all asynchronous requests will be executed.
    public AmazonWorkspacesAsyncClient(AWSCredentials awsCredentialsExecutorService executorService) {
        super(awsCredentials);
        this. = executorService;
    }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
clientConfiguration Client configuration options (ex: max retry limit, proxy settings, etc).
executorService The executor service by which all asynchronous requests will be executed.
    public AmazonWorkspacesAsyncClient(AWSCredentials awsCredentials,
                ClientConfiguration clientConfigurationExecutorService executorService) {
        super(awsCredentialsclientConfiguration);
        this. = executorService;
    }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials provider. Default client settings will be used, and a fixed size thread pool will be created for executing the asynchronous tasks.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
    public AmazonWorkspacesAsyncClient(AWSCredentialsProvider awsCredentialsProvider) {
        this(awsCredentialsProvider, Executors.newFixedThreadPool());
    }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials provider and executor service. Default client settings will be used.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
executorService The executor service by which all asynchronous requests will be executed.
    public AmazonWorkspacesAsyncClient(AWSCredentialsProvider awsCredentialsProviderExecutorService executorService) {
        this(awsCredentialsProvidernew ClientConfiguration(), executorService);
    }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials provider and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration Client configuration options (ex: max retry limit, proxy settings, etc).
    public AmazonWorkspacesAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                ClientConfiguration clientConfiguration) {
        this(awsCredentialsProviderclientConfiguration, Executors.newFixedThreadPool(clientConfiguration.getMaxConnections()));
    }

    
Constructs a new asynchronous client to invoke service methods on AmazonWorkspaces using the specified AWS account credentials provider, executor service, and client configuration options.

All calls made using this new client object are non-blocking, and will immediately return a Java Future object that the caller can later check to see if the service call has actually completed.

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration Client configuration options (ex: max retry limit, proxy settings, etc).
executorService The executor service by which all asynchronous requests will be executed.
    public AmazonWorkspacesAsyncClient(AWSCredentialsProvider awsCredentialsProvider,
                ClientConfiguration clientConfigurationExecutorService executorService) {
        super(awsCredentialsProviderclientConfiguration);
        this. = executorService;
    }

    
Returns the executor service used by this async client to execute requests.

Returns:
The executor service used by this async client to execute requests.
        return ;
    }

    
Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should call getExecutorService().shutdown() followed by getExecutorService().awaitTermination() prior to calling this method.
    @Override
    public void shutdown() {
        super.shutdown();
        .shutdownNow();
    }
            
    

Creates one or more WorkSpaces.

NOTE: This operation is asynchronous and returns before the WorkSpaces are created.

Parameters:
createWorkspacesRequest Container for the necessary parameters to execute the CreateWorkspaces operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the CreateWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
    public Future<CreateWorkspacesResultcreateWorkspacesAsync(final CreateWorkspacesRequest createWorkspacesRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<CreateWorkspacesResult>() {
            public CreateWorkspacesResult call() throws Exception {
                return createWorkspaces(createWorkspacesRequest);
        }
    });
    }

    

Creates one or more WorkSpaces.

NOTE: This operation is asynchronous and returns before the WorkSpaces are created.

Parameters:
createWorkspacesRequest Container for the necessary parameters to execute the CreateWorkspaces operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the CreateWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final CreateWorkspacesRequest createWorkspacesRequest,
            final AsyncHandler<CreateWorkspacesRequestCreateWorkspacesResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<CreateWorkspacesResult>() {
            public CreateWorkspacesResult call() throws Exception {
              CreateWorkspacesResult result;
                try {
                result = createWorkspaces(createWorkspacesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(createWorkspacesRequestresult);
                 return result;
        }
    });
    }
    
    

Obtains information about the WorkSpace bundles that are available to your account in the specified region.

You can filter the results with either the BundleIds parameter, or the Owner parameter, but not both.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Parameters:
describeWorkspaceBundlesRequest Container for the necessary parameters to execute the DescribeWorkspaceBundles operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the DescribeWorkspaceBundles service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            throws AmazonServiceExceptionAmazonClientException {
            public DescribeWorkspaceBundlesResult call() throws Exception {
                return describeWorkspaceBundles(describeWorkspaceBundlesRequest);
        }
    });
    }

    

Obtains information about the WorkSpace bundles that are available to your account in the specified region.

You can filter the results with either the BundleIds parameter, or the Owner parameter, but not both.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Parameters:
describeWorkspaceBundlesRequest Container for the necessary parameters to execute the DescribeWorkspaceBundles operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DescribeWorkspaceBundles service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final DescribeWorkspaceBundlesRequest describeWorkspaceBundlesRequest,
            final AsyncHandler<DescribeWorkspaceBundlesRequestDescribeWorkspaceBundlesResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
            public DescribeWorkspaceBundlesResult call() throws Exception {
              DescribeWorkspaceBundlesResult result;
                try {
                result = describeWorkspaceBundles(describeWorkspaceBundlesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(describeWorkspaceBundlesRequestresult);
                 return result;
        }
    });
    }
    
    

Reboots the specified WorkSpaces.

To be able to reboot a WorkSpace, the WorkSpace must have a State of AVAILABLE , IMPAIRED , or INOPERABLE .

NOTE: This operation is asynchronous and will return before the WorkSpaces have rebooted.

Parameters:
rebootWorkspacesRequest Container for the necessary parameters to execute the RebootWorkspaces operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the RebootWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
    public Future<RebootWorkspacesResultrebootWorkspacesAsync(final RebootWorkspacesRequest rebootWorkspacesRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<RebootWorkspacesResult>() {
            public RebootWorkspacesResult call() throws Exception {
                return rebootWorkspaces(rebootWorkspacesRequest);
        }
    });
    }

    

Reboots the specified WorkSpaces.

To be able to reboot a WorkSpace, the WorkSpace must have a State of AVAILABLE , IMPAIRED , or INOPERABLE .

NOTE: This operation is asynchronous and will return before the WorkSpaces have rebooted.

Parameters:
rebootWorkspacesRequest Container for the necessary parameters to execute the RebootWorkspaces operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the RebootWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final RebootWorkspacesRequest rebootWorkspacesRequest,
            final AsyncHandler<RebootWorkspacesRequestRebootWorkspacesResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<RebootWorkspacesResult>() {
            public RebootWorkspacesResult call() throws Exception {
              RebootWorkspacesResult result;
                try {
                result = rebootWorkspaces(rebootWorkspacesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(rebootWorkspacesRequestresult);
                 return result;
        }
    });
    }
    
    

Obtains information about the specified WorkSpaces.

Only one of the filter parameters, such as BundleId , DirectoryId , or WorkspaceIds , can be specified at a time.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Parameters:
describeWorkspacesRequest Container for the necessary parameters to execute the DescribeWorkspaces operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the DescribeWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
    public Future<DescribeWorkspacesResultdescribeWorkspacesAsync(final DescribeWorkspacesRequest describeWorkspacesRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<DescribeWorkspacesResult>() {
            public DescribeWorkspacesResult call() throws Exception {
                return describeWorkspaces(describeWorkspacesRequest);
        }
    });
    }

    

Obtains information about the specified WorkSpaces.

Only one of the filter parameters, such as BundleId , DirectoryId , or WorkspaceIds , can be specified at a time.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Parameters:
describeWorkspacesRequest Container for the necessary parameters to execute the DescribeWorkspaces operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DescribeWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final DescribeWorkspacesRequest describeWorkspacesRequest,
            final AsyncHandler<DescribeWorkspacesRequestDescribeWorkspacesResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<DescribeWorkspacesResult>() {
            public DescribeWorkspacesResult call() throws Exception {
              DescribeWorkspacesResult result;
                try {
                result = describeWorkspaces(describeWorkspacesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(describeWorkspacesRequestresult);
                 return result;
        }
    });
    }
    
    

Retrieves information about the AWS Directory Service directories in the region that are registered with Amazon WorkSpaces and are available to your account.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Parameters:
describeWorkspaceDirectoriesRequest Container for the necessary parameters to execute the DescribeWorkspaceDirectories operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the DescribeWorkspaceDirectories service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            throws AmazonServiceExceptionAmazonClientException {
            public DescribeWorkspaceDirectoriesResult call() throws Exception {
                return describeWorkspaceDirectories(describeWorkspaceDirectoriesRequest);
        }
    });
    }

    

Retrieves information about the AWS Directory Service directories in the region that are registered with Amazon WorkSpaces and are available to your account.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the NextToken response member contains a token that you pass in the next call to this operation to retrieve the next set of items.

Parameters:
describeWorkspaceDirectoriesRequest Container for the necessary parameters to execute the DescribeWorkspaceDirectories operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the DescribeWorkspaceDirectories service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final DescribeWorkspaceDirectoriesRequest describeWorkspaceDirectoriesRequest,
                    throws AmazonServiceExceptionAmazonClientException {
            public DescribeWorkspaceDirectoriesResult call() throws Exception {
              DescribeWorkspaceDirectoriesResult result;
                try {
                result = describeWorkspaceDirectories(describeWorkspaceDirectoriesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(describeWorkspaceDirectoriesRequestresult);
                 return result;
        }
    });
    }
    
    

Rebuilds the specified WorkSpaces.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. Rebuilding a WorkSpace causes the following to occur:

  • The system is restored to the image of the bundle that the WorkSpace is created from. Any applications that have been installed, or system settings that have been made since the WorkSpace was created will be lost.
  • The data drive (D drive) is re-created from the last automatic snapshot taken of the data drive. The current contents of the data drive are overwritten. Automatic snapshots of the data drive are taken every 12 hours, so the snapshot can be as much as 12 hours old.

To be able to rebuild a WorkSpace, the WorkSpace must have a State of AVAILABLE or ERROR .

NOTE: This operation is asynchronous and will return before the WorkSpaces have been completely rebuilt.

Parameters:
rebuildWorkspacesRequest Container for the necessary parameters to execute the RebuildWorkspaces operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the RebuildWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
    public Future<RebuildWorkspacesResultrebuildWorkspacesAsync(final RebuildWorkspacesRequest rebuildWorkspacesRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<RebuildWorkspacesResult>() {
            public RebuildWorkspacesResult call() throws Exception {
                return rebuildWorkspaces(rebuildWorkspacesRequest);
        }
    });
    }

    

Rebuilds the specified WorkSpaces.

Rebuilding a WorkSpace is a potentially destructive action that can result in the loss of data. Rebuilding a WorkSpace causes the following to occur:

  • The system is restored to the image of the bundle that the WorkSpace is created from. Any applications that have been installed, or system settings that have been made since the WorkSpace was created will be lost.
  • The data drive (D drive) is re-created from the last automatic snapshot taken of the data drive. The current contents of the data drive are overwritten. Automatic snapshots of the data drive are taken every 12 hours, so the snapshot can be as much as 12 hours old.

To be able to rebuild a WorkSpace, the WorkSpace must have a State of AVAILABLE or ERROR .

NOTE: This operation is asynchronous and will return before the WorkSpaces have been completely rebuilt.

Parameters:
rebuildWorkspacesRequest Container for the necessary parameters to execute the RebuildWorkspaces operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the RebuildWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final RebuildWorkspacesRequest rebuildWorkspacesRequest,
            final AsyncHandler<RebuildWorkspacesRequestRebuildWorkspacesResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<RebuildWorkspacesResult>() {
            public RebuildWorkspacesResult call() throws Exception {
              RebuildWorkspacesResult result;
                try {
                result = rebuildWorkspaces(rebuildWorkspacesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(rebuildWorkspacesRequestresult);
                 return result;
        }
    });
    }
    
    

Terminates the specified WorkSpaces.

Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is not maintained and will be destroyed. If you need to archive any user data, contact Amazon Web Services before terminating the WorkSpace.

You can terminate a WorkSpace that is in any state except SUSPENDED .

NOTE: This operation is asynchronous and will return before the WorkSpaces have been completely terminated.

Parameters:
terminateWorkspacesRequest Container for the necessary parameters to execute the TerminateWorkspaces operation on AmazonWorkspaces.
Returns:
A Java Future object containing the response from the TerminateWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
    public Future<TerminateWorkspacesResultterminateWorkspacesAsync(final TerminateWorkspacesRequest terminateWorkspacesRequest
            throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<TerminateWorkspacesResult>() {
            public TerminateWorkspacesResult call() throws Exception {
                return terminateWorkspaces(terminateWorkspacesRequest);
        }
    });
    }

    

Terminates the specified WorkSpaces.

Terminating a WorkSpace is a permanent action and cannot be undone. The user's data is not maintained and will be destroyed. If you need to archive any user data, contact Amazon Web Services before terminating the WorkSpace.

You can terminate a WorkSpace that is in any state except SUSPENDED .

NOTE: This operation is asynchronous and will return before the WorkSpaces have been completely terminated.

Parameters:
terminateWorkspacesRequest Container for the necessary parameters to execute the TerminateWorkspaces operation on AmazonWorkspaces.
asyncHandler Asynchronous callback handler for events in the life-cycle of the request. Users could provide the implementation of the four callback methods in this interface to process the operation result or handle the exception.
Returns:
A Java Future object containing the response from the TerminateWorkspaces service method, as returned by AmazonWorkspaces.
Throws:
com.amazonaws.AmazonClientException If any internal errors are encountered inside the client while attempting to make the request or handle the response. For example if a network connection is not available.
com.amazonaws.AmazonServiceException If an error response is returned by AmazonWorkspaces indicating either a problem with the data in the request, or a server side issue.
            final TerminateWorkspacesRequest terminateWorkspacesRequest,
            final AsyncHandler<TerminateWorkspacesRequestTerminateWorkspacesResultasyncHandler)
                    throws AmazonServiceExceptionAmazonClientException {
        return .submit(new Callable<TerminateWorkspacesResult>() {
            public TerminateWorkspacesResult call() throws Exception {
              TerminateWorkspacesResult result;
                try {
                result = terminateWorkspaces(terminateWorkspacesRequest);
              } catch (Exception ex) {
                  asyncHandler.onError(ex);
            throw ex;
              }
              asyncHandler.onSuccess(terminateWorkspacesRequestresult);
                 return result;
        }
    });
    }
    
}
        
New to GrepCode? Check out our FAQ X