cloudhsm

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2015 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cloudhsm provides a client for Amazon CloudHSM.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudHSM

type CloudHSM struct {
	*aws.Service
}

CloudHSM is a client for CloudHSM.

func New

func New(config *aws.Config) *CloudHSM

New returns a new CloudHSM client.

func (*CloudHSM) CreateHAPG

func (c *CloudHSM) CreateHAPG(input *CreateHAPGInput) (*CreateHAPGOutput, error)

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

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.CreateHAPGInput{
		Label: aws.String("Label"), // Required
	}
	resp, err := svc.CreateHAPG(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) CreateHAPGRequest

func (c *CloudHSM) CreateHAPGRequest(input *CreateHAPGInput) (req *aws.Request, output *CreateHAPGOutput)

CreateHAPGRequest generates a request for the CreateHAPG operation.

func (*CloudHSM) CreateHSM

func (c *CloudHSM) CreateHSM(input *CreateHSMInput) (*CreateHSMOutput, error)

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

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.CreateHSMInput{
		IAMRoleARN:       aws.String("IamRoleArn"),       // Required
		SSHKey:           aws.String("SshKey"),           // Required
		SubnetID:         aws.String("SubnetId"),         // Required
		SubscriptionType: aws.String("SubscriptionType"), // Required
		ClientToken:      aws.String("ClientToken"),
		ENIIP:            aws.String("IpAddress"),
		ExternalID:       aws.String("ExternalId"),
		SyslogIP:         aws.String("IpAddress"),
	}
	resp, err := svc.CreateHSM(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) CreateHSMRequest

func (c *CloudHSM) CreateHSMRequest(input *CreateHSMInput) (req *aws.Request, output *CreateHSMOutput)

CreateHSMRequest generates a request for the CreateHSM operation.

func (*CloudHSM) CreateLunaClient

func (c *CloudHSM) CreateLunaClient(input *CreateLunaClientInput) (*CreateLunaClientOutput, error)

Creates an HSM client.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.CreateLunaClientInput{
		Certificate: aws.String("Certificate"), // Required
		Label:       aws.String("ClientLabel"),
	}
	resp, err := svc.CreateLunaClient(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) CreateLunaClientRequest

func (c *CloudHSM) CreateLunaClientRequest(input *CreateLunaClientInput) (req *aws.Request, output *CreateLunaClientOutput)

CreateLunaClientRequest generates a request for the CreateLunaClient operation.

func (*CloudHSM) DeleteHAPG

func (c *CloudHSM) DeleteHAPG(input *DeleteHAPGInput) (*DeleteHAPGOutput, error)

Deletes a high-availability partition group.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.DeleteHAPGInput{
		HAPGARN: aws.String("HapgArn"), // Required
	}
	resp, err := svc.DeleteHAPG(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) DeleteHAPGRequest

func (c *CloudHSM) DeleteHAPGRequest(input *DeleteHAPGInput) (req *aws.Request, output *DeleteHAPGOutput)

DeleteHAPGRequest generates a request for the DeleteHAPG operation.

func (*CloudHSM) DeleteHSM

func (c *CloudHSM) DeleteHSM(input *DeleteHSMInput) (*DeleteHSMOutput, error)

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

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.DeleteHSMInput{
		HSMARN: aws.String("HsmArn"), // Required
	}
	resp, err := svc.DeleteHSM(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) DeleteHSMRequest

func (c *CloudHSM) DeleteHSMRequest(input *DeleteHSMInput) (req *aws.Request, output *DeleteHSMOutput)

DeleteHSMRequest generates a request for the DeleteHSM operation.

func (*CloudHSM) DeleteLunaClient

func (c *CloudHSM) DeleteLunaClient(input *DeleteLunaClientInput) (*DeleteLunaClientOutput, error)

Deletes a client.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.DeleteLunaClientInput{
		ClientARN: aws.String("ClientArn"), // Required
	}
	resp, err := svc.DeleteLunaClient(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) DeleteLunaClientRequest

func (c *CloudHSM) DeleteLunaClientRequest(input *DeleteLunaClientInput) (req *aws.Request, output *DeleteLunaClientOutput)

DeleteLunaClientRequest generates a request for the DeleteLunaClient operation.

func (*CloudHSM) DescribeHAPG

func (c *CloudHSM) DescribeHAPG(input *DescribeHAPGInput) (*DescribeHAPGOutput, error)

Retrieves information about a high-availability partition group.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.DescribeHAPGInput{
		HAPGARN: aws.String("HapgArn"), // Required
	}
	resp, err := svc.DescribeHAPG(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) DescribeHAPGRequest

func (c *CloudHSM) DescribeHAPGRequest(input *DescribeHAPGInput) (req *aws.Request, output *DescribeHAPGOutput)

DescribeHAPGRequest generates a request for the DescribeHAPG operation.

func (*CloudHSM) DescribeHSM

func (c *CloudHSM) DescribeHSM(input *DescribeHSMInput) (*DescribeHSMOutput, error)

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

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.DescribeHSMInput{
		HSMARN:          aws.String("HsmArn"),
		HSMSerialNumber: aws.String("HsmSerialNumber"),
	}
	resp, err := svc.DescribeHSM(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) DescribeHSMRequest

func (c *CloudHSM) DescribeHSMRequest(input *DescribeHSMInput) (req *aws.Request, output *DescribeHSMOutput)

DescribeHSMRequest generates a request for the DescribeHSM operation.

func (*CloudHSM) DescribeLunaClient

func (c *CloudHSM) DescribeLunaClient(input *DescribeLunaClientInput) (*DescribeLunaClientOutput, error)

Retrieves information about an HSM client.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.DescribeLunaClientInput{
		CertificateFingerprint: aws.String("CertificateFingerprint"),
		ClientARN:              aws.String("ClientArn"),
	}
	resp, err := svc.DescribeLunaClient(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) DescribeLunaClientRequest

func (c *CloudHSM) DescribeLunaClientRequest(input *DescribeLunaClientInput) (req *aws.Request, output *DescribeLunaClientOutput)

DescribeLunaClientRequest generates a request for the DescribeLunaClient operation.

func (*CloudHSM) GetConfig

func (c *CloudHSM) GetConfig(input *GetConfigInput) (*GetConfigOutput, error)

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

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.GetConfigInput{
		ClientARN:     aws.String("ClientArn"),     // Required
		ClientVersion: aws.String("ClientVersion"), // Required
		HAPGList: []*string{ // Required
			aws.String("HapgArn"), // Required
			// More values...
		},
	}
	resp, err := svc.GetConfig(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) GetConfigRequest

func (c *CloudHSM) GetConfigRequest(input *GetConfigInput) (req *aws.Request, output *GetConfigOutput)

GetConfigRequest generates a request for the GetConfig operation.

func (*CloudHSM) ListAvailableZones

func (c *CloudHSM) ListAvailableZones(input *ListAvailableZonesInput) (*ListAvailableZonesOutput, error)

Lists the Availability Zones that have available AWS CloudHSM capacity.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	var params *cloudhsm.ListAvailableZonesInput
	resp, err := svc.ListAvailableZones(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ListAvailableZonesRequest

func (c *CloudHSM) ListAvailableZonesRequest(input *ListAvailableZonesInput) (req *aws.Request, output *ListAvailableZonesOutput)

ListAvailableZonesRequest generates a request for the ListAvailableZones operation.

func (*CloudHSM) ListHSMs

func (c *CloudHSM) ListHSMs(input *ListHSMsInput) (*ListHSMsOutput, error)

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.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.ListHSMsInput{
		NextToken: aws.String("PaginationToken"),
	}
	resp, err := svc.ListHSMs(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ListHSMsRequest

func (c *CloudHSM) ListHSMsRequest(input *ListHSMsInput) (req *aws.Request, output *ListHSMsOutput)

ListHSMsRequest generates a request for the ListHSMs operation.

func (*CloudHSM) ListHapgs

func (c *CloudHSM) ListHapgs(input *ListHapgsInput) (*ListHapgsOutput, error)

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.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.ListHapgsInput{
		NextToken: aws.String("PaginationToken"),
	}
	resp, err := svc.ListHapgs(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ListHapgsRequest

func (c *CloudHSM) ListHapgsRequest(input *ListHapgsInput) (req *aws.Request, output *ListHapgsOutput)

ListHapgsRequest generates a request for the ListHapgs operation.

func (*CloudHSM) ListLunaClients

func (c *CloudHSM) ListLunaClients(input *ListLunaClientsInput) (*ListLunaClientsOutput, error)

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.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.ListLunaClientsInput{
		NextToken: aws.String("PaginationToken"),
	}
	resp, err := svc.ListLunaClients(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ListLunaClientsRequest

func (c *CloudHSM) ListLunaClientsRequest(input *ListLunaClientsInput) (req *aws.Request, output *ListLunaClientsOutput)

ListLunaClientsRequest generates a request for the ListLunaClients operation.

func (*CloudHSM) ModifyHAPG

func (c *CloudHSM) ModifyHAPG(input *ModifyHAPGInput) (*ModifyHAPGOutput, error)

Modifies an existing high-availability partition group.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.ModifyHAPGInput{
		HAPGARN: aws.String("HapgArn"), // Required
		Label:   aws.String("Label"),
		PartitionSerialList: []*string{
			aws.String("PartitionSerial"), // Required
			// More values...
		},
	}
	resp, err := svc.ModifyHAPG(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ModifyHAPGRequest

func (c *CloudHSM) ModifyHAPGRequest(input *ModifyHAPGInput) (req *aws.Request, output *ModifyHAPGOutput)

ModifyHAPGRequest generates a request for the ModifyHAPG operation.

func (*CloudHSM) ModifyHSM

func (c *CloudHSM) ModifyHSM(input *ModifyHSMInput) (*ModifyHSMOutput, error)

Modifies an HSM.

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.ModifyHSMInput{
		HSMARN:     aws.String("HsmArn"), // Required
		ENIIP:      aws.String("IpAddress"),
		ExternalID: aws.String("ExternalId"),
		IAMRoleARN: aws.String("IamRoleArn"),
		SubnetID:   aws.String("SubnetId"),
		SyslogIP:   aws.String("IpAddress"),
	}
	resp, err := svc.ModifyHSM(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ModifyHSMRequest

func (c *CloudHSM) ModifyHSMRequest(input *ModifyHSMInput) (req *aws.Request, output *ModifyHSMOutput)

ModifyHSMRequest generates a request for the ModifyHSM operation.

func (*CloudHSM) ModifyLunaClient

func (c *CloudHSM) ModifyLunaClient(input *ModifyLunaClientInput) (*ModifyLunaClientOutput, error)

Modifies the certificate used by the client.

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

Example
package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/awsutil"
	"github.com/aws/aws-sdk-go/service/cloudhsm"
)

func main() {
	svc := cloudhsm.New(nil)

	params := &cloudhsm.ModifyLunaClientInput{
		Certificate: aws.String("Certificate"), // Required
		ClientARN:   aws.String("ClientArn"),   // Required
	}
	resp, err := svc.ModifyLunaClient(params)

	if err != nil {
		if awsErr, ok := err.(awserr.Error); ok {
			// Generic AWS Error with Code, Message, and original error (if any)
			fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
			if reqErr, ok := err.(awserr.RequestFailure); ok {
				// A service error occurred
				fmt.Println(reqErr.Code(), reqErr.Message(), reqErr.StatusCode(), reqErr.RequestID())
			}
		} else {
			// This case should never be hit, The SDK should alwsy return an
			// error which satisfies the awserr.Error interface.
			fmt.Println(err.Error())
		}
	}

	// Pretty-print the response data.
	fmt.Println(awsutil.StringValue(resp))
}
Output:

func (*CloudHSM) ModifyLunaClientRequest

func (c *CloudHSM) ModifyLunaClientRequest(input *ModifyLunaClientInput) (req *aws.Request, output *ModifyLunaClientOutput)

ModifyLunaClientRequest generates a request for the ModifyLunaClient operation.

type CreateHAPGInput

type CreateHAPGInput struct {
	// The label of the new high-availability partition group.
	Label *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the inputs for the CreateHapgRequest action.

type CreateHAPGOutput

type CreateHAPGOutput struct {
	// The ARN of the high-availability partition group.
	HAPGARN *string `locationName:"HapgArn" type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the CreateHAPartitionGroup action.

type CreateHSMInput

type CreateHSMInput struct {
	// A user-defined token to ensure idempotence. Subsequent calls to this action
	// with the same token will be ignored.
	ClientToken *string `locationName:"ClientToken" type:"string"`

	// The IP address to assign to the HSM's ENI.
	ENIIP *string `locationName:"EniIp" type:"string"`

	// The external ID from IamRoleArn, if present.
	ExternalID *string `locationName:"ExternalId" type:"string"`

	// The ARN of an IAM role to enable the AWS CloudHSM service to allocate an
	// ENI on your behalf.
	IAMRoleARN *string `locationName:"IamRoleArn" type:"string" required:"true"`

	// The SSH public key to install on the HSM.
	SSHKey *string `locationName:"SshKey" type:"string" required:"true"`

	// The identifier of the subnet in your VPC in which to place the HSM.
	SubnetID *string `locationName:"SubnetId" type:"string" required:"true"`

	// The subscription type.
	SubscriptionType *string `locationName:"SubscriptionType" type:"string" required:"true"`

	// The IP address for the syslog monitoring server.
	SyslogIP *string `locationName:"SyslogIp" type:"string"`
	// contains filtered or unexported fields
}

Contains the inputs for the CreateHsm action.

type CreateHSMOutput

type CreateHSMOutput struct {
	// The ARN of the HSM.
	HSMARN *string `locationName:"HsmArn" type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the CreateHsm action.

type CreateLunaClientInput

type CreateLunaClientInput struct {
	// The contents of a Base64-Encoded X.509 v3 certificate to be installed on
	// the HSMs used by this client.
	Certificate *string `type:"string" required:"true"`

	// The label for the client.
	Label *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the inputs for the CreateLunaClient action.

type CreateLunaClientOutput

type CreateLunaClientOutput struct {
	// The ARN of the client.
	ClientARN *string `locationName:"ClientArn" type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the CreateLunaClient action.

type DeleteHAPGInput

type DeleteHAPGInput struct {
	// The ARN of the high-availability partition group to delete.
	HAPGARN *string `locationName:"HapgArn" type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the inputs for the DeleteHapg action.

type DeleteHAPGOutput

type DeleteHAPGOutput struct {
	// The status of the action.
	Status *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the output of the DeleteHapg action.

type DeleteHSMInput

type DeleteHSMInput struct {
	// The ARN of the HSM to delete.
	HSMARN *string `locationName:"HsmArn" type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the inputs for the DeleteHsm action.

type DeleteHSMOutput

type DeleteHSMOutput struct {
	// The status of the action.
	Status *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the output of the DeleteHsm action.

type DeleteLunaClientInput

type DeleteLunaClientInput struct {
	// The ARN of the client to delete.
	ClientARN *string `locationName:"ClientArn" type:"string" required:"true"`
	// contains filtered or unexported fields
}

type DeleteLunaClientOutput

type DeleteLunaClientOutput struct {
	// The status of the action.
	Status *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

type DescribeHAPGInput

type DescribeHAPGInput struct {
	// The ARN of the high-availability partition group to describe.
	HAPGARN *string `locationName:"HapgArn" type:"string" required:"true"`
	// contains filtered or unexported fields
}

Contains the inputs for the DescribeHapg action.

type DescribeHAPGOutput

type DescribeHAPGOutput struct {
	// The ARN of the high-availability partition group.
	HAPGARN *string `locationName:"HapgArn" type:"string"`

	// The serial number of the high-availability partition group.
	HAPGSerial *string `locationName:"HapgSerial" type:"string"`

	// Contains a list of ARNs that identify the HSMs.
	HSMsLastActionFailed []*string `locationName:"HsmsLastActionFailed" type:"list"`

	// Contains a list of ARNs that identify the HSMs.
	HSMsPendingDeletion []*string `locationName:"HsmsPendingDeletion" type:"list"`

	// Contains a list of ARNs that identify the HSMs.
	HSMsPendingRegistration []*string `locationName:"HsmsPendingRegistration" type:"list"`

	// The label for the high-availability partition group.
	Label *string `type:"string"`

	// The date and time the high-availability partition group was last modified.
	LastModifiedTimestamp *string `type:"string"`

	// The list of partition serial numbers that belong to the high-availability
	// partition group.
	PartitionSerialList []*string `type:"list"`

	// The state of the high-availability partition group.
	State *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the DescribeHapg action.

type DescribeHSMInput

type DescribeHSMInput struct {
	// The ARN of the HSM. Either the HsmArn or the SerialNumber parameter must
	// be specified.
	HSMARN *string `locationName:"HsmArn" type:"string"`

	// The serial number of the HSM. Either the HsmArn or the HsmSerialNumber parameter
	// must be specified.
	HSMSerialNumber *string `locationName:"HsmSerialNumber" type:"string"`
	// contains filtered or unexported fields
}

Contains the inputs for the DescribeHsm action.

type DescribeHSMOutput

type DescribeHSMOutput struct {
	// The Availability Zone that the HSM is in.
	AvailabilityZone *string `type:"string"`

	// The identifier of the elastic network interface (ENI) attached to the HSM.
	ENIID *string `locationName:"EniId" type:"string"`

	// The IP address assigned to the HSM's ENI.
	ENIIP *string `locationName:"EniIp" type:"string"`

	// The ARN of the HSM.
	HSMARN *string `locationName:"HsmArn" type:"string"`

	// The HSM model type.
	HSMType *string `locationName:"HsmType" type:"string"`

	// The ARN of the IAM role assigned to the HSM.
	IAMRoleARN *string `locationName:"IamRoleArn" type:"string"`

	// The list of partitions on the HSM.
	Partitions []*string `type:"list"`

	// The date and time the SSH key was last updated.
	SSHKeyLastUpdated *string `locationName:"SshKeyLastUpdated" type:"string"`

	// The public SSH key.
	SSHPublicKey *string `locationName:"SshPublicKey" type:"string"`

	// The serial number of the HSM.
	SerialNumber *string `type:"string"`

	// The date and time the server certificate was last updated.
	ServerCertLastUpdated *string `type:"string"`

	// The URI of the certificate server.
	ServerCertURI *string `locationName:"ServerCertUri" type:"string"`

	// The HSM software version.
	SoftwareVersion *string `type:"string"`

	// The status of the HSM.
	Status *string `type:"string"`

	// Contains additional information about the status of the HSM.
	StatusDetails *string `type:"string"`

	// The identifier of the subnet the HSM is in.
	SubnetID *string `locationName:"SubnetId" type:"string"`

	// The subscription end date.
	SubscriptionEndDate *string `type:"string"`

	// The subscription start date.
	SubscriptionStartDate *string `type:"string"`

	// The subscription type.
	SubscriptionType *string `type:"string"`

	// The identifier of the VPC that the HSM is in.
	VPCID *string `locationName:"VpcId" type:"string"`

	// The name of the HSM vendor.
	VendorName *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the DescribeHsm action.

type DescribeLunaClientInput

type DescribeLunaClientInput struct {
	// The certificate fingerprint.
	CertificateFingerprint *string `type:"string"`

	// The ARN of the client.
	ClientARN *string `locationName:"ClientArn" type:"string"`
	// contains filtered or unexported fields
}

type DescribeLunaClientOutput

type DescribeLunaClientOutput struct {
	// The certificate installed on the HSMs used by this client.
	Certificate *string `type:"string"`

	// The certificate fingerprint.
	CertificateFingerprint *string `type:"string"`

	// The ARN of the client.
	ClientARN *string `locationName:"ClientArn" type:"string"`

	// The label of the client.
	Label *string `type:"string"`

	// The date and time the client was last modified.
	LastModifiedTimestamp *string `type:"string"`
	// contains filtered or unexported fields
}

type GetConfigInput

type GetConfigInput struct {
	// The ARN of the client.
	ClientARN *string `locationName:"ClientArn" type:"string" required:"true"`

	// The client version.
	ClientVersion *string `type:"string" required:"true"`

	// A list of ARNs that identify the high-availability partition groups that
	// are associated with the client.
	HAPGList []*string `locationName:"HapgList" type:"list" required:"true"`
	// contains filtered or unexported fields
}

type GetConfigOutput

type GetConfigOutput struct {
	// The certificate file containing the server.pem files of the HSMs.
	ConfigCred *string `type:"string"`

	// The chrystoki.conf configuration file.
	ConfigFile *string `type:"string"`

	// The type of credentials.
	ConfigType *string `type:"string"`
	// contains filtered or unexported fields
}

type ListAvailableZonesInput

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

Contains the inputs for the ListAvailableZones action.

type ListAvailableZonesOutput

type ListAvailableZonesOutput struct {
	// The list of Availability Zones that have available AWS CloudHSM capacity.
	AZList []*string `type:"list"`
	// contains filtered or unexported fields
}

type ListHSMsInput

type ListHSMsInput struct {
	// The NextToken value from a previous call to ListHsms. Pass null if this is
	// the first call.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

type ListHSMsOutput

type ListHSMsOutput struct {
	// The list of ARNs that identify the HSMs.
	HSMList []*string `locationName:"HsmList" type:"list"`

	// If not null, more results are available. Pass this value to ListHsms to retrieve
	// the next set of items.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the ListHsms action.

type ListHapgsInput

type ListHapgsInput struct {
	// The NextToken value from a previous call to ListHapgs. Pass null if this
	// is the first call.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

type ListHapgsOutput

type ListHapgsOutput struct {
	// The list of high-availability partition groups.
	HAPGList []*string `locationName:"HapgList" type:"list" required:"true"`

	// If not null, more results are available. Pass this value to ListHapgs to
	// retrieve the next set of items.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

type ListLunaClientsInput

type ListLunaClientsInput struct {
	// The NextToken value from a previous call to ListLunaClients. Pass null if
	// this is the first call.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

type ListLunaClientsOutput

type ListLunaClientsOutput struct {
	// The list of clients.
	ClientList []*string `type:"list" required:"true"`

	// If not null, more results are available. Pass this to ListLunaClients to
	// retrieve the next set of items.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

type ModifyHAPGInput

type ModifyHAPGInput struct {
	// The ARN of the high-availability partition group to modify.
	HAPGARN *string `locationName:"HapgArn" type:"string" required:"true"`

	// The new label for the high-availability partition group.
	Label *string `type:"string"`

	// The list of partition serial numbers to make members of the high-availability
	// partition group.
	PartitionSerialList []*string `type:"list"`
	// contains filtered or unexported fields
}

type ModifyHAPGOutput

type ModifyHAPGOutput struct {
	// The ARN of the high-availability partition group.
	HAPGARN *string `locationName:"HapgArn" type:"string"`
	// contains filtered or unexported fields
}

type ModifyHSMInput

type ModifyHSMInput struct {
	// The new IP address for the elastic network interface attached to the HSM.
	ENIIP *string `locationName:"EniIp" type:"string"`

	// The new external ID.
	ExternalID *string `locationName:"ExternalId" type:"string"`

	// The ARN of the HSM to modify.
	HSMARN *string `locationName:"HsmArn" type:"string" required:"true"`

	// The new IAM role ARN.
	IAMRoleARN *string `locationName:"IamRoleArn" type:"string"`

	// The new identifier of the subnet that the HSM is in.
	SubnetID *string `locationName:"SubnetId" type:"string"`

	// The new IP address for the syslog monitoring server.
	SyslogIP *string `locationName:"SyslogIp" type:"string"`
	// contains filtered or unexported fields
}

Contains the inputs for the ModifyHsm action.

type ModifyHSMOutput

type ModifyHSMOutput struct {
	// The ARN of the HSM.
	HSMARN *string `locationName:"HsmArn" type:"string"`
	// contains filtered or unexported fields
}

Contains the output of the ModifyHsm action.

type ModifyLunaClientInput

type ModifyLunaClientInput struct {
	// The new certificate for the client.
	Certificate *string `type:"string" required:"true"`

	// The ARN of the client.
	ClientARN *string `locationName:"ClientArn" type:"string" required:"true"`
	// contains filtered or unexported fields
}

type ModifyLunaClientOutput

type ModifyLunaClientOutput struct {
	// The ARN of the client.
	ClientARN *string `locationName:"ClientArn" type:"string"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis
Package cloudhsmiface provides an interface for the Amazon CloudHSM.
Package cloudhsmiface provides an interface for the Amazon CloudHSM.

Jump to

Keyboard shortcuts

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