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.cloudhsm;
  
  import java.net.*;
  import java.util.*;
  
  
  import com.amazonaws.*;
  
Client for accessing AWSCloudHSM. All service calls made using this client are blocking, and will not return until the service call completes.

AWS CloudHSM Service

  
  public class AWSCloudHSMClient extends AmazonWebServiceClient implements AWSCloudHSM {

    
Provider for AWS credentials.
  
  
      private static final Log log = LogFactory.getLog(AWSCloudHSM.class);

    
List of exception unmarshallers for all AWSCloudHSM exceptions.
  
      protected List<JsonErrorUnmarshallerjsonErrorUnmarshallers;

    
Constructs a new client to invoke service methods on AWSCloudHSM. 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 AWSCloudHSMClient() {
          this(new DefaultAWSCredentialsProviderChain(), new ClientConfiguration());
      }

    
Constructs a new client to invoke service methods on AWSCloudHSM. 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 AWSCloudHSM (ex: proxy settings, retry counts, etc.).
See also:
com.amazonaws.auth.DefaultAWSCredentialsProviderChain
  
      public AWSCloudHSMClient(ClientConfiguration clientConfiguration) {
          this(new DefaultAWSCredentialsProviderChain(), clientConfiguration);
      }

    
Constructs a new client to invoke service methods on AWSCloudHSM using the specified AWS account credentials.

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

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
 
     public AWSCloudHSMClient(AWSCredentials awsCredentials) {
         this(awsCredentialsnew ClientConfiguration());
     }

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

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

Parameters:
awsCredentials The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.
clientConfiguration The client configuration options controlling how this client connects to AWSCloudHSM (ex: proxy settings, retry counts, etc.).
 
     public AWSCloudHSMClient(AWSCredentials awsCredentialsClientConfiguration clientConfiguration) {
         super(adjustClientConfiguration(clientConfiguration));
         
         this. = new StaticCredentialsProvider(awsCredentials);
         
         init();
     }

    
Constructs a new client to invoke service methods on AWSCloudHSM using the specified AWS account credentials provider.

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

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
 
     public AWSCloudHSMClient(AWSCredentialsProvider awsCredentialsProvider) {
         this(awsCredentialsProvidernew ClientConfiguration());
     }

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

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

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration The client configuration options controlling how this client connects to AWSCloudHSM (ex: proxy settings, retry counts, etc.).
 
     public AWSCloudHSMClient(AWSCredentialsProvider awsCredentialsProviderClientConfiguration clientConfiguration) {
         this(awsCredentialsProviderclientConfigurationnull);
     }

    
Constructs a new client to invoke service methods on AWSCloudHSM using the specified AWS account credentials provider, client configuration options and request metric collector.

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

Parameters:
awsCredentialsProvider The AWS credentials provider which will provide credentials to authenticate requests with AWS services.
clientConfiguration The client configuration options controlling how this client connects to AWSCloudHSM (ex: proxy settings, retry counts, etc.).
requestMetricCollector optional request metric collector
 
     public AWSCloudHSMClient(AWSCredentialsProvider awsCredentialsProvider,
             ClientConfiguration clientConfiguration,
             RequestMetricCollector requestMetricCollector) {
         super(adjustClientConfiguration(clientConfiguration), requestMetricCollector);
         
         this. = awsCredentialsProvider;
         
         init();
     }
 
     private void init() {
         
         
         // calling this.setEndPoint(...) will also modify the signer accordingly
         this.setEndpoint("cloudhsm.us-east-1.amazonaws.com/");
         
         HandlerChainFactory chainFactory = new HandlerChainFactory();
         .addAll(chainFactory.newRequestHandlerChain(
                 "/com/amazonaws/services/cloudhsm/request.handlers"));
         .addAll(chainFactory.newRequestHandler2Chain(
                 "/com/amazonaws/services/cloudhsm/request.handler2s"));
     }
 
         ClientConfiguration config = orig;
         
         return config;
     }

    

Gets the configuration files necessary to connect to all high availability partition groups the client is associated with.

Parameters:
getConfigRequest Container for the necessary parameters to execute the GetConfig service method on AWSCloudHSM.
Returns:
The response from the GetConfig service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public GetConfigResult getConfig(GetConfigRequest getConfigRequest) {
         ExecutionContext executionContext = createExecutionContext(getConfigRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<GetConfigRequestrequest = null;
         Response<GetConfigResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new GetConfigRequestMarshaller().marshall(super.beforeMarshalling(getConfigRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<GetConfigResultJsonUnmarshallerContextunmarshaller =
                 new GetConfigResultJsonUnmarshaller();
             JsonResponseHandler<GetConfigResultresponseHandler =
                 new JsonResponseHandler<GetConfigResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Creates a high-availability partition group. A high-availability partition group is a group of partitions that spans multiple physical HSMs.

Parameters:
createHapgRequest Container for the necessary parameters to execute the CreateHapg service method on AWSCloudHSM.
Returns:
The response from the CreateHapg service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public CreateHapgResult createHapg(CreateHapgRequest createHapgRequest) {
         ExecutionContext executionContext = createExecutionContext(createHapgRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<CreateHapgRequestrequest = null;
         Response<CreateHapgResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new CreateHapgRequestMarshaller().marshall(super.beforeMarshalling(createHapgRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<CreateHapgResultJsonUnmarshallerContextunmarshaller =
                 new CreateHapgResultJsonUnmarshaller();
             JsonResponseHandler<CreateHapgResultresponseHandler =
                 new JsonResponseHandler<CreateHapgResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Retrieves information about a high-availability partition group.

Parameters:
describeHapgRequest Container for the necessary parameters to execute the DescribeHapg service method on AWSCloudHSM.
Returns:
The response from the DescribeHapg service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public DescribeHapgResult describeHapg(DescribeHapgRequest describeHapgRequest) {
         ExecutionContext executionContext = createExecutionContext(describeHapgRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<DescribeHapgRequestrequest = null;
         Response<DescribeHapgResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new DescribeHapgRequestMarshaller().marshall(super.beforeMarshalling(describeHapgRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<DescribeHapgResultJsonUnmarshallerContextunmarshaller =
                 new DescribeHapgResultJsonUnmarshaller();
             JsonResponseHandler<DescribeHapgResultresponseHandler =
                 new JsonResponseHandler<DescribeHapgResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Lists the Availability Zones that have available AWS CloudHSM capacity.

Parameters:
listAvailableZonesRequest Container for the necessary parameters to execute the ListAvailableZones service method on AWSCloudHSM.
Returns:
The response from the ListAvailableZones service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public ListAvailableZonesResult listAvailableZones(ListAvailableZonesRequest listAvailableZonesRequest) {
         ExecutionContext executionContext = createExecutionContext(listAvailableZonesRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<ListAvailableZonesRequestrequest = null;
         Response<ListAvailableZonesResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new ListAvailableZonesRequestMarshaller().marshall(super.beforeMarshalling(listAvailableZonesRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<ListAvailableZonesResultJsonUnmarshallerContextunmarshaller =
                 new ListAvailableZonesResultJsonUnmarshaller();
             JsonResponseHandler<ListAvailableZonesResultresponseHandler =
                 new JsonResponseHandler<ListAvailableZonesResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Modifies an HSM.

Parameters:
modifyHsmRequest Container for the necessary parameters to execute the ModifyHsm service method on AWSCloudHSM.
Returns:
The response from the ModifyHsm service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public ModifyHsmResult modifyHsm(ModifyHsmRequest modifyHsmRequest) {
         ExecutionContext executionContext = createExecutionContext(modifyHsmRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<ModifyHsmRequestrequest = null;
         Response<ModifyHsmResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new ModifyHsmRequestMarshaller().marshall(super.beforeMarshalling(modifyHsmRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<ModifyHsmResultJsonUnmarshallerContextunmarshaller =
                 new ModifyHsmResultJsonUnmarshaller();
             JsonResponseHandler<ModifyHsmResultresponseHandler =
                 new JsonResponseHandler<ModifyHsmResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Lists all of the clients.

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

Parameters:
listLunaClientsRequest Container for the necessary parameters to execute the ListLunaClients service method on AWSCloudHSM.
Returns:
The response from the ListLunaClients service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public ListLunaClientsResult listLunaClients(ListLunaClientsRequest listLunaClientsRequest) {
         ExecutionContext executionContext = createExecutionContext(listLunaClientsRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<ListLunaClientsRequestrequest = null;
         Response<ListLunaClientsResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new ListLunaClientsRequestMarshaller().marshall(super.beforeMarshalling(listLunaClientsRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<ListLunaClientsResultJsonUnmarshallerContextunmarshaller =
                 new ListLunaClientsResultJsonUnmarshaller();
             JsonResponseHandler<ListLunaClientsResultresponseHandler =
                 new JsonResponseHandler<ListLunaClientsResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Lists the high-availability partition groups for the account.

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

Parameters:
listHapgsRequest Container for the necessary parameters to execute the ListHapgs service method on AWSCloudHSM.
Returns:
The response from the ListHapgs service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public ListHapgsResult listHapgs(ListHapgsRequest listHapgsRequest) {
         ExecutionContext executionContext = createExecutionContext(listHapgsRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<ListHapgsRequestrequest = null;
         Response<ListHapgsResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new ListHapgsRequestMarshaller().marshall(super.beforeMarshalling(listHapgsRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<ListHapgsResultJsonUnmarshallerContextunmarshaller =
                 new ListHapgsResultJsonUnmarshaller();
             JsonResponseHandler<ListHapgsResultresponseHandler =
                 new JsonResponseHandler<ListHapgsResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Deletes an HSM. Once complete, this operation cannot be undone and your key material cannot be recovered.

Parameters:
deleteHsmRequest Container for the necessary parameters to execute the DeleteHsm service method on AWSCloudHSM.
Returns:
The response from the DeleteHsm service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public DeleteHsmResult deleteHsm(DeleteHsmRequest deleteHsmRequest) {
         ExecutionContext executionContext = createExecutionContext(deleteHsmRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<DeleteHsmRequestrequest = null;
         Response<DeleteHsmResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new DeleteHsmRequestMarshaller().marshall(super.beforeMarshalling(deleteHsmRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<DeleteHsmResultJsonUnmarshallerContextunmarshaller =
                 new DeleteHsmResultJsonUnmarshaller();
             JsonResponseHandler<DeleteHsmResultresponseHandler =
                 new JsonResponseHandler<DeleteHsmResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Creates an uninitialized HSM instance. Running this command provisions an HSM appliance and will result in charges to your AWS account for the HSM.

Parameters:
createHsmRequest Container for the necessary parameters to execute the CreateHsm service method on AWSCloudHSM.
Returns:
The response from the CreateHsm service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public CreateHsmResult createHsm(CreateHsmRequest createHsmRequest) {
         ExecutionContext executionContext = createExecutionContext(createHsmRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<CreateHsmRequestrequest = null;
         Response<CreateHsmResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new CreateHsmRequestMarshaller().marshall(super.beforeMarshalling(createHsmRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<CreateHsmResultJsonUnmarshallerContextunmarshaller =
                 new CreateHsmResultJsonUnmarshaller();
             JsonResponseHandler<CreateHsmResultresponseHandler =
                 new JsonResponseHandler<CreateHsmResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Retrieves the identifiers of all of the HSMs provisioned for the current customer.

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

Parameters:
listHsmsRequest Container for the necessary parameters to execute the ListHsms service method on AWSCloudHSM.
Returns:
The response from the ListHsms service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public ListHsmsResult listHsms(ListHsmsRequest listHsmsRequest) {
         ExecutionContext executionContext = createExecutionContext(listHsmsRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<ListHsmsRequestrequest = null;
         Response<ListHsmsResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new ListHsmsRequestMarshaller().marshall(super.beforeMarshalling(listHsmsRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<ListHsmsResultJsonUnmarshallerContextunmarshaller =
                 new ListHsmsResultJsonUnmarshaller();
             JsonResponseHandler<ListHsmsResultresponseHandler =
                 new JsonResponseHandler<ListHsmsResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.

Parameters:
describeHsmRequest Container for the necessary parameters to execute the DescribeHsm service method on AWSCloudHSM.
Returns:
The response from the DescribeHsm service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public DescribeHsmResult describeHsm(DescribeHsmRequest describeHsmRequest) {
         ExecutionContext executionContext = createExecutionContext(describeHsmRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<DescribeHsmRequestrequest = null;
         Response<DescribeHsmResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new DescribeHsmRequestMarshaller().marshall(super.beforeMarshalling(describeHsmRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<DescribeHsmResultJsonUnmarshallerContextunmarshaller =
                 new DescribeHsmResultJsonUnmarshaller();
             JsonResponseHandler<DescribeHsmResultresponseHandler =
                 new JsonResponseHandler<DescribeHsmResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Deletes a high-availability partition group.

Parameters:
deleteHapgRequest Container for the necessary parameters to execute the DeleteHapg service method on AWSCloudHSM.
Returns:
The response from the DeleteHapg service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public DeleteHapgResult deleteHapg(DeleteHapgRequest deleteHapgRequest) {
         ExecutionContext executionContext = createExecutionContext(deleteHapgRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<DeleteHapgRequestrequest = null;
         Response<DeleteHapgResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new DeleteHapgRequestMarshaller().marshall(super.beforeMarshalling(deleteHapgRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<DeleteHapgResultJsonUnmarshallerContextunmarshaller =
                 new DeleteHapgResultJsonUnmarshaller();
             JsonResponseHandler<DeleteHapgResultresponseHandler =
                 new JsonResponseHandler<DeleteHapgResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Modifies an existing high-availability partition group.

Parameters:
modifyHapgRequest Container for the necessary parameters to execute the ModifyHapg service method on AWSCloudHSM.
Returns:
The response from the ModifyHapg service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public ModifyHapgResult modifyHapg(ModifyHapgRequest modifyHapgRequest) {
         ExecutionContext executionContext = createExecutionContext(modifyHapgRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<ModifyHapgRequestrequest = null;
         Response<ModifyHapgResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new ModifyHapgRequestMarshaller().marshall(super.beforeMarshalling(modifyHapgRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<ModifyHapgResultJsonUnmarshallerContextunmarshaller =
                 new ModifyHapgResultJsonUnmarshaller();
             JsonResponseHandler<ModifyHapgResultresponseHandler =
                 new JsonResponseHandler<ModifyHapgResult>(unmarshaller);
 
             response = invoke(requestresponseHandlerexecutionContext);
 
             return response.getAwsResponse();
         } finally {
             
             endClientExecution(awsRequestMetricsrequestresponse);
         }
     }

    

Creates an HSM client.

Parameters:
createLunaClientRequest Container for the necessary parameters to execute the CreateLunaClient service method on AWSCloudHSM.
Returns:
The response from the CreateLunaClient service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
 
     public CreateLunaClientResult createLunaClient(CreateLunaClientRequest createLunaClientRequest) {
         ExecutionContext executionContext = createExecutionContext(createLunaClientRequest);
         AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
         awsRequestMetrics.startEvent(.);
         Request<CreateLunaClientRequestrequest = null;
         Response<CreateLunaClientResultresponse = null;
         
         try {
             awsRequestMetrics.startEvent(.);
             try {
                 request = new CreateLunaClientRequestMarshaller().marshall(super.beforeMarshalling(createLunaClientRequest));
                 // Binds the request metrics to the current request.
                 request.setAWSRequestMetrics(awsRequestMetrics);
             } finally {
                 awsRequestMetrics.endEvent(.);
             }
 
             Unmarshaller<CreateLunaClientResultJsonUnmarshallerContextunmarshaller =
                 new CreateLunaClientResultJsonUnmarshaller();
             JsonResponseHandler<CreateLunaClientResultresponseHandler =
                 new JsonResponseHandler<CreateLunaClientResult>(unmarshaller);
            response = invoke(requestresponseHandlerexecutionContext);
            return response.getAwsResponse();
        } finally {
            
            endClientExecution(awsRequestMetricsrequestresponse);
        }
    }

    

Deletes a client.

Parameters:
deleteLunaClientRequest Container for the necessary parameters to execute the DeleteLunaClient service method on AWSCloudHSM.
Returns:
The response from the DeleteLunaClient service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
    public DeleteLunaClientResult deleteLunaClient(DeleteLunaClientRequest deleteLunaClientRequest) {
        ExecutionContext executionContext = createExecutionContext(deleteLunaClientRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(.);
        Request<DeleteLunaClientRequestrequest = null;
        Response<DeleteLunaClientResultresponse = null;
        
        try {
            awsRequestMetrics.startEvent(.);
            try {
                request = new DeleteLunaClientRequestMarshaller().marshall(super.beforeMarshalling(deleteLunaClientRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
            } finally {
                awsRequestMetrics.endEvent(.);
            }
            Unmarshaller<DeleteLunaClientResultJsonUnmarshallerContextunmarshaller =
                new DeleteLunaClientResultJsonUnmarshaller();
            JsonResponseHandler<DeleteLunaClientResultresponseHandler =
                new JsonResponseHandler<DeleteLunaClientResult>(unmarshaller);
            response = invoke(requestresponseHandlerexecutionContext);
            return response.getAwsResponse();
        } finally {
            
            endClientExecution(awsRequestMetricsrequestresponse);
        }
    }

    

Modifies the certificate used by the client.

This action can potentially start a workflow to install the new certificate on the client's HSMs.

Parameters:
modifyLunaClientRequest Container for the necessary parameters to execute the ModifyLunaClient service method on AWSCloudHSM.
Returns:
The response from the ModifyLunaClient service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
    public ModifyLunaClientResult modifyLunaClient(ModifyLunaClientRequest modifyLunaClientRequest) {
        ExecutionContext executionContext = createExecutionContext(modifyLunaClientRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(.);
        Request<ModifyLunaClientRequestrequest = null;
        Response<ModifyLunaClientResultresponse = null;
        
        try {
            awsRequestMetrics.startEvent(.);
            try {
                request = new ModifyLunaClientRequestMarshaller().marshall(super.beforeMarshalling(modifyLunaClientRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
            } finally {
                awsRequestMetrics.endEvent(.);
            }
            Unmarshaller<ModifyLunaClientResultJsonUnmarshallerContextunmarshaller =
                new ModifyLunaClientResultJsonUnmarshaller();
            JsonResponseHandler<ModifyLunaClientResultresponseHandler =
                new JsonResponseHandler<ModifyLunaClientResult>(unmarshaller);
            response = invoke(requestresponseHandlerexecutionContext);
            return response.getAwsResponse();
        } finally {
            
            endClientExecution(awsRequestMetricsrequestresponse);
        }
    }

    

Retrieves information about an HSM client.

Parameters:
describeLunaClientRequest Container for the necessary parameters to execute the DescribeLunaClient service method on AWSCloudHSM.
Returns:
The response from the DescribeLunaClient service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
    public DescribeLunaClientResult describeLunaClient(DescribeLunaClientRequest describeLunaClientRequest) {
        ExecutionContext executionContext = createExecutionContext(describeLunaClientRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(.);
        Request<DescribeLunaClientRequestrequest = null;
        Response<DescribeLunaClientResultresponse = null;
        
        try {
            awsRequestMetrics.startEvent(.);
            try {
                request = new DescribeLunaClientRequestMarshaller().marshall(super.beforeMarshalling(describeLunaClientRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
            } finally {
                awsRequestMetrics.endEvent(.);
            }
            Unmarshaller<DescribeLunaClientResultJsonUnmarshallerContextunmarshaller =
                new DescribeLunaClientResultJsonUnmarshaller();
            JsonResponseHandler<DescribeLunaClientResultresponseHandler =
                new JsonResponseHandler<DescribeLunaClientResult>(unmarshaller);
            response = invoke(requestresponseHandlerexecutionContext);
            return response.getAwsResponse();
        } finally {
            
            endClientExecution(awsRequestMetricsrequestresponse);
        }
    }

    

Lists the Availability Zones that have available AWS CloudHSM capacity.

Returns:
The response from the ListAvailableZones service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
        return listAvailableZones(new ListAvailableZonesRequest());
    }
    
    

Lists all of the clients.

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

Returns:
The response from the ListLunaClients service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
        return listLunaClients(new ListLunaClientsRequest());
    }
    
    

Lists the high-availability partition groups for the account.

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

Returns:
The response from the ListHapgs service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
        return listHapgs(new ListHapgsRequest());
    }
    
    

Retrieves the identifiers of all of the HSMs provisioned for the current customer.

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

Returns:
The response from the ListHsms service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
        return listHsms(new ListHsmsRequest());
    }
    
    

Retrieves information about an HSM. You can identify the HSM by its ARN or its serial number.

Returns:
The response from the DescribeHsm service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
        return describeHsm(new DescribeHsmRequest());
    }
    
    

Retrieves information about an HSM client.

Returns:
The response from the DescribeLunaClient service method, as returned by AWSCloudHSM.
Throws:
com.amazonaws.services.cloudhsm.model.InvalidRequestException
com.amazonaws.services.cloudhsm.model.CloudHsmInternalException
com.amazonaws.services.cloudhsm.model.CloudHsmServiceException
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 AWSCloudHSM indicating either a problem with the data in the request, or a server side issue.
        return describeLunaClient(new DescribeLunaClientRequest());
    }
    @Override
    public void setEndpoint(String endpoint) {
        super.setEndpoint(endpoint);
    }
    @Override
    public void setEndpoint(String endpointString serviceNameString regionIdthrows IllegalArgumentException {
        super.setEndpoint(endpointserviceNameregionId);
    }

    
Returns additional metadata for a previously executed successful, request, typically used for debugging issues where a service isn't acting as expected. This data isn't considered part of the result data returned by an operation, so it's available through this separate, diagnostic interface.

Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.

Parameters:
request The originally executed request
Returns:
The response metadata for the specified request, or null if none is available.
        return .getResponseMetadataForRequest(request);
    }
    private <X, Y extends AmazonWebServiceRequestResponse<X> invoke(Request<Y> request,
            HttpResponseHandler<AmazonWebServiceResponse<X>> responseHandler,
            ExecutionContext executionContext) {
        request.setEndpoint();
        request.setTimeOffset();
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        AWSCredentials credentials;
        awsRequestMetrics.startEvent(.);
        try {
            credentials = .getCredentials();
        } finally {
            awsRequestMetrics.endEvent(.);
        }
        AmazonWebServiceRequest originalRequest = request.getOriginalRequest();
        if (originalRequest != null && originalRequest.getRequestCredentials() != null) {
            credentials = originalRequest.getRequestCredentials();
        }
        executionContext.setCredentials(credentials);
        JsonErrorResponseHandler errorResponseHandler = new JsonErrorResponseHandler();
        Response<X> result = .execute(requestresponseHandler,
                errorResponseHandlerexecutionContext);
        return result;
    }
}
        
New to GrepCode? Check out our FAQ X