/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.cloudhsmv2; import javax.annotation.Generated; import com.amazonaws.*; import com.amazonaws.regions.*; import com.amazonaws.services.cloudhsmv2.model.*; /** * Interface for accessing CloudHSM V2. *

* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from * {@link com.amazonaws.services.cloudhsmv2.AbstractAWSCloudHSMV2} instead. *

*

*

* For more information about AWS CloudHSM, see AWS CloudHSM and the AWS CloudHSM User Guide. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public interface AWSCloudHSMV2 { /** * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata * (such as supported regions) of the service. * * @see RegionUtils#getRegionsForService(String) */ String ENDPOINT_PREFIX = "cloudhsmv2"; /** *

* Copy an AWS CloudHSM cluster backup to a different region. *

* * @param copyBackupToRegionRequest * @return Result of the CopyBackupToRegion operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.CopyBackupToRegion * @see AWS * API Documentation */ CopyBackupToRegionResult copyBackupToRegion(CopyBackupToRegionRequest copyBackupToRegionRequest); /** *

* Creates a new AWS CloudHSM cluster. *

* * @param createClusterRequest * @return Result of the CreateCluster operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.CreateCluster * @see AWS API * Documentation */ CreateClusterResult createCluster(CreateClusterRequest createClusterRequest); /** *

* Creates a new hardware security module (HSM) in the specified AWS CloudHSM cluster. *

* * @param createHsmRequest * @return Result of the CreateHsm operation returned by the service. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @sample AWSCloudHSMV2.CreateHsm * @see AWS API * Documentation */ CreateHsmResult createHsm(CreateHsmRequest createHsmRequest); /** *

* Deletes a specified AWS CloudHSM backup. A backup can be restored up to 7 days after the DeleteBackup request is * made. For more information on restoring a backup, see RestoreBackup. *

* * @param deleteBackupRequest * @return Result of the DeleteBackup operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @sample AWSCloudHSMV2.DeleteBackup * @see AWS API * Documentation */ DeleteBackupResult deleteBackup(DeleteBackupRequest deleteBackupRequest); /** *

* Deletes the specified AWS CloudHSM cluster. Before you can delete a cluster, you must delete all HSMs in the * cluster. To see if the cluster contains any HSMs, use DescribeClusters. To delete an HSM, use * DeleteHsm. *

* * @param deleteClusterRequest * @return Result of the DeleteCluster operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.DeleteCluster * @see AWS API * Documentation */ DeleteClusterResult deleteCluster(DeleteClusterRequest deleteClusterRequest); /** *

* Deletes the specified HSM. To specify an HSM, you can use its identifier (ID), the IP address of the HSM's * elastic network interface (ENI), or the ID of the HSM's ENI. You need to specify only one of these values. To * find these values, use DescribeClusters. *

* * @param deleteHsmRequest * @return Result of the DeleteHsm operation returned by the service. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @sample AWSCloudHSMV2.DeleteHsm * @see AWS API * Documentation */ DeleteHsmResult deleteHsm(DeleteHsmRequest deleteHsmRequest); /** *

* Gets information about backups of AWS CloudHSM clusters. *

*

* This is a paginated operation, which means that each response might contain only a subset of all the backups. * When the response contains only a subset of backups, it includes a NextToken value. Use this value * in a subsequent DescribeBackups request to get more backups. When you receive a response with no * NextToken (or an empty or null value), that means there are no more backups to get. *

* * @param describeBackupsRequest * @return Result of the DescribeBackups operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.DescribeBackups * @see AWS API * Documentation */ DescribeBackupsResult describeBackups(DescribeBackupsRequest describeBackupsRequest); /** *

* Gets information about AWS CloudHSM clusters. *

*

* This is a paginated operation, which means that each response might contain only a subset of all the clusters. * When the response contains only a subset of clusters, it includes a NextToken value. Use this value * in a subsequent DescribeClusters request to get more clusters. When you receive a response with no * NextToken (or an empty or null value), that means there are no more clusters to get. *

* * @param describeClustersRequest * @return Result of the DescribeClusters operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.DescribeClusters * @see AWS * API Documentation */ DescribeClustersResult describeClusters(DescribeClustersRequest describeClustersRequest); /** *

* Claims an AWS CloudHSM cluster by submitting the cluster certificate issued by your issuing certificate authority * (CA) and the CA's root certificate. Before you can claim a cluster, you must sign the cluster's certificate * signing request (CSR) with your issuing CA. To get the cluster's CSR, use DescribeClusters. *

* * @param initializeClusterRequest * @return Result of the InitializeCluster operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @sample AWSCloudHSMV2.InitializeCluster * @see AWS * API Documentation */ InitializeClusterResult initializeCluster(InitializeClusterRequest initializeClusterRequest); /** *

* Gets a list of tags for the specified AWS CloudHSM cluster. *

*

* This is a paginated operation, which means that each response might contain only a subset of all the tags. When * the response contains only a subset of tags, it includes a NextToken value. Use this value in a * subsequent ListTags request to get more tags. When you receive a response with no * NextToken (or an empty or null value), that means there are no more tags to get. *

* * @param listTagsRequest * @return Result of the ListTags operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.ListTags * @see AWS API * Documentation */ ListTagsResult listTags(ListTagsRequest listTagsRequest); /** *

* Modifies attributes for AWS CloudHSM backup. *

* * @param modifyBackupAttributesRequest * @return Result of the ModifyBackupAttributes operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @sample AWSCloudHSMV2.ModifyBackupAttributes * @see AWS API Documentation */ ModifyBackupAttributesResult modifyBackupAttributes(ModifyBackupAttributesRequest modifyBackupAttributesRequest); /** *

* Modifies AWS CloudHSM cluster. *

* * @param modifyClusterRequest * @return Result of the ModifyCluster operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @sample AWSCloudHSMV2.ModifyCluster * @see AWS API * Documentation */ ModifyClusterResult modifyCluster(ModifyClusterRequest modifyClusterRequest); /** *

* Restores a specified AWS CloudHSM backup that is in the PENDING_DELETION state. For mor information * on deleting a backup, see DeleteBackup. *

* * @param restoreBackupRequest * @return Result of the RestoreBackup operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @sample AWSCloudHSMV2.RestoreBackup * @see AWS API * Documentation */ RestoreBackupResult restoreBackup(RestoreBackupRequest restoreBackupRequest); /** *

* Adds or overwrites one or more tags for the specified AWS CloudHSM cluster. *

* * @param tagResourceRequest * @return Result of the TagResource operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.TagResource * @see AWS API * Documentation */ TagResourceResult tagResource(TagResourceRequest tagResourceRequest); /** *

* Removes the specified tag or tags from the specified AWS CloudHSM cluster. *

* * @param untagResourceRequest * @return Result of the UntagResource operation returned by the service. * @throws CloudHsmAccessDeniedException * The request was rejected because the requester does not have permission to perform the requested * operation. * @throws CloudHsmInternalFailureException * The request was rejected because of an AWS CloudHSM internal failure. The request can be retried. * @throws CloudHsmInvalidRequestException * The request was rejected because it is not a valid request. * @throws CloudHsmResourceNotFoundException * The request was rejected because it refers to a resource that cannot be found. * @throws CloudHsmServiceException * The request was rejected because an error occurred. * @throws CloudHsmTagException * The request was rejected because of a tagging failure. Verify the tag conditions in all applicable * policies, and then retry the request. * @sample AWSCloudHSMV2.UntagResource * @see AWS API * Documentation */ UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest); /** * Shuts down this client object, releasing any resources that might be held open. This is an optional method, and * callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client * has been shutdown, it should not be used to make any more requests. */ void shutdown(); /** * 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 a request. * * @param request * The originally executed request. * * @return The response metadata for the specified request, or null if none is available. */ ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request); }