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.

Snowball

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

type Snowball struct { *client.Client }

Snowball provides the API operation methods for making requests to Amazon Import/Export Snowball. See this package's package overview docs for details on the service.

Snowball 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

CancelCluster

func (c *Snowball) CancelCluster(input *CancelClusterInput) (*CancelClusterOutput, error)

CancelCluster API operation for Amazon Import/Export Snowball.

Cancels a cluster job. You can only cancel a cluster job while it's in the AwaitingQuorum status. You'll have at least an hour after creating a cluster job to cancel it.

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 Amazon Import/Export Snowball's API operation CancelCluster for usage and error information.

Returned Error Codes:

  • ErrCodeKMSRequestFailedException "KMSRequestFailedException" The provided AWS Key Management Service key lacks the permissions to perform the specified CreateJob or UpdateJob action.

  • ErrCodeInvalidJobStateException "InvalidJobStateException" The action can't be performed because the job's current state doesn't allow that action to be performed.

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CancelCluster

Example

Snowball CancelCluster shared00

To cancel a cluster job

This operation cancels a cluster job. You can only cancel a cluster job while it's in the AwaitingQuorum status.

{ svc := snowball.New(session.New()) input := &snowball.CancelClusterInput{ ClusterId: aws.String("CID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.CancelCluster(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeKMSRequestFailedException: fmt.Println(snowball.ErrCodeKMSRequestFailedException, aerr.Error()) case snowball.ErrCodeInvalidJobStateException: fmt.Println(snowball.ErrCodeInvalidJobStateException, aerr.Error()) case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CancelClusterRequest

func (c *Snowball) CancelClusterRequest(input *CancelClusterInput) (req *request.Request, output *CancelClusterOutput)

CancelClusterRequest generates a "aws/request.Request" representing the client's request for the CancelCluster 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 CancelCluster for more information on using the CancelCluster 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 CancelClusterRequest method. req, resp := client.CancelClusterRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CancelCluster

CancelClusterWithContext

func (c *Snowball) CancelClusterWithContext(ctx aws.Context, input *CancelClusterInput, opts ...request.Option) (*CancelClusterOutput, error)

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

See CancelCluster 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.

CancelJob

func (c *Snowball) CancelJob(input *CancelJobInput) (*CancelJobOutput, error)

CancelJob API operation for Amazon Import/Export Snowball.

Cancels the specified job. You can only cancel a job before its JobState value changes to PreparingAppliance. Requesting the ListJobs or DescribeJob action returns a job's JobState as part of the response element data returned.

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 Amazon Import/Export Snowball's API operation CancelJob for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidJobStateException "InvalidJobStateException" The action can't be performed because the job's current state doesn't allow that action to be performed.

  • ErrCodeKMSRequestFailedException "KMSRequestFailedException" The provided AWS Key Management Service key lacks the permissions to perform the specified CreateJob or UpdateJob action.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CancelJob

Example

Snowball CancelJob shared00

To cancel a job for a Snowball device

This operation cancels a job. You can only cancel a job before its JobState value changes to PreparingAppliance.

{ svc := snowball.New(session.New()) input := &snowball.CancelJobInput{ JobId: aws.String("JID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.CancelJob(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidJobStateException: fmt.Println(snowball.ErrCodeInvalidJobStateException, aerr.Error()) case snowball.ErrCodeKMSRequestFailedException: fmt.Println(snowball.ErrCodeKMSRequestFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CancelJobRequest

func (c *Snowball) CancelJobRequest(input *CancelJobInput) (req *request.Request, output *CancelJobOutput)

CancelJobRequest generates a "aws/request.Request" representing the client's request for the CancelJob 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 CancelJob for more information on using the CancelJob 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 CancelJobRequest method. req, resp := client.CancelJobRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CancelJob

CancelJobWithContext

func (c *Snowball) CancelJobWithContext(ctx aws.Context, input *CancelJobInput, opts ...request.Option) (*CancelJobOutput, error)

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

See CancelJob 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.

CreateAddress

func (c *Snowball) CreateAddress(input *CreateAddressInput) (*CreateAddressOutput, error)

CreateAddress API operation for Amazon Import/Export Snowball.

Creates an address for a Snowball to be shipped to. In most regions, addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.

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 Amazon Import/Export Snowball's API operation CreateAddress for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidAddressException "InvalidAddressException" The address provided was invalid. Check the address with your region's carrier, and try again.

  • ErrCodeUnsupportedAddressException "UnsupportedAddressException" The address is either outside the serviceable area for your region, or an error occurred. Check the address with your region's carrier and try again. If the issue persists, contact AWS Support.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CreateAddress

Example

Snowball CreateAddress shared00

To create an address for a job

This operation creates an address for a job. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.

{ svc := snowball.New(session.New()) input := &snowball.CreateAddressInput{ Address: &snowball.Address{ City: aws.String("Seattle"), Company: aws.String("My Company's Name"), Country: aws.String("USA"), Name: aws.String("My Name"), PhoneNumber: aws.String("425-555-5555"), PostalCode: aws.String("98101"), StateOrProvince: aws.String("WA"), Street1: aws.String("123 Main Street"), }, } result, err := svc.CreateAddress(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidAddressException: fmt.Println(snowball.ErrCodeInvalidAddressException, aerr.Error()) case snowball.ErrCodeUnsupportedAddressException: fmt.Println(snowball.ErrCodeUnsupportedAddressException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateAddressRequest

func (c *Snowball) CreateAddressRequest(input *CreateAddressInput) (req *request.Request, output *CreateAddressOutput)

CreateAddressRequest generates a "aws/request.Request" representing the client's request for the CreateAddress 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 CreateAddress for more information on using the CreateAddress 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 CreateAddressRequest method. req, resp := client.CreateAddressRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CreateAddress

CreateAddressWithContext

func (c *Snowball) CreateAddressWithContext(ctx aws.Context, input *CreateAddressInput, opts ...request.Option) (*CreateAddressOutput, error)

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

See CreateAddress 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 *Snowball) CreateCluster(input *CreateClusterInput) (*CreateClusterOutput, error)

CreateCluster API operation for Amazon Import/Export Snowball.

Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.

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 Amazon Import/Export Snowball's API operation CreateCluster for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeKMSRequestFailedException "KMSRequestFailedException" The provided AWS Key Management Service key lacks the permissions to perform the specified CreateJob or UpdateJob action.

  • ErrCodeInvalidInputCombinationException "InvalidInputCombinationException" Job or cluster creation failed. One ore more inputs were invalid. Confirm that the CreateClusterRequest$SnowballType value supports your CreateJobRequest$JobType, and try again.

  • ErrCodeEc2RequestFailedException "Ec2RequestFailedException" Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CreateCluster

Example

Snowball CreateCluster shared00

To create a cluster

Creates an empty cluster. Each cluster supports five nodes. You use the CreateJob action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.

{ svc := snowball.New(session.New()) input := &snowball.CreateClusterInput{ AddressId: aws.String("ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b"), Description: aws.String("MyCluster"), JobType: aws.String("LOCAL_USE"), KmsKeyARN: aws.String("arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456"), Notification: &snowball.Notification{ NotifyAll: aws.Bool(false), }, Resources: &snowball.JobResource{ S3Resources: []*snowball.S3Resource{ { BucketArn: aws.String("arn:aws:s3:::MyBucket"), KeyRange: &snowball.KeyRange{}, }, }, }, RoleARN: aws.String("arn:aws:iam::123456789012:role/snowball-import-S3-role"), ShippingOption: aws.String("SECOND_DAY"), SnowballType: aws.String("EDGE"), } result, err := svc.CreateCluster(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeKMSRequestFailedException: fmt.Println(snowball.ErrCodeKMSRequestFailedException, aerr.Error()) case snowball.ErrCodeInvalidInputCombinationException: fmt.Println(snowball.ErrCodeInvalidInputCombinationException, aerr.Error()) case snowball.ErrCodeEc2RequestFailedException: fmt.Println(snowball.ErrCodeEc2RequestFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateClusterRequest

func (c *Snowball) 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/snowball-2016-06-30/CreateCluster

CreateClusterWithContext

func (c *Snowball) 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.

CreateJob

func (c *Snowball) CreateJob(input *CreateJobInput) (*CreateJobOutput, error)

CreateJob API operation for Amazon Import/Export Snowball.

Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the 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 Amazon Import/Export Snowball's API operation CreateJob for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeKMSRequestFailedException "KMSRequestFailedException" The provided AWS Key Management Service key lacks the permissions to perform the specified CreateJob or UpdateJob action.

  • ErrCodeInvalidInputCombinationException "InvalidInputCombinationException" Job or cluster creation failed. One ore more inputs were invalid. Confirm that the CreateClusterRequest$SnowballType value supports your CreateJobRequest$JobType, and try again.

  • ErrCodeClusterLimitExceededException "ClusterLimitExceededException" Job creation failed. Currently, clusters support five nodes. If you have less than five nodes for your cluster and you have more nodes to create for this cluster, try again and create jobs until your cluster has exactly five notes.

  • ErrCodeEc2RequestFailedException "Ec2RequestFailedException" Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CreateJob

Example

Snowball CreateJob shared00

To create a job

Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the clusterId value; the other job attributes are inherited from the cluster.

{ svc := snowball.New(session.New()) input := &snowball.CreateJobInput{ AddressId: aws.String("ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b"), Description: aws.String("My Job"), JobType: aws.String("IMPORT"), KmsKeyARN: aws.String("arn:aws:kms:us-east-1:123456789012:key/abcd1234-12ab-34cd-56ef-123456123456"), Notification: &snowball.Notification{ NotifyAll: aws.Bool(false), }, Resources: &snowball.JobResource{ S3Resources: []*snowball.S3Resource{ { BucketArn: aws.String("arn:aws:s3:::MyBucket"), KeyRange: &snowball.KeyRange{}, }, }, }, RoleARN: aws.String("arn:aws:iam::123456789012:role/snowball-import-S3-role"), ShippingOption: aws.String("SECOND_DAY"), SnowballCapacityPreference: aws.String("T80"), SnowballType: aws.String("STANDARD"), } result, err := svc.CreateJob(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeKMSRequestFailedException: fmt.Println(snowball.ErrCodeKMSRequestFailedException, aerr.Error()) case snowball.ErrCodeInvalidInputCombinationException: fmt.Println(snowball.ErrCodeInvalidInputCombinationException, aerr.Error()) case snowball.ErrCodeClusterLimitExceededException: fmt.Println(snowball.ErrCodeClusterLimitExceededException, aerr.Error()) case snowball.ErrCodeEc2RequestFailedException: fmt.Println(snowball.ErrCodeEc2RequestFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateJobRequest

func (c *Snowball) CreateJobRequest(input *CreateJobInput) (req *request.Request, output *CreateJobOutput)

CreateJobRequest generates a "aws/request.Request" representing the client's request for the CreateJob 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 CreateJob for more information on using the CreateJob 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 CreateJobRequest method. req, resp := client.CreateJobRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/CreateJob

CreateJobWithContext

func (c *Snowball) CreateJobWithContext(ctx aws.Context, input *CreateJobInput, opts ...request.Option) (*CreateJobOutput, error)

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

See CreateJob 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.

DescribeAddress

func (c *Snowball) DescribeAddress(input *DescribeAddressInput) (*DescribeAddressOutput, error)

DescribeAddress API operation for Amazon Import/Export Snowball.

Takes an AddressId and returns specific details about that address in the form of an Address object.

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 Amazon Import/Export Snowball's API operation DescribeAddress for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeAddress

Example

Snowball DescribeAddress shared00

To describe an address for a job

This operation describes an address for a job.

{ svc := snowball.New(session.New()) input := &snowball.DescribeAddressInput{ AddressId: aws.String("ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b"), } result, err := svc.DescribeAddress(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeAddressRequest

func (c *Snowball) DescribeAddressRequest(input *DescribeAddressInput) (req *request.Request, output *DescribeAddressOutput)

DescribeAddressRequest generates a "aws/request.Request" representing the client's request for the DescribeAddress 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 DescribeAddress for more information on using the DescribeAddress 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 DescribeAddressRequest method. req, resp := client.DescribeAddressRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeAddress

DescribeAddressWithContext

func (c *Snowball) DescribeAddressWithContext(ctx aws.Context, input *DescribeAddressInput, opts ...request.Option) (*DescribeAddressOutput, error)

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

See DescribeAddress 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.

DescribeAddresses

func (c *Snowball) DescribeAddresses(input *DescribeAddressesInput) (*DescribeAddressesOutput, error)

DescribeAddresses API operation for Amazon Import/Export Snowball.

Returns a specified number of ADDRESS objects. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.

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 Amazon Import/Export Snowball's API operation DescribeAddresses for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidNextTokenException "InvalidNextTokenException" The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeAddresses

Example

Snowball DescribeAddresses shared00

To describe all the addresses you've created for AWS Snowball

This operation describes all the addresses that you've created for AWS Snowball. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.

{ svc := snowball.New(session.New()) input := &snowball.DescribeAddressesInput{} result, err := svc.DescribeAddresses(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidNextTokenException: fmt.Println(snowball.ErrCodeInvalidNextTokenException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeAddressesPages

func (c *Snowball) DescribeAddressesPages(input *DescribeAddressesInput, fn func(*DescribeAddressesOutput, bool) bool) error

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

See DescribeAddresses 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 DescribeAddresses operation. pageNum := 0 err := client.DescribeAddressesPages(params, func(page *DescribeAddressesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

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

DescribeAddressesPagesWithContext

func (c *Snowball) DescribeAddressesPagesWithContext(ctx aws.Context, input *DescribeAddressesInput, fn func(*DescribeAddressesOutput, bool) bool, opts ...request.Option) error

DescribeAddressesPagesWithContext same as DescribeAddressesPages 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.

DescribeAddressesRequest

func (c *Snowball) DescribeAddressesRequest(input *DescribeAddressesInput) (req *request.Request, output *DescribeAddressesOutput)

DescribeAddressesRequest generates a "aws/request.Request" representing the client's request for the DescribeAddresses 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 DescribeAddresses for more information on using the DescribeAddresses 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 DescribeAddressesRequest method. req, resp := client.DescribeAddressesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeAddresses

DescribeAddressesWithContext

func (c *Snowball) DescribeAddressesWithContext(ctx aws.Context, input *DescribeAddressesInput, opts ...request.Option) (*DescribeAddressesOutput, error)

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

See DescribeAddresses 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.

DescribeCluster

func (c *Snowball) DescribeCluster(input *DescribeClusterInput) (*DescribeClusterOutput, error)

DescribeCluster API operation for Amazon Import/Export Snowball.

Returns information about a specific cluster including shipping information, cluster status, and other important metadata.

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 Amazon Import/Export Snowball's API operation DescribeCluster for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeCluster

Example

Snowball DescribeCluster shared00

To describe a cluster

Returns information about a specific cluster including shipping information, cluster status, and other important metadata.

{ svc := snowball.New(session.New()) input := &snowball.DescribeClusterInput{ ClusterId: aws.String("CID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.DescribeCluster(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeClusterRequest

func (c *Snowball) DescribeClusterRequest(input *DescribeClusterInput) (req *request.Request, output *DescribeClusterOutput)

DescribeClusterRequest generates a "aws/request.Request" representing the client's request for the DescribeCluster 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 DescribeCluster for more information on using the DescribeCluster 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 DescribeClusterRequest method. req, resp := client.DescribeClusterRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeCluster

DescribeClusterWithContext

func (c *Snowball) DescribeClusterWithContext(ctx aws.Context, input *DescribeClusterInput, opts ...request.Option) (*DescribeClusterOutput, error)

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

See DescribeCluster 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.

DescribeJob

func (c *Snowball) DescribeJob(input *DescribeJobInput) (*DescribeJobOutput, error)

DescribeJob API operation for Amazon Import/Export Snowball.

Returns information about a specific job including shipping information, job status, and other important metadata.

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 Amazon Import/Export Snowball's API operation DescribeJob for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeJob

Example

Snowball DescribeJob shared00

To describe a job you've created for AWS Snowball

This operation describes a job you've created for AWS Snowball.

{ svc := snowball.New(session.New()) input := &snowball.DescribeJobInput{ JobId: aws.String("JID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.DescribeJob(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeJobRequest

func (c *Snowball) DescribeJobRequest(input *DescribeJobInput) (req *request.Request, output *DescribeJobOutput)

DescribeJobRequest generates a "aws/request.Request" representing the client's request for the DescribeJob 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 DescribeJob for more information on using the DescribeJob 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 DescribeJobRequest method. req, resp := client.DescribeJobRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeJob

DescribeJobWithContext

func (c *Snowball) DescribeJobWithContext(ctx aws.Context, input *DescribeJobInput, opts ...request.Option) (*DescribeJobOutput, error)

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

See DescribeJob 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.

GetJobManifest

func (c *Snowball) GetJobManifest(input *GetJobManifestInput) (*GetJobManifestOutput, error)

GetJobManifest API operation for Amazon Import/Export Snowball.

Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified JobId value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you'll have to make another call to the GetJobManifest action.

The manifest is an encrypted file that you can download after your job enters the WithCustomer status. The manifest is decrypted by using the UnlockCode code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.

As a best practice, we recommend that you don't save a copy of an UnlockCode value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.

The credentials of a given job, including its manifest file and unlock code, expire 90 days after the job is created.

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 Amazon Import/Export Snowball's API operation GetJobManifest for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidJobStateException "InvalidJobStateException" The action can't be performed because the job's current state doesn't allow that action to be performed.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/GetJobManifest

Example

Snowball GetJobManifest shared00

To get the manifest for a job you've created for AWS Snowball

Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified JobId value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you'll have to make another call to the GetJobManifest action.

The manifest is an encrypted file that you can download after your job enters the WithCustomer status. The manifest is decrypted by using the UnlockCode code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.

As a best practice, we recommend that you don't save a copy of an UnlockCode value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.

The credentials of a given job, including its manifest file and unlock code, expire 90 days after the job is created.

{ svc := snowball.New(session.New()) input := &snowball.GetJobManifestInput{ JobId: aws.String("JID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.GetJobManifest(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidJobStateException: fmt.Println(snowball.ErrCodeInvalidJobStateException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetJobManifestRequest

func (c *Snowball) GetJobManifestRequest(input *GetJobManifestInput) (req *request.Request, output *GetJobManifestOutput)

GetJobManifestRequest generates a "aws/request.Request" representing the client's request for the GetJobManifest 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 GetJobManifest for more information on using the GetJobManifest 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 GetJobManifestRequest method. req, resp := client.GetJobManifestRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/GetJobManifest

GetJobManifestWithContext

func (c *Snowball) GetJobManifestWithContext(ctx aws.Context, input *GetJobManifestInput, opts ...request.Option) (*GetJobManifestOutput, error)

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

See GetJobManifest 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.

GetJobUnlockCode

func (c *Snowball) GetJobUnlockCode(input *GetJobUnlockCodeInput) (*GetJobUnlockCodeOutput, error)

GetJobUnlockCode API operation for Amazon Import/Export Snowball.

Returns the UnlockCode code value for the specified job. A particular UnlockCode value can be accessed for up to 90 days after the associated job has been created.

The UnlockCode value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.

As a best practice, we recommend that you don't save a copy of the UnlockCode in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.

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 Amazon Import/Export Snowball's API operation GetJobUnlockCode for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidJobStateException "InvalidJobStateException" The action can't be performed because the job's current state doesn't allow that action to be performed.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/GetJobUnlockCode

Example

Snowball GetJobUnlockCode shared00

To get the unlock code for a job you've created for AWS Snowball

Returns the UnlockCode code value for the specified job. A particular UnlockCode value can be accessed for up to 90 days after the associated job has been created.

The UnlockCode value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.

As a best practice, we recommend that you don't save a copy of the UnlockCode in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.

{ svc := snowball.New(session.New()) input := &snowball.GetJobUnlockCodeInput{ JobId: aws.String("JID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.GetJobUnlockCode(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidJobStateException: fmt.Println(snowball.ErrCodeInvalidJobStateException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetJobUnlockCodeRequest

func (c *Snowball) GetJobUnlockCodeRequest(input *GetJobUnlockCodeInput) (req *request.Request, output *GetJobUnlockCodeOutput)

GetJobUnlockCodeRequest generates a "aws/request.Request" representing the client's request for the GetJobUnlockCode 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 GetJobUnlockCode for more information on using the GetJobUnlockCode 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 GetJobUnlockCodeRequest method. req, resp := client.GetJobUnlockCodeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/GetJobUnlockCode

GetJobUnlockCodeWithContext

func (c *Snowball) GetJobUnlockCodeWithContext(ctx aws.Context, input *GetJobUnlockCodeInput, opts ...request.Option) (*GetJobUnlockCodeOutput, error)

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

See GetJobUnlockCode 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.

GetSnowballUsage

func (c *Snowball) GetSnowballUsage(input *GetSnowballUsageInput) (*GetSnowballUsageOutput, error)

GetSnowballUsage API operation for Amazon Import/Export Snowball.

Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.

The default service limit for the number of Snowballs that you can have at one time is 1. If you want to increase your service limit, contact AWS Support.

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 Amazon Import/Export Snowball's API operation GetSnowballUsage for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/GetSnowballUsage

Example

Snowball GetSnowballUsage shared00

To see your Snowball service limit and the number of Snowballs you have in use

Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.

The default service limit for the number of Snowballs that you can have at one time is 1. If you want to increase your service limit, contact AWS Support.

{ svc := snowball.New(session.New()) input := &snowball.GetSnowballUsageInput{} result, err := svc.GetSnowballUsage(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetSnowballUsageRequest

func (c *Snowball) GetSnowballUsageRequest(input *GetSnowballUsageInput) (req *request.Request, output *GetSnowballUsageOutput)

GetSnowballUsageRequest generates a "aws/request.Request" representing the client's request for the GetSnowballUsage 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 GetSnowballUsage for more information on using the GetSnowballUsage 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 GetSnowballUsageRequest method. req, resp := client.GetSnowballUsageRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/GetSnowballUsage

GetSnowballUsageWithContext

func (c *Snowball) GetSnowballUsageWithContext(ctx aws.Context, input *GetSnowballUsageInput, opts ...request.Option) (*GetSnowballUsageOutput, error)

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

See GetSnowballUsage 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.

ListClusterJobs

func (c *Snowball) ListClusterJobs(input *ListClusterJobsInput) (*ListClusterJobsOutput, error)

ListClusterJobs API operation for Amazon Import/Export Snowball.

Returns an array of JobListEntry objects of the specified length. Each JobListEntry object is for a job in the specified cluster and contains a job's state, a job's ID, and other information.

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 Amazon Import/Export Snowball's API operation ListClusterJobs for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidNextTokenException "InvalidNextTokenException" The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListClusterJobs

Example

Snowball ListClusterJobs shared00

To get a list of jobs in a cluster that you've created for AWS Snowball

Returns an array of JobListEntry objects of the specified length. Each JobListEntry object is for a job in the specified cluster and contains a job's state, a job's ID, and other information.

{ svc := snowball.New(session.New()) input := &snowball.ListClusterJobsInput{ ClusterId: aws.String("CID123e4567-e89b-12d3-a456-426655440000"), } result, err := svc.ListClusterJobs(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidNextTokenException: fmt.Println(snowball.ErrCodeInvalidNextTokenException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListClusterJobsRequest

func (c *Snowball) ListClusterJobsRequest(input *ListClusterJobsInput) (req *request.Request, output *ListClusterJobsOutput)

ListClusterJobsRequest generates a "aws/request.Request" representing the client's request for the ListClusterJobs 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 ListClusterJobs for more information on using the ListClusterJobs 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 ListClusterJobsRequest method. req, resp := client.ListClusterJobsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListClusterJobs

ListClusterJobsWithContext

func (c *Snowball) ListClusterJobsWithContext(ctx aws.Context, input *ListClusterJobsInput, opts ...request.Option) (*ListClusterJobsOutput, error)

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

See ListClusterJobs 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.

ListClusters

func (c *Snowball) ListClusters(input *ListClustersInput) (*ListClustersOutput, error)

ListClusters API operation for Amazon Import/Export Snowball.

Returns an array of ClusterListEntry objects of the specified length. Each ClusterListEntry object contains a cluster's state, a cluster's ID, and other important status information.

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 Amazon Import/Export Snowball's API operation ListClusters for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidNextTokenException "InvalidNextTokenException" The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListClusters

Example

Snowball ListClusters shared00

To get a list of clusters that you've created for AWS Snowball

Returns an array of ClusterListEntry objects of the specified length. Each ClusterListEntry object contains a cluster's state, a cluster's ID, and other important status information.

{ svc := snowball.New(session.New()) input := &snowball.ListClustersInput{} result, err := svc.ListClusters(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidNextTokenException: fmt.Println(snowball.ErrCodeInvalidNextTokenException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListClustersRequest

func (c *Snowball) ListClustersRequest(input *ListClustersInput) (req *request.Request, output *ListClustersOutput)

ListClustersRequest generates a "aws/request.Request" representing the client's request for the ListClusters 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 ListClusters for more information on using the ListClusters 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 ListClustersRequest method. req, resp := client.ListClustersRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListClusters

ListClustersWithContext

func (c *Snowball) ListClustersWithContext(ctx aws.Context, input *ListClustersInput, opts ...request.Option) (*ListClustersOutput, error)

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

See ListClusters 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.

ListCompatibleImages

func (c *Snowball) ListCompatibleImages(input *ListCompatibleImagesInput) (*ListCompatibleImagesOutput, error)

ListCompatibleImages API operation for Amazon Import/Export Snowball.

This action returns a list of the different Amazon EC2 Amazon Machine Images (AMIs) that are owned by your AWS account that would be supported for use on EDGE, EDGE_C, and EDGE_CG devices. For more information on compatible AMIs, see Using Amazon EC2 Compute Instances (https://docs.aws.amazon.com/snowball/latest/developer-guide/using-ec2.html) in the AWS Snowball Developer Guide.

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 Amazon Import/Export Snowball's API operation ListCompatibleImages for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidNextTokenException "InvalidNextTokenException" The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

  • ErrCodeEc2RequestFailedException "Ec2RequestFailedException" Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListCompatibleImages

ListCompatibleImagesRequest

func (c *Snowball) ListCompatibleImagesRequest(input *ListCompatibleImagesInput) (req *request.Request, output *ListCompatibleImagesOutput)

ListCompatibleImagesRequest generates a "aws/request.Request" representing the client's request for the ListCompatibleImages 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 ListCompatibleImages for more information on using the ListCompatibleImages 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 ListCompatibleImagesRequest method. req, resp := client.ListCompatibleImagesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListCompatibleImages

ListCompatibleImagesWithContext

func (c *Snowball) ListCompatibleImagesWithContext(ctx aws.Context, input *ListCompatibleImagesInput, opts ...request.Option) (*ListCompatibleImagesOutput, error)

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

See ListCompatibleImages 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.

ListJobs

func (c *Snowball) ListJobs(input *ListJobsInput) (*ListJobsOutput, error)

ListJobs API operation for Amazon Import/Export Snowball.

Returns an array of JobListEntry objects of the specified length. Each JobListEntry object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.

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 Amazon Import/Export Snowball's API operation ListJobs for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidNextTokenException "InvalidNextTokenException" The NextToken string was altered unexpectedly, and the operation has stopped. Run the operation without changing the NextToken string, and try again.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListJobs

Example

Snowball ListJobs shared00

To get a list of jobs that you've created for AWS Snowball

Returns an array of JobListEntry objects of the specified length. Each JobListEntry object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.

{ svc := snowball.New(session.New()) input := &snowball.ListJobsInput{} result, err := svc.ListJobs(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidNextTokenException: fmt.Println(snowball.ErrCodeInvalidNextTokenException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListJobsPages

func (c *Snowball) ListJobsPages(input *ListJobsInput, fn func(*ListJobsOutput, bool) bool) error

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

See ListJobs 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 ListJobs operation. pageNum := 0 err := client.ListJobsPages(params, func(page *ListJobsOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

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

ListJobsPagesWithContext

func (c *Snowball) ListJobsPagesWithContext(ctx aws.Context, input *ListJobsInput, fn func(*ListJobsOutput, bool) bool, opts ...request.Option) error

ListJobsPagesWithContext same as ListJobsPages 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.

ListJobsRequest

func (c *Snowball) ListJobsRequest(input *ListJobsInput) (req *request.Request, output *ListJobsOutput)

ListJobsRequest generates a "aws/request.Request" representing the client's request for the ListJobs 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 ListJobs for more information on using the ListJobs 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 ListJobsRequest method. req, resp := client.ListJobsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/ListJobs

ListJobsWithContext

func (c *Snowball) ListJobsWithContext(ctx aws.Context, input *ListJobsInput, opts ...request.Option) (*ListJobsOutput, error)

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

See ListJobs 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.

UpdateCluster

func (c *Snowball) UpdateCluster(input *UpdateClusterInput) (*UpdateClusterOutput, error)

UpdateCluster API operation for Amazon Import/Export Snowball.

While a cluster's ClusterState value is in the AwaitingQuorum state, you can update some of the information associated with a cluster. Once the cluster changes to a different job state, usually 60 minutes after the cluster being created, this action is no longer available.

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 Amazon Import/Export Snowball's API operation UpdateCluster for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidJobStateException "InvalidJobStateException" The action can't be performed because the job's current state doesn't allow that action to be performed.

  • ErrCodeKMSRequestFailedException "KMSRequestFailedException" The provided AWS Key Management Service key lacks the permissions to perform the specified CreateJob or UpdateJob action.

  • ErrCodeInvalidInputCombinationException "InvalidInputCombinationException" Job or cluster creation failed. One ore more inputs were invalid. Confirm that the CreateClusterRequest$SnowballType value supports your CreateJobRequest$JobType, and try again.

  • ErrCodeEc2RequestFailedException "Ec2RequestFailedException" Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/UpdateCluster

Example

Snowball UpdateCluster shared00

To update a cluster

This action allows you to update certain parameters for a cluster. Once the cluster changes to a different state, usually within 60 minutes of it being created, this action is no longer available.

{ svc := snowball.New(session.New()) input := &snowball.UpdateClusterInput{ AddressId: aws.String("ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b"), ClusterId: aws.String("CID123e4567-e89b-12d3-a456-426655440000"), Description: aws.String("Updated the address to send this to image processing - RJ"), } result, err := svc.UpdateCluster(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidJobStateException: fmt.Println(snowball.ErrCodeInvalidJobStateException, aerr.Error()) case snowball.ErrCodeKMSRequestFailedException: fmt.Println(snowball.ErrCodeKMSRequestFailedException, aerr.Error()) case snowball.ErrCodeInvalidInputCombinationException: fmt.Println(snowball.ErrCodeInvalidInputCombinationException, aerr.Error()) case snowball.ErrCodeEc2RequestFailedException: fmt.Println(snowball.ErrCodeEc2RequestFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateClusterRequest

func (c *Snowball) UpdateClusterRequest(input *UpdateClusterInput) (req *request.Request, output *UpdateClusterOutput)

UpdateClusterRequest generates a "aws/request.Request" representing the client's request for the UpdateCluster 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 UpdateCluster for more information on using the UpdateCluster 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 UpdateClusterRequest method. req, resp := client.UpdateClusterRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/UpdateCluster

UpdateClusterWithContext

func (c *Snowball) UpdateClusterWithContext(ctx aws.Context, input *UpdateClusterInput, opts ...request.Option) (*UpdateClusterOutput, error)

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

See UpdateCluster 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.

UpdateJob

func (c *Snowball) UpdateJob(input *UpdateJobInput) (*UpdateJobOutput, error)

UpdateJob API operation for Amazon Import/Export Snowball.

While a job's JobState value is New, you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.

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 Amazon Import/Export Snowball's API operation UpdateJob for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidResourceException "InvalidResourceException" The specified resource can't be found. Check the information you provided in your last request, and try again.

  • ErrCodeInvalidJobStateException "InvalidJobStateException" The action can't be performed because the job's current state doesn't allow that action to be performed.

  • ErrCodeKMSRequestFailedException "KMSRequestFailedException" The provided AWS Key Management Service key lacks the permissions to perform the specified CreateJob or UpdateJob action.

  • ErrCodeInvalidInputCombinationException "InvalidInputCombinationException" Job or cluster creation failed. One ore more inputs were invalid. Confirm that the CreateClusterRequest$SnowballType value supports your CreateJobRequest$JobType, and try again.

  • ErrCodeClusterLimitExceededException "ClusterLimitExceededException" Job creation failed. Currently, clusters support five nodes. If you have less than five nodes for your cluster and you have more nodes to create for this cluster, try again and create jobs until your cluster has exactly five notes.

  • ErrCodeEc2RequestFailedException "Ec2RequestFailedException" Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/UpdateJob

Example

Snowball UpdateJob shared00

To update a job

This action allows you to update certain parameters for a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.

{ svc := snowball.New(session.New()) input := &snowball.UpdateJobInput{ AddressId: aws.String("ADID1234ab12-3eec-4eb3-9be6-9374c10eb51b"), Description: aws.String("Upgraded to Edge, shipped to Finance Dept, and requested faster shipping speed - TS."), JobId: aws.String("JID123e4567-e89b-12d3-a456-426655440000"), ShippingOption: aws.String("NEXT_DAY"), SnowballCapacityPreference: aws.String("T100"), } result, err := svc.UpdateJob(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case snowball.ErrCodeInvalidResourceException: fmt.Println(snowball.ErrCodeInvalidResourceException, aerr.Error()) case snowball.ErrCodeInvalidJobStateException: fmt.Println(snowball.ErrCodeInvalidJobStateException, aerr.Error()) case snowball.ErrCodeKMSRequestFailedException: fmt.Println(snowball.ErrCodeKMSRequestFailedException, aerr.Error()) case snowball.ErrCodeInvalidInputCombinationException: fmt.Println(snowball.ErrCodeInvalidInputCombinationException, aerr.Error()) case snowball.ErrCodeClusterLimitExceededException: fmt.Println(snowball.ErrCodeClusterLimitExceededException, aerr.Error()) case snowball.ErrCodeEc2RequestFailedException: fmt.Println(snowball.ErrCodeEc2RequestFailedException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateJobRequest

func (c *Snowball) UpdateJobRequest(input *UpdateJobInput) (req *request.Request, output *UpdateJobOutput)

UpdateJobRequest generates a "aws/request.Request" representing the client's request for the UpdateJob 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 UpdateJob for more information on using the UpdateJob 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 UpdateJobRequest method. req, resp := client.UpdateJobRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/UpdateJob

UpdateJobWithContext

func (c *Snowball) UpdateJobWithContext(ctx aws.Context, input *UpdateJobInput, opts ...request.Option) (*UpdateJobOutput, error)

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

See UpdateJob 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: