AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CloudHSMV2

import "github.com/aws/aws-sdk-go/service/cloudhsmv2"

type CloudHSMV2 struct { *client.Client }

CloudHSMV2 provides the API operation methods for making requests to AWS CloudHSM V2. See this package's package overview docs for details on the service.

CloudHSMV2 methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

CopyBackupToRegion

func (c *CloudHSMV2) CopyBackupToRegion(input *CopyBackupToRegionInput) (*CopyBackupToRegionOutput, error)

CopyBackupToRegion API operation for AWS CloudHSM V2.

Copy an AWS CloudHSM cluster backup to a different region.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation CopyBackupToRegion for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion

CopyBackupToRegionRequest

func (c *CloudHSMV2) CopyBackupToRegionRequest(input *CopyBackupToRegionInput) (req *request.Request, output *CopyBackupToRegionOutput)

CopyBackupToRegionRequest generates a "aws/request.Request" representing the client's request for the CopyBackupToRegion operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CopyBackupToRegion for more information on using the CopyBackupToRegion API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CopyBackupToRegionRequest method. req, resp := client.CopyBackupToRegionRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CopyBackupToRegion

CopyBackupToRegionWithContext

func (c *CloudHSMV2) CopyBackupToRegionWithContext(ctx aws.Context, input *CopyBackupToRegionInput, opts ...request.Option) (*CopyBackupToRegionOutput, error)

CopyBackupToRegionWithContext is the same as CopyBackupToRegion with the addition of the ability to pass a context and additional request options.

See CopyBackupToRegion for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateCluster

func (c *CloudHSMV2) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error)

CreateCluster API operation for AWS CloudHSM V2.

Creates a new AWS CloudHSM cluster.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation CreateCluster for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster

CreateClusterRequest

func (c *CloudHSMV2) CreateClusterRequest(input *CreateClusterInput) (req *request.Request, output *CreateClusterOutput)

CreateClusterRequest generates a "aws/request.Request" representing the client's request for the CreateCluster operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateCluster for more information on using the CreateCluster API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateClusterRequest method. req, resp := client.CreateClusterRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateCluster

CreateClusterWithContext

func (c *CloudHSMV2) CreateClusterWithContext(ctx aws.Context, input *CreateClusterInput, opts ...request.Option) (*CreateClusterOutput, error)

CreateClusterWithContext is the same as CreateCluster with the addition of the ability to pass a context and additional request options.

See CreateCluster for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateHsm

func (c *CloudHSMV2) CreateHsm(input *CreateHsmInput) (*CreateHsmOutput, error)

CreateHsm API operation for AWS CloudHSM V2.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation CreateHsm for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm

CreateHsmRequest

func (c *CloudHSMV2) CreateHsmRequest(input *CreateHsmInput) (req *request.Request, output *CreateHsmOutput)

CreateHsmRequest generates a "aws/request.Request" representing the client's request for the CreateHsm operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateHsm for more information on using the CreateHsm API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateHsmRequest method. req, resp := client.CreateHsmRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/CreateHsm

CreateHsmWithContext

func (c *CloudHSMV2) CreateHsmWithContext(ctx aws.Context, input *CreateHsmInput, opts ...request.Option) (*CreateHsmOutput, error)

CreateHsmWithContext is the same as CreateHsm with the addition of the ability to pass a context and additional request options.

See CreateHsm for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteBackup

func (c *CloudHSMV2) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error)

DeleteBackup API operation for AWS CloudHSM V2.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation DeleteBackup for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup

DeleteBackupRequest

func (c *CloudHSMV2) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput)

DeleteBackupRequest generates a "aws/request.Request" representing the client's request for the DeleteBackup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBackup for more information on using the DeleteBackup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBackupRequest method. req, resp := client.DeleteBackupRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteBackup

DeleteBackupWithContext

func (c *CloudHSMV2) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error)

DeleteBackupWithContext is the same as DeleteBackup with the addition of the ability to pass a context and additional request options.

See DeleteBackup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteCluster

func (c *CloudHSMV2) DeleteCluster(input *DeleteClusterInput) (*DeleteClusterOutput, error)

DeleteCluster API operation for AWS CloudHSM V2.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation DeleteCluster for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster

DeleteClusterRequest

func (c *CloudHSMV2) DeleteClusterRequest(input *DeleteClusterInput) (req *request.Request, output *DeleteClusterOutput)

DeleteClusterRequest generates a "aws/request.Request" representing the client's request for the DeleteCluster operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteCluster for more information on using the DeleteCluster API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteClusterRequest method. req, resp := client.DeleteClusterRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteCluster

DeleteClusterWithContext

func (c *CloudHSMV2) DeleteClusterWithContext(ctx aws.Context, input *DeleteClusterInput, opts ...request.Option) (*DeleteClusterOutput, error)

DeleteClusterWithContext is the same as DeleteCluster with the addition of the ability to pass a context and additional request options.

See DeleteCluster for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteHsm

func (c *CloudHSMV2) DeleteHsm(input *DeleteHsmInput) (*DeleteHsmOutput, error)

DeleteHsm API operation for AWS CloudHSM V2.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation DeleteHsm for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm

DeleteHsmRequest

func (c *CloudHSMV2) DeleteHsmRequest(input *DeleteHsmInput) (req *request.Request, output *DeleteHsmOutput)

DeleteHsmRequest generates a "aws/request.Request" representing the client's request for the DeleteHsm operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteHsm for more information on using the DeleteHsm API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteHsmRequest method. req, resp := client.DeleteHsmRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DeleteHsm

DeleteHsmWithContext

func (c *CloudHSMV2) DeleteHsmWithContext(ctx aws.Context, input *DeleteHsmInput, opts ...request.Option) (*DeleteHsmOutput, error)

DeleteHsmWithContext is the same as DeleteHsm with the addition of the ability to pass a context and additional request options.

See DeleteHsm for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeBackups

func (c *CloudHSMV2) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error)

DescribeBackups API operation for AWS CloudHSM V2.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation DescribeBackups for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups

DescribeBackupsPages

func (c *CloudHSMV2) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error

DescribeBackupsPages iterates over the pages of a DescribeBackups operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeBackups method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeBackups operation. pageNum := 0 err := client.DescribeBackupsPages(params, func(page *DescribeBackupsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

DescribeBackupsPagesWithContext

func (c *CloudHSMV2) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error

DescribeBackupsPagesWithContext same as DescribeBackupsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeBackupsRequest

func (c *CloudHSMV2) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput)

DescribeBackupsRequest generates a "aws/request.Request" representing the client's request for the DescribeBackups operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeBackups for more information on using the DescribeBackups API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeBackupsRequest method. req, resp := client.DescribeBackupsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeBackups

DescribeBackupsWithContext

func (c *CloudHSMV2) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error)

DescribeBackupsWithContext is the same as DescribeBackups with the addition of the ability to pass a context and additional request options.

See DescribeBackups for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeClusters

func (c *CloudHSMV2) DescribeClusters(input *DescribeClustersInput) (*DescribeClustersOutput, error)

DescribeClusters API operation for AWS CloudHSM V2.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation DescribeClusters for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters

DescribeClustersPages

func (c *CloudHSMV2) DescribeClustersPages(input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool) error

DescribeClustersPages iterates over the pages of a DescribeClusters operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeClusters method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeClusters operation. pageNum := 0 err := client.DescribeClustersPages(params, func(page *DescribeClustersOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

DescribeClustersPagesWithContext

func (c *CloudHSMV2) DescribeClustersPagesWithContext(ctx aws.Context, input *DescribeClustersInput, fn func(*DescribeClustersOutput, bool) bool, opts ...request.Option) error

DescribeClustersPagesWithContext same as DescribeClustersPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeClustersRequest

func (c *CloudHSMV2) DescribeClustersRequest(input *DescribeClustersInput) (req *request.Request, output *DescribeClustersOutput)

DescribeClustersRequest generates a "aws/request.Request" representing the client's request for the DescribeClusters operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeClusters for more information on using the DescribeClusters API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeClustersRequest method. req, resp := client.DescribeClustersRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/DescribeClusters

DescribeClustersWithContext

func (c *CloudHSMV2) DescribeClustersWithContext(ctx aws.Context, input *DescribeClustersInput, opts ...request.Option) (*DescribeClustersOutput, error)

DescribeClustersWithContext is the same as DescribeClusters with the addition of the ability to pass a context and additional request options.

See DescribeClusters for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

InitializeCluster

func (c *CloudHSMV2) InitializeCluster(input *InitializeClusterInput) (*InitializeClusterOutput, error)

InitializeCluster API operation for AWS CloudHSM V2.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation InitializeCluster for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster

InitializeClusterRequest

func (c *CloudHSMV2) InitializeClusterRequest(input *InitializeClusterInput) (req *request.Request, output *InitializeClusterOutput)

InitializeClusterRequest generates a "aws/request.Request" representing the client's request for the InitializeCluster operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See InitializeCluster for more information on using the InitializeCluster API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the InitializeClusterRequest method. req, resp := client.InitializeClusterRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/InitializeCluster

InitializeClusterWithContext

func (c *CloudHSMV2) InitializeClusterWithContext(ctx aws.Context, input *InitializeClusterInput, opts ...request.Option) (*InitializeClusterOutput, error)

InitializeClusterWithContext is the same as InitializeCluster with the addition of the ability to pass a context and additional request options.

See InitializeCluster for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTags

func (c *CloudHSMV2) ListTags(input *ListTagsInput) (*ListTagsOutput, error)

ListTags API operation for AWS CloudHSM V2.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation ListTags for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags

ListTagsPages

func (c *CloudHSMV2) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error

ListTagsPages iterates over the pages of a ListTags operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListTags method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListTags operation. pageNum := 0 err := client.ListTagsPages(params, func(page *ListTagsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListTagsPagesWithContext

func (c *CloudHSMV2) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error

ListTagsPagesWithContext same as ListTagsPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTagsRequest

func (c *CloudHSMV2) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput)

ListTagsRequest generates a "aws/request.Request" representing the client's request for the ListTags operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListTags for more information on using the ListTags API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListTagsRequest method. req, resp := client.ListTagsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags

ListTagsWithContext

func (c *CloudHSMV2) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error)

ListTagsWithContext is the same as ListTags with the addition of the ability to pass a context and additional request options.

See ListTags for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

RestoreBackup

func (c *CloudHSMV2) RestoreBackup(input *RestoreBackupInput) (*RestoreBackupOutput, error)

RestoreBackup API operation for AWS CloudHSM V2.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation RestoreBackup for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup

RestoreBackupRequest

func (c *CloudHSMV2) RestoreBackupRequest(input *RestoreBackupInput) (req *request.Request, output *RestoreBackupOutput)

RestoreBackupRequest generates a "aws/request.Request" representing the client's request for the RestoreBackup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RestoreBackup for more information on using the RestoreBackup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RestoreBackupRequest method. req, resp := client.RestoreBackupRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/RestoreBackup

RestoreBackupWithContext

func (c *CloudHSMV2) RestoreBackupWithContext(ctx aws.Context, input *RestoreBackupInput, opts ...request.Option) (*RestoreBackupOutput, error)

RestoreBackupWithContext is the same as RestoreBackup with the addition of the ability to pass a context and additional request options.

See RestoreBackup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TagResource

func (c *CloudHSMV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error)

TagResource API operation for AWS CloudHSM V2.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation TagResource for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource

TagResourceRequest

func (c *CloudHSMV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput)

TagResourceRequest generates a "aws/request.Request" representing the client's request for the TagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TagResource for more information on using the TagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TagResourceRequest method. req, resp := client.TagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/TagResource

TagResourceWithContext

func (c *CloudHSMV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error)

TagResourceWithContext is the same as TagResource with the addition of the ability to pass a context and additional request options.

See TagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UntagResource

func (c *CloudHSMV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error)

UntagResource API operation for AWS CloudHSM V2.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for AWS CloudHSM V2's API operation UntagResource for usage and error information.

Returned Error Codes:

  • ErrCodeCloudHsmInternalFailureException "CloudHsmInternalFailureException" The request was rejected because of an AWS CloudHSM internal failure. The request can be retried.

  • ErrCodeCloudHsmServiceException "CloudHsmServiceException" The request was rejected because an error occurred.

  • ErrCodeCloudHsmResourceNotFoundException "CloudHsmResourceNotFoundException" The request was rejected because it refers to a resource that cannot be found.

  • ErrCodeCloudHsmInvalidRequestException "CloudHsmInvalidRequestException" The request was rejected because it is not a valid request.

  • ErrCodeCloudHsmAccessDeniedException "CloudHsmAccessDeniedException" The request was rejected because the requester does not have permission to perform the requested operation.

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource

UntagResourceRequest

func (c *CloudHSMV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput)

UntagResourceRequest generates a "aws/request.Request" representing the client's request for the UntagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UntagResource for more information on using the UntagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UntagResourceRequest method. req, resp := client.UntagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/UntagResource

UntagResourceWithContext

func (c *CloudHSMV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error)

UntagResourceWithContext is the same as UntagResource with the addition of the ability to pass a context and additional request options.

See UntagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

On this page: