cloudhsmv2

package module
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceAPIVersion = "2017-04-28"
View Source
const ServiceID = "CloudHSM V2"

Variables

This section is empty.

Functions

func AddResolveEndpointMiddleware

func AddResolveEndpointMiddleware(stack *middleware.Stack, options ResolveEndpointMiddlewareOptions)

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func RemoveResolveEndpointMiddleware

func RemoveResolveEndpointMiddleware(stack *middleware.Stack) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

For more information about AWS CloudHSM, see AWS CloudHSM (http://aws.amazon.com/cloudhsm/) and the AWS CloudHSM User Guide (https://docs.aws.amazon.com/cloudhsm/latest/userguide/).

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CopyBackupToRegion

func (c *Client) CopyBackupToRegion(ctx context.Context, params *CopyBackupToRegionInput, optFns ...func(*Options)) (*CopyBackupToRegionOutput, error)

Copy an AWS CloudHSM cluster backup to a different region.

func (*Client) CreateCluster

func (c *Client) CreateCluster(ctx context.Context, params *CreateClusterInput, optFns ...func(*Options)) (*CreateClusterOutput, error)

Creates a new AWS CloudHSM cluster.

func (*Client) CreateHsm

func (c *Client) CreateHsm(ctx context.Context, params *CreateHsmInput, optFns ...func(*Options)) (*CreateHsmOutput, error)

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

func (*Client) DeleteBackup

func (c *Client) DeleteBackup(ctx context.Context, params *DeleteBackupInput, optFns ...func(*Options)) (*DeleteBackupOutput, error)

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 ().

func (*Client) DeleteCluster

func (c *Client) DeleteCluster(ctx context.Context, params *DeleteClusterInput, optFns ...func(*Options)) (*DeleteClusterOutput, error)

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 ().

func (*Client) DeleteHsm

func (c *Client) DeleteHsm(ctx context.Context, params *DeleteHsmInput, optFns ...func(*Options)) (*DeleteHsmOutput, error)

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 ().

func (*Client) DescribeBackups

func (c *Client) DescribeBackups(ctx context.Context, params *DescribeBackupsInput, optFns ...func(*Options)) (*DescribeBackupsOutput, error)

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.

func (*Client) DescribeClusters

func (c *Client) DescribeClusters(ctx context.Context, params *DescribeClustersInput, optFns ...func(*Options)) (*DescribeClustersOutput, error)

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.

func (*Client) InitializeCluster

func (c *Client) InitializeCluster(ctx context.Context, params *InitializeClusterInput, optFns ...func(*Options)) (*InitializeClusterOutput, error)

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 ().

func (*Client) ListTags

func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error)

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.

func (*Client) RestoreBackup

func (c *Client) RestoreBackup(ctx context.Context, params *RestoreBackupInput, optFns ...func(*Options)) (*RestoreBackupOutput, error)

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

func (*Client) TagResource

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

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

func (*Client) UntagResource

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

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

type CopyBackupToRegionInput

type CopyBackupToRegionInput struct {
	// Tags to apply to the destination backup during creation. If you specify tags,
	// only these tags will be applied to the destination backup. If you do not specify
	// tags, the service copies tags from the source backup to the destination backup.
	TagList []*types.Tag
	// The AWS region that will contain your copied CloudHSM cluster backup.
	DestinationRegion *string
	// The ID of the backup that will be copied to the destination region.
	BackupId *string
}

type CopyBackupToRegionOutput

type CopyBackupToRegionOutput struct {
	// Information on the backup that will be copied to the destination region,
	// including CreateTimestamp, SourceBackup, SourceCluster, and Source Region.
	// CreateTimestamp of the destination backup will be the same as that of the source
	// backup. You will need to use the sourceBackupID returned in this operation to
	// use the DescribeBackups () operation on the backup that will be copied to the
	// destination region.
	DestinationBackup *types.DestinationBackup

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type CreateClusterInput

type CreateClusterInput struct {
	// The identifier (ID) of the cluster backup to restore. Use this value to restore
	// the cluster from a backup instead of creating a new cluster. To find the backup
	// ID, use DescribeBackups ().
	SourceBackupId *string
	// Tags to apply to the CloudHSM cluster during creation.
	TagList []*types.Tag
	// The identifiers (IDs) of the subnets where you are creating the cluster. You
	// must specify at least one subnet. If you specify multiple subnets, they must
	// meet the following criteria:
	//
	//     * All subnets must be in the same virtual
	// private cloud (VPC).
	//
	//     * You can specify only one subnet per Availability
	// Zone.
	SubnetIds []*string
	// The type of HSM to use in the cluster. Currently the only allowed value is
	// hsm1.medium.
	HsmType *string
}

type CreateClusterOutput

type CreateClusterOutput struct {
	// Information about the cluster that was created.
	Cluster *types.Cluster

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type CreateHsmInput

type CreateHsmInput struct {
	// The Availability Zone where you are creating the HSM. To find the cluster's
	// Availability Zones, use DescribeClusters ().
	AvailabilityZone *string
	// The identifier (ID) of the HSM's cluster. To find the cluster ID, use
	// DescribeClusters ().
	ClusterId *string
	// The HSM's IP address. If you specify an IP address, use an available address
	// from the subnet that maps to the Availability Zone where you are creating the
	// HSM. If you don't specify an IP address, one is chosen for you from that subnet.
	IpAddress *string
}

type CreateHsmOutput

type CreateHsmOutput struct {
	// Information about the HSM that was created.
	Hsm *types.Hsm

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteBackupInput

type DeleteBackupInput struct {
	// The ID of the backup to be deleted. To find the ID of a backup, use the
	// DescribeBackups () operation.
	BackupId *string
}

type DeleteBackupOutput

type DeleteBackupOutput struct {
	// Information on the Backup object deleted.
	Backup *types.Backup

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteClusterInput

type DeleteClusterInput struct {
	// The identifier (ID) of the cluster that you are deleting. To find the cluster
	// ID, use DescribeClusters ().
	ClusterId *string
}

type DeleteClusterOutput

type DeleteClusterOutput struct {
	// Information about the cluster that was deleted.
	Cluster *types.Cluster

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DeleteHsmInput

type DeleteHsmInput struct {
	// The IP address of the elastic network interface (ENI) of the HSM that you are
	// deleting.
	EniIp *string
	// The identifier (ID) of the elastic network interface (ENI) of the HSM that you
	// are deleting.
	EniId *string
	// The identifier (ID) of the HSM that you are deleting.
	HsmId *string
	// The identifier (ID) of the cluster that contains the HSM that you are deleting.
	ClusterId *string
}

type DeleteHsmOutput

type DeleteHsmOutput struct {
	// The identifier (ID) of the HSM that was deleted.
	HsmId *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeBackupsInput

type DescribeBackupsInput struct {
	// The NextToken value that you received in the previous response. Use this value
	// to get more backups.
	NextToken *string
	// The maximum number of backups to return in the response. When there are more
	// backups than the number you specify, the response contains a NextToken value.
	MaxResults *int32
	// Designates whether or not to sort the return backups by ascending chronological
	// order of generation.
	SortAscending *bool
	// One or more filters to limit the items returned in the response. Use the
	// backupIds filter to return only the specified backups. Specify backups by their
	// backup identifier (ID). Use the sourceBackupIds filter to return only the
	// backups created from a source backup. The sourceBackupID of a source backup is
	// returned by the CopyBackupToRegion () operation. Use the clusterIds filter to
	// return only the backups for the specified clusters. Specify clusters by their
	// cluster identifier (ID). Use the states filter to return only backups that match
	// the specified state.
	Filters map[string][]*string
}

type DescribeBackupsOutput

type DescribeBackupsOutput struct {
	// An opaque string that indicates that the response contains only a subset of
	// backups. Use this value in a subsequent DescribeBackups request to get more
	// backups.
	NextToken *string
	// A list of backups.
	Backups []*types.Backup

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type DescribeClustersInput

type DescribeClustersInput struct {
	// One or more filters to limit the items returned in the response. Use the
	// clusterIds filter to return only the specified clusters. Specify clusters by
	// their cluster identifier (ID). Use the vpcIds filter to return only the clusters
	// in the specified virtual private clouds (VPCs). Specify VPCs by their VPC
	// identifier (ID). Use the states filter to return only clusters that match the
	// specified state.
	Filters map[string][]*string
	// The NextToken value that you received in the previous response. Use this value
	// to get more clusters.
	NextToken *string
	// The maximum number of clusters to return in the response. When there are more
	// clusters than the number you specify, the response contains a NextToken value.
	MaxResults *int32
}

type DescribeClustersOutput

type DescribeClustersOutput struct {
	// An opaque string that indicates that the response contains only a subset of
	// clusters. Use this value in a subsequent DescribeClusters request to get more
	// clusters.
	NextToken *string
	// A list of clusters.
	Clusters []*types.Cluster

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options ResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func WithEndpointResolver

func WithEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver

WithEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided fallbackResolver for resolution. awsResolver and fallbackResolver must not be nil

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options ResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options ResolverOptions) (endpoint aws.Endpoint, err error)

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time) error
}

type InitializeClusterInput

type InitializeClusterInput struct {
	// The cluster certificate issued (signed) by your issuing certificate authority
	// (CA). The certificate must be in PEM format and can contain a maximum of 5000
	// characters.
	SignedCert *string
	// The identifier (ID) of the cluster that you are claiming. To find the cluster
	// ID, use DescribeClusters ().
	ClusterId *string
	// The issuing certificate of the issuing certificate authority (CA) that issued
	// (signed) the cluster certificate. You must use a self-signed certificate. The
	// certificate used to sign the HSM CSR must be directly available, and thus must
	// be the root certificate. The certificate must be in PEM format and can contain a
	// maximum of 5000 characters.
	TrustAnchor *string
}

type InitializeClusterOutput

type InitializeClusterOutput struct {
	// A description of the cluster's state.
	StateMessage *string
	// The cluster's state.
	State types.ClusterState

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type ListTagsInput

type ListTagsInput struct {
	// The NextToken value that you received in the previous response. Use this value
	// to get more tags.
	NextToken *string
	// The cluster identifier (ID) for the cluster whose tags you are getting. To find
	// the cluster ID, use DescribeClusters ().
	ResourceId *string
	// The maximum number of tags to return in the response. When there are more tags
	// than the number you specify, the response contains a NextToken value.
	MaxResults *int32
}

type ListTagsOutput

type ListTagsOutput struct {
	// An opaque string that indicates that the response contains only a subset of
	// tags. Use this value in a subsequent ListTags request to get more tags.
	NextToken *string
	// A list of tags.
	TagList []*types.Tag

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions ResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer retry.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

func (Options) GetCredentials

func (o Options) GetCredentials() aws.CredentialsProvider

func (Options) GetEndpointOptions

func (o Options) GetEndpointOptions() ResolverOptions

func (Options) GetEndpointResolver

func (o Options) GetEndpointResolver() EndpointResolver

func (Options) GetHTTPSignerV4

func (o Options) GetHTTPSignerV4() HTTPSignerV4

func (Options) GetRegion

func (o Options) GetRegion() string

func (Options) GetRetryer

func (o Options) GetRetryer() retry.Retryer

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  ResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type ResolveEndpointMiddlewareOptions

type ResolveEndpointMiddlewareOptions interface {
	GetEndpointResolver() EndpointResolver
	GetEndpointOptions() ResolverOptions
}

type ResolverOptions

type ResolverOptions = internalendpoints.Options

ResolverOptions is the service endpoint resolver options

type RestoreBackupInput

type RestoreBackupInput struct {
	// The ID of the backup to be restored. To find the ID of a backup, use the
	// DescribeBackups () operation.
	BackupId *string
}

type RestoreBackupOutput

type RestoreBackupOutput struct {
	// Information on the Backup object created.
	Backup *types.Backup

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type TagResourceInput

type TagResourceInput struct {
	// The cluster identifier (ID) for the cluster that you are tagging. To find the
	// cluster ID, use DescribeClusters ().
	ResourceId *string
	// A list of one or more tags.
	TagList []*types.Tag
}

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

type UntagResourceInput

type UntagResourceInput struct {
	// The cluster identifier (ID) for the cluster whose tags you are removing. To find
	// the cluster ID, use DescribeClusters ().
	ResourceId *string
	// A list of one or more tag keys for the tags that you are removing. Specify only
	// the tag keys, not the tag values.
	TagKeyList []*string
}

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL