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.

StorageGateway

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

type StorageGateway struct { *client.Client }

StorageGateway provides the API operation methods for making requests to AWS Storage Gateway. See this package's package overview docs for details on the service.

StorageGateway 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

ActivateGateway

func (c *StorageGateway) ActivateGateway(input *ActivateGatewayInput) (*ActivateGatewayOutput, error)

ActivateGateway API operation for AWS Storage Gateway.

Activates the gateway you previously deployed on your host. In the activation process, you specify information such as the region you want to use for storing snapshots or tapes, the time zone for scheduled snapshots the gateway snapshot schedule window, an activation key, and a name for your gateway. The activation process also associates your gateway with your account; for more information, see UpdateGatewayInformation.

You must turn on the gateway VM before you can activate your gateway.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ActivateGateway for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway

Example

StorageGateway ActivateGateway shared00

To activate the gateway

Activates the gateway you previously deployed on your host.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ActivateGatewayInput{ ActivationKey: aws.String("29AV1-3OFV9-VVIUB-NKT0I-LRO6V"), GatewayName: aws.String("My_Gateway"), GatewayRegion: aws.String("us-east-1"), GatewayTimezone: aws.String("GMT-12:00"), GatewayType: aws.String("STORED"), MediumChangerType: aws.String("AWS-Gateway-VTL"), TapeDriveType: aws.String("IBM-ULT3580-TD5"), } result, err := svc.ActivateGateway(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ActivateGatewayRequest

func (c *StorageGateway) ActivateGatewayRequest(input *ActivateGatewayInput) (req *request.Request, output *ActivateGatewayOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ActivateGateway

ActivateGatewayWithContext

func (c *StorageGateway) ActivateGatewayWithContext(ctx aws.Context, input *ActivateGatewayInput, opts ...request.Option) (*ActivateGatewayOutput, error)

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

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

AddCache

func (c *StorageGateway) AddCache(input *AddCacheInput) (*AddCacheOutput, error)

AddCache API operation for AWS Storage Gateway.

Configures one or more gateway local disks as cache for a gateway. This operation is only supported in the cached volume, tape and file gateway type (see Storage Gateway Concepts (https://docs.aws.amazon.com/storagegateway/latest/userguide/StorageGatewayConcepts.html)).

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to add cache, and one or more disk IDs that you want to configure as cache.

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

See the AWS API reference guide for AWS Storage Gateway's API operation AddCache for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache

Example

StorageGateway AddCache shared00

To add a cache

The following example shows a request that activates a gateway-stored volume.

{ svc := storagegateway.New(session.New()) input := &storagegateway.AddCacheInput{ DiskIds: []*string{ aws.String("pci-0000:03:00.0-scsi-0:0:0:0"), aws.String("pci-0000:03:00.0-scsi-0:0:1:0"), }, GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.AddCache(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

AddCacheRequest

func (c *StorageGateway) AddCacheRequest(input *AddCacheInput) (req *request.Request, output *AddCacheOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddCache

AddCacheWithContext

func (c *StorageGateway) AddCacheWithContext(ctx aws.Context, input *AddCacheInput, opts ...request.Option) (*AddCacheOutput, error)

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

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

AddTagsToResource

func (c *StorageGateway) AddTagsToResource(input *AddTagsToResourceInput) (*AddTagsToResourceOutput, error)

AddTagsToResource API operation for AWS Storage Gateway.

Adds one or more tags to the specified resource. You use tags to add metadata to resources, which you can use to categorize these resources. For example, you can categorize resources by purpose, owner, environment, or team. Each tag consists of a key and a value, which you define. You can add tags to the following AWS Storage Gateway resources:

  • Storage gateways of all types

  • Storage Volumes

  • Virtual Tapes

You can create a maximum of 10 tags for each resource. Virtual tapes and storage volumes that are recovered to a new gateway maintain their tags.

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

See the AWS API reference guide for AWS Storage Gateway's API operation AddTagsToResource for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource

Example

StorageGateway AddTagsToResource shared00

To add tags to resource

Adds one or more tags to the specified resource.

{ svc := storagegateway.New(session.New()) input := &storagegateway.AddTagsToResourceInput{ ResourceARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B"), Tags: []*storagegateway.Tag{ { Key: aws.String("Dev Gatgeway Region"), Value: aws.String("East Coast"), }, }, } result, err := svc.AddTagsToResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

AddTagsToResourceRequest

func (c *StorageGateway) AddTagsToResourceRequest(input *AddTagsToResourceInput) (req *request.Request, output *AddTagsToResourceOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddTagsToResource

AddTagsToResourceWithContext

func (c *StorageGateway) AddTagsToResourceWithContext(ctx aws.Context, input *AddTagsToResourceInput, opts ...request.Option) (*AddTagsToResourceOutput, error)

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

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

AddUploadBuffer

func (c *StorageGateway) AddUploadBuffer(input *AddUploadBufferInput) (*AddUploadBufferOutput, error)

AddUploadBuffer API operation for AWS Storage Gateway.

Configures one or more gateway local disks as upload buffer for a specified gateway. This operation is supported for the stored volume, cached volume and tape gateway types.

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to add upload buffer, and one or more disk IDs that you want to configure as upload buffer.

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

See the AWS API reference guide for AWS Storage Gateway's API operation AddUploadBuffer for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer

Example

StorageGateway AddUploadBuffer shared00

To add upload buffer on local disk

Configures one or more gateway local disks as upload buffer for a specified gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.AddUploadBufferInput{ DiskIds: []*string{ aws.String("pci-0000:03:00.0-scsi-0:0:0:0"), aws.String("pci-0000:03:00.0-scsi-0:0:1:0"), }, GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.AddUploadBuffer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

AddUploadBufferRequest

func (c *StorageGateway) AddUploadBufferRequest(input *AddUploadBufferInput) (req *request.Request, output *AddUploadBufferOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddUploadBuffer

AddUploadBufferWithContext

func (c *StorageGateway) AddUploadBufferWithContext(ctx aws.Context, input *AddUploadBufferInput, opts ...request.Option) (*AddUploadBufferOutput, error)

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

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

AddWorkingStorage

func (c *StorageGateway) AddWorkingStorage(input *AddWorkingStorageInput) (*AddWorkingStorageOutput, error)

AddWorkingStorage API operation for AWS Storage Gateway.

Configures one or more gateway local disks as working storage for a gateway. This operation is only supported in the stored volume gateway type. This operation is deprecated in cached volume API version 20120630. Use AddUploadBuffer instead.

Working storage is also referred to as upload buffer. You can also use the AddUploadBuffer operation to add upload buffer to a stored volume gateway.

In the request, you specify the gateway Amazon Resource Name (ARN) to which you want to add working storage, and one or more disk IDs that you want to configure as working storage.

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

See the AWS API reference guide for AWS Storage Gateway's API operation AddWorkingStorage for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage

Example

StorageGateway AddWorkingStorage shared00

To add storage on local disk

Configures one or more gateway local disks as working storage for a gateway. (Working storage is also referred to as upload buffer.)

{ svc := storagegateway.New(session.New()) input := &storagegateway.AddWorkingStorageInput{ DiskIds: []*string{ aws.String("pci-0000:03:00.0-scsi-0:0:0:0"), aws.String("pci-0000:03:00.0-scsi-0:0:1:0"), }, GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.AddWorkingStorage(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

AddWorkingStorageRequest

func (c *StorageGateway) AddWorkingStorageRequest(input *AddWorkingStorageInput) (req *request.Request, output *AddWorkingStorageOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AddWorkingStorage

AddWorkingStorageWithContext

func (c *StorageGateway) AddWorkingStorageWithContext(ctx aws.Context, input *AddWorkingStorageInput, opts ...request.Option) (*AddWorkingStorageOutput, error)

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

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

AttachVolume

func (c *StorageGateway) AttachVolume(input *AttachVolumeInput) (*AttachVolumeOutput, error)

AttachVolume API operation for AWS Storage Gateway.

Connects a volume to an iSCSI connection and then attaches the volume to the specified gateway. Detaching and attaching a volume enables you to recover your data from one gateway to a different gateway without creating a snapshot. It also makes it easier to move your volumes from an on-premises gateway to a gateway hosted on an Amazon EC2 instance.

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

See the AWS API reference guide for AWS Storage Gateway's API operation AttachVolume for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume

AttachVolumeRequest

func (c *StorageGateway) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Request, output *AttachVolumeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/AttachVolume

AttachVolumeWithContext

func (c *StorageGateway) AttachVolumeWithContext(ctx aws.Context, input *AttachVolumeInput, opts ...request.Option) (*AttachVolumeOutput, error)

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

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

CancelArchival

func (c *StorageGateway) CancelArchival(input *CancelArchivalInput) (*CancelArchivalOutput, error)

CancelArchival API operation for AWS Storage Gateway.

Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after the archiving process is initiated. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CancelArchival for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival

Example

StorageGateway CancelArchival shared00

To cancel virtual tape archiving

Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after the archiving process is initiated.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CancelArchivalInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), TapeARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4"), } result, err := svc.CancelArchival(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CancelArchivalRequest

func (c *StorageGateway) CancelArchivalRequest(input *CancelArchivalInput) (req *request.Request, output *CancelArchivalOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelArchival

CancelArchivalWithContext

func (c *StorageGateway) CancelArchivalWithContext(ctx aws.Context, input *CancelArchivalInput, opts ...request.Option) (*CancelArchivalOutput, error)

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

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

CancelRetrieval

func (c *StorageGateway) CancelRetrieval(input *CancelRetrievalInput) (*CancelRetrievalOutput, error)

CancelRetrieval API operation for AWS Storage Gateway.

Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to a gateway after the retrieval process is initiated. The virtual tape is returned to the VTS. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CancelRetrieval for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval

Example

StorageGateway CancelRetrieval shared00

To cancel virtual tape retrieval

Cancels retrieval of a virtual tape from the virtual tape shelf (VTS) to a gateway after the retrieval process is initiated.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CancelRetrievalInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), TapeARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4"), } result, err := svc.CancelRetrieval(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CancelRetrievalRequest

func (c *StorageGateway) CancelRetrievalRequest(input *CancelRetrievalInput) (req *request.Request, output *CancelRetrievalOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CancelRetrieval

CancelRetrievalWithContext

func (c *StorageGateway) CancelRetrievalWithContext(ctx aws.Context, input *CancelRetrievalInput, opts ...request.Option) (*CancelRetrievalOutput, error)

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

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

CreateCachediSCSIVolume

func (c *StorageGateway) CreateCachediSCSIVolume(input *CreateCachediSCSIVolumeInput) (*CreateCachediSCSIVolumeOutput, error)

CreateCachediSCSIVolume API operation for AWS Storage Gateway.

Creates a cached volume on a specified cached volume gateway. This operation is only supported in the cached volume gateway type.

Cache storage must be allocated to the gateway before you can create a cached volume. Use the AddCache operation to add cache storage to a gateway.

In the request, you must specify the gateway, size of the volume in bytes, the iSCSI target name, an IP address on which to expose the target, and a unique client token. In response, the gateway creates the volume and returns information about it. This information includes the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that initiators can use to connect to the volume target.

Optionally, you can provide the ARN for an existing volume as the SourceVolumeARN for this cached volume, which creates an exact copy of the existing volume’s latest recovery point. The VolumeSizeInBytes value must be equal to or larger than the size of the copied volume, in bytes.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateCachediSCSIVolume for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume

Example

StorageGateway CreateCachediSCSIVolume shared00

To create a cached iSCSI volume

Creates a cached volume on a specified cached gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CreateCachediSCSIVolumeInput{ ClientToken: aws.String("cachedvol112233"), GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), NetworkInterfaceId: aws.String("10.1.1.1"), SnapshotId: aws.String("snap-f47b7b94"), TargetName: aws.String("my-volume"), VolumeSizeInBytes: aws.Int64(536870912000), } result, err := svc.CreateCachediSCSIVolume(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateCachediSCSIVolumeRequest

func (c *StorageGateway) CreateCachediSCSIVolumeRequest(input *CreateCachediSCSIVolumeInput) (req *request.Request, output *CreateCachediSCSIVolumeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateCachediSCSIVolume

CreateCachediSCSIVolumeWithContext

func (c *StorageGateway) CreateCachediSCSIVolumeWithContext(ctx aws.Context, input *CreateCachediSCSIVolumeInput, opts ...request.Option) (*CreateCachediSCSIVolumeOutput, error)

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

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

CreateNFSFileShare

func (c *StorageGateway) CreateNFSFileShare(input *CreateNFSFileShareInput) (*CreateNFSFileShareOutput, error)

CreateNFSFileShare API operation for AWS Storage Gateway.

Creates a Network File System (NFS) file share on an existing file gateway. In Storage Gateway, a file share is a file system mount point backed by Amazon S3 cloud storage. Storage Gateway exposes file shares using a NFS interface. This operation is only supported for file gateways.

File gateway requires AWS Security Token Service (AWS STS) to be activated to enable you create a file share. Make sure AWS STS is activated in the region you are creating your file gateway in. If AWS STS is not activated in the region, activate it. For information about how to activate AWS STS, see Activating and Deactivating AWS STS in an AWS Region in the AWS Identity and Access Management User Guide.

File gateway does not support creating hard or symbolic links on a file share.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateNFSFileShare for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare

CreateNFSFileShareRequest

func (c *StorageGateway) CreateNFSFileShareRequest(input *CreateNFSFileShareInput) (req *request.Request, output *CreateNFSFileShareOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateNFSFileShare

CreateNFSFileShareWithContext

func (c *StorageGateway) CreateNFSFileShareWithContext(ctx aws.Context, input *CreateNFSFileShareInput, opts ...request.Option) (*CreateNFSFileShareOutput, error)

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

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

CreateSMBFileShare

func (c *StorageGateway) CreateSMBFileShare(input *CreateSMBFileShareInput) (*CreateSMBFileShareOutput, error)

CreateSMBFileShare API operation for AWS Storage Gateway.

Creates a Server Message Block (SMB) file share on an existing file gateway. In Storage Gateway, a file share is a file system mount point backed by Amazon S3 cloud storage. Storage Gateway expose file shares using a SMB interface. This operation is only supported for file gateways.

File gateways require AWS Security Token Service (AWS STS) to be activated to enable you to create a file share. Make sure that AWS STS is activated in the AWS Region you are creating your file gateway in. If AWS STS is not activated in this AWS Region, activate it. For information about how to activate AWS STS, see Activating and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) in the AWS Identity and Access Management User Guide.

File gateways don't support creating hard or symbolic links on a file share.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateSMBFileShare for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare

CreateSMBFileShareRequest

func (c *StorageGateway) CreateSMBFileShareRequest(input *CreateSMBFileShareInput) (req *request.Request, output *CreateSMBFileShareOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSMBFileShare

CreateSMBFileShareWithContext

func (c *StorageGateway) CreateSMBFileShareWithContext(ctx aws.Context, input *CreateSMBFileShareInput, opts ...request.Option) (*CreateSMBFileShareOutput, error)

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

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

CreateSnapshot

func (c *StorageGateway) CreateSnapshot(input *CreateSnapshotInput) (*CreateSnapshotOutput, error)

CreateSnapshot API operation for AWS Storage Gateway.

Initiates a snapshot of a volume.

AWS Storage Gateway provides the ability to back up point-in-time snapshots of your data to Amazon Simple Storage (S3) for durable off-site recovery, as well as import the data to an Amazon Elastic Block Store (EBS) volume in Amazon Elastic Compute Cloud (EC2). You can take snapshots of your gateway volume on a scheduled or ad-hoc basis. This API enables you to take ad-hoc snapshot. For more information, see Editing a Snapshot Schedule (https://docs.aws.amazon.com/storagegateway/latest/userguide/managing-volumes.html#SchedulingSnapshot).

In the CreateSnapshot request you identify the volume by providing its Amazon Resource Name (ARN). You must also provide description for the snapshot. When AWS Storage Gateway takes the snapshot of specified volume, the snapshot and description appears in the AWS Storage Gateway Console. In response, AWS Storage Gateway returns you a snapshot ID. You can use this snapshot ID to check the snapshot progress or later use it when you want to create a volume from a snapshot. This operation is only supported in stored and cached volume gateway type.

To list or delete a snapshot, you must use the Amazon EC2 API. For more information, see DescribeSnapshots or DeleteSnapshot in the EC2 API reference (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Operations.html).

Volume and snapshot IDs are changing to a longer length ID format. For more information, see the important note on the Welcome (https://docs.aws.amazon.com/storagegateway/latest/APIReference/Welcome.html) page.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateSnapshot for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

  • ErrCodeServiceUnavailableError "ServiceUnavailableError" An internal server error has occurred because the service is unavailable. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot

Example

StorageGateway CreateSnapshot shared00

To create a snapshot of a gateway volume

Initiates an ad-hoc snapshot of a gateway volume.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CreateSnapshotInput{ SnapshotDescription: aws.String("My root volume snapshot as of 10/03/2017"), VolumeARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), } result, err := svc.CreateSnapshot(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) case storagegateway.ErrCodeServiceUnavailableError: fmt.Println(storagegateway.ErrCodeServiceUnavailableError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateSnapshotFromVolumeRecoveryPoint

func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPoint(input *CreateSnapshotFromVolumeRecoveryPointInput) (*CreateSnapshotFromVolumeRecoveryPointOutput, error)

CreateSnapshotFromVolumeRecoveryPoint API operation for AWS Storage Gateway.

Initiates a snapshot of a gateway from a volume recovery point. This operation is only supported in the cached volume gateway type.

A volume recovery point is a point in time at which all data of the volume is consistent and from which you can create a snapshot. To get a list of volume recovery point for cached volume gateway, use ListVolumeRecoveryPoints.

In the CreateSnapshotFromVolumeRecoveryPoint request, you identify the volume by providing its Amazon Resource Name (ARN). You must also provide a description for the snapshot. When the gateway takes a snapshot of the specified volume, the snapshot and its description appear in the AWS Storage Gateway console. In response, the gateway returns you a snapshot ID. You can use this snapshot ID to check the snapshot progress or later use it when you want to create a volume from a snapshot.

To list or delete a snapshot, you must use the Amazon EC2 API. For more information, in Amazon Elastic Compute Cloud API Reference.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateSnapshotFromVolumeRecoveryPoint for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

  • ErrCodeServiceUnavailableError "ServiceUnavailableError" An internal server error has occurred because the service is unavailable. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint

Example

StorageGateway CreateSnapshotFromVolumeRecoveryPoint shared00

To create a snapshot of a gateway volume

Initiates a snapshot of a gateway from a volume recovery point.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CreateSnapshotFromVolumeRecoveryPointInput{ SnapshotDescription: aws.String("My root volume snapshot as of 2017-06-30T10:10:10.000Z"), VolumeARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), } result, err := svc.CreateSnapshotFromVolumeRecoveryPoint(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) case storagegateway.ErrCodeServiceUnavailableError: fmt.Println(storagegateway.ErrCodeServiceUnavailableError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateSnapshotFromVolumeRecoveryPointRequest

func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointRequest(input *CreateSnapshotFromVolumeRecoveryPointInput) (req *request.Request, output *CreateSnapshotFromVolumeRecoveryPointOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshotFromVolumeRecoveryPoint

CreateSnapshotFromVolumeRecoveryPointWithContext

func (c *StorageGateway) CreateSnapshotFromVolumeRecoveryPointWithContext(ctx aws.Context, input *CreateSnapshotFromVolumeRecoveryPointInput, opts ...request.Option) (*CreateSnapshotFromVolumeRecoveryPointOutput, error)

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

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

CreateSnapshotRequest

func (c *StorageGateway) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Request, output *CreateSnapshotOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateSnapshot

CreateSnapshotWithContext

func (c *StorageGateway) CreateSnapshotWithContext(ctx aws.Context, input *CreateSnapshotInput, opts ...request.Option) (*CreateSnapshotOutput, error)

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

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

CreateStorediSCSIVolume

func (c *StorageGateway) CreateStorediSCSIVolume(input *CreateStorediSCSIVolumeInput) (*CreateStorediSCSIVolumeOutput, error)

CreateStorediSCSIVolume API operation for AWS Storage Gateway.

Creates a volume on a specified gateway. This operation is only supported in the stored volume gateway type.

The size of the volume to create is inferred from the disk size. You can choose to preserve existing data on the disk, create volume from an existing snapshot, or create an empty volume. If you choose to create an empty gateway volume, then any existing data on the disk is erased.

In the request you must specify the gateway and the disk information on which you are creating the volume. In response, the gateway creates the volume and returns volume information such as the volume Amazon Resource Name (ARN), its size, and the iSCSI target ARN that initiators can use to connect to the volume target.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateStorediSCSIVolume for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume

Example

StorageGateway CreateStorediSCSIVolume shared00

To create a stored iSCSI volume

Creates a stored volume on a specified stored gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CreateStorediSCSIVolumeInput{ DiskId: aws.String("pci-0000:03:00.0-scsi-0:0:0:0"), GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), NetworkInterfaceId: aws.String("10.1.1.1"), PreserveExistingData: aws.Bool(true), SnapshotId: aws.String("snap-f47b7b94"), TargetName: aws.String("my-volume"), } result, err := svc.CreateStorediSCSIVolume(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateStorediSCSIVolumeRequest

func (c *StorageGateway) CreateStorediSCSIVolumeRequest(input *CreateStorediSCSIVolumeInput) (req *request.Request, output *CreateStorediSCSIVolumeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateStorediSCSIVolume

CreateStorediSCSIVolumeWithContext

func (c *StorageGateway) CreateStorediSCSIVolumeWithContext(ctx aws.Context, input *CreateStorediSCSIVolumeInput, opts ...request.Option) (*CreateStorediSCSIVolumeOutput, error)

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

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

CreateTapeWithBarcode

func (c *StorageGateway) CreateTapeWithBarcode(input *CreateTapeWithBarcodeInput) (*CreateTapeWithBarcodeOutput, error)

CreateTapeWithBarcode API operation for AWS Storage Gateway.

Creates a virtual tape by using your own barcode. You write data to the virtual tape and then archive the tape. A barcode is unique and can not be reused if it has already been used on a tape . This applies to barcodes used on deleted tapes. This operation is only supported in the tape gateway type.

Cache storage must be allocated to the gateway before you can create a virtual tape. Use the AddCache operation to add cache storage to a gateway.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateTapeWithBarcode for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode

Example

StorageGateway CreateTapeWithBarcode shared00

To create a virtual tape using a barcode

Creates a virtual tape by using your own barcode.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CreateTapeWithBarcodeInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), TapeBarcode: aws.String("TEST12345"), TapeSizeInBytes: aws.Int64(107374182400), } result, err := svc.CreateTapeWithBarcode(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateTapeWithBarcodeRequest

func (c *StorageGateway) CreateTapeWithBarcodeRequest(input *CreateTapeWithBarcodeInput) (req *request.Request, output *CreateTapeWithBarcodeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapeWithBarcode

CreateTapeWithBarcodeWithContext

func (c *StorageGateway) CreateTapeWithBarcodeWithContext(ctx aws.Context, input *CreateTapeWithBarcodeInput, opts ...request.Option) (*CreateTapeWithBarcodeOutput, error)

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

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

CreateTapes

func (c *StorageGateway) CreateTapes(input *CreateTapesInput) (*CreateTapesOutput, error)

CreateTapes API operation for AWS Storage Gateway.

Creates one or more virtual tapes. You write data to the virtual tapes and then archive the tapes. This operation is only supported in the tape gateway type.

Cache storage must be allocated to the gateway before you can create virtual tapes. Use the AddCache operation to add cache storage to a gateway.

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

See the AWS API reference guide for AWS Storage Gateway's API operation CreateTapes for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes

Example

StorageGateway CreateTapes shared00

To create a virtual tape

Creates one or more virtual tapes.

{ svc := storagegateway.New(session.New()) input := &storagegateway.CreateTapesInput{ ClientToken: aws.String("77777"), GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), NumTapesToCreate: aws.Int64(3), TapeBarcodePrefix: aws.String("TEST"), TapeSizeInBytes: aws.Int64(107374182400), } result, err := svc.CreateTapes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateTapesRequest

func (c *StorageGateway) CreateTapesRequest(input *CreateTapesInput) (req *request.Request, output *CreateTapesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/CreateTapes

CreateTapesWithContext

func (c *StorageGateway) CreateTapesWithContext(ctx aws.Context, input *CreateTapesInput, opts ...request.Option) (*CreateTapesOutput, error)

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

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

DeleteBandwidthRateLimit

func (c *StorageGateway) DeleteBandwidthRateLimit(input *DeleteBandwidthRateLimitInput) (*DeleteBandwidthRateLimitOutput, error)

DeleteBandwidthRateLimit API operation for AWS Storage Gateway.

Deletes the bandwidth rate limits of a gateway. You can delete either the upload and download bandwidth rate limit, or you can delete both. If you delete only one of the limits, the other limit remains unchanged. To specify which gateway to work with, use the Amazon Resource Name (ARN) of the gateway in your request.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteBandwidthRateLimit for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit

Example

StorageGateway DeleteBandwidthRateLimit shared00

To delete bandwidth rate limits of gateway

Deletes the bandwidth rate limits of a gateway; either the upload or download limit, or both.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteBandwidthRateLimitInput{ BandwidthType: aws.String("All"), GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DeleteBandwidthRateLimit(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteBandwidthRateLimitRequest

func (c *StorageGateway) DeleteBandwidthRateLimitRequest(input *DeleteBandwidthRateLimitInput) (req *request.Request, output *DeleteBandwidthRateLimitOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteBandwidthRateLimit

DeleteBandwidthRateLimitWithContext

func (c *StorageGateway) DeleteBandwidthRateLimitWithContext(ctx aws.Context, input *DeleteBandwidthRateLimitInput, opts ...request.Option) (*DeleteBandwidthRateLimitOutput, error)

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

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

DeleteChapCredentials

func (c *StorageGateway) DeleteChapCredentials(input *DeleteChapCredentialsInput) (*DeleteChapCredentialsOutput, error)

DeleteChapCredentials API operation for AWS Storage Gateway.

Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteChapCredentials for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials

Example

StorageGateway DeleteChapCredentials shared00

To delete CHAP credentials

Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteChapCredentialsInput{ InitiatorName: aws.String("iqn.1991-05.com.microsoft:computername.domain.example.com"), TargetARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume"), } result, err := svc.DeleteChapCredentials(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteChapCredentialsRequest

func (c *StorageGateway) DeleteChapCredentialsRequest(input *DeleteChapCredentialsInput) (req *request.Request, output *DeleteChapCredentialsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteChapCredentials

DeleteChapCredentialsWithContext

func (c *StorageGateway) DeleteChapCredentialsWithContext(ctx aws.Context, input *DeleteChapCredentialsInput, opts ...request.Option) (*DeleteChapCredentialsOutput, error)

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

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

DeleteFileShare

func (c *StorageGateway) DeleteFileShare(input *DeleteFileShareInput) (*DeleteFileShareOutput, error)

DeleteFileShare API operation for AWS Storage Gateway.

Deletes a file share from a file gateway. This operation is only supported for file gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteFileShare for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare

DeleteFileShareRequest

func (c *StorageGateway) DeleteFileShareRequest(input *DeleteFileShareInput) (req *request.Request, output *DeleteFileShareOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteFileShare

DeleteFileShareWithContext

func (c *StorageGateway) DeleteFileShareWithContext(ctx aws.Context, input *DeleteFileShareInput, opts ...request.Option) (*DeleteFileShareOutput, error)

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

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

DeleteGateway

func (c *StorageGateway) DeleteGateway(input *DeleteGatewayInput) (*DeleteGatewayOutput, error)

DeleteGateway API operation for AWS Storage Gateway.

Deletes a gateway. To specify which gateway to delete, use the Amazon Resource Name (ARN) of the gateway in your request. The operation deletes the gateway; however, it does not delete the gateway virtual machine (VM) from your host computer.

After you delete a gateway, you cannot reactivate it. Completed snapshots of the gateway volumes are not deleted upon deleting the gateway, however, pending snapshots will not complete. After you delete a gateway, your next step is to remove it from your environment.

You no longer pay software charges after the gateway is deleted; however, your existing Amazon EBS snapshots persist and you will continue to be billed for these snapshots. You can choose to remove all remaining Amazon EBS snapshots by canceling your Amazon EC2 subscription.  If you prefer not to cancel your Amazon EC2 subscription, you can delete your snapshots using the Amazon EC2 console. For more information, see the AWS Storage Gateway Detail Page (https://aws.amazon.com/storagegateway).

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteGateway for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway

Example

StorageGateway DeleteGateway shared00

To delete a gatgeway

This operation deletes the gateway, but not the gateway's VM from the host computer.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteGatewayInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DeleteGateway(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteGatewayRequest

func (c *StorageGateway) DeleteGatewayRequest(input *DeleteGatewayInput) (req *request.Request, output *DeleteGatewayOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteGateway

DeleteGatewayWithContext

func (c *StorageGateway) DeleteGatewayWithContext(ctx aws.Context, input *DeleteGatewayInput, opts ...request.Option) (*DeleteGatewayOutput, error)

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

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

DeleteSnapshotSchedule

func (c *StorageGateway) DeleteSnapshotSchedule(input *DeleteSnapshotScheduleInput) (*DeleteSnapshotScheduleOutput, error)

DeleteSnapshotSchedule API operation for AWS Storage Gateway.

Deletes a snapshot of a volume.

You can take snapshots of your gateway volumes on a scheduled or ad hoc basis. This API action enables you to delete a snapshot schedule for a volume. For more information, see Working with Snapshots (https://docs.aws.amazon.com/storagegateway/latest/userguide/WorkingWithSnapshots.html). In the DeleteSnapshotSchedule request, you identify the volume by providing its Amazon Resource Name (ARN). This operation is only supported in stored and cached volume gateway types.

To list or delete a snapshot, you must use the Amazon EC2 API. in Amazon Elastic Compute Cloud API Reference.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteSnapshotSchedule for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule

Example

StorageGateway DeleteSnapshotSchedule shared00

To delete a snapshot of a volume

This action enables you to delete a snapshot schedule for a volume.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteSnapshotScheduleInput{ VolumeARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), } result, err := svc.DeleteSnapshotSchedule(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteSnapshotScheduleRequest

func (c *StorageGateway) DeleteSnapshotScheduleRequest(input *DeleteSnapshotScheduleInput) (req *request.Request, output *DeleteSnapshotScheduleOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteSnapshotSchedule

DeleteSnapshotScheduleWithContext

func (c *StorageGateway) DeleteSnapshotScheduleWithContext(ctx aws.Context, input *DeleteSnapshotScheduleInput, opts ...request.Option) (*DeleteSnapshotScheduleOutput, error)

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

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

DeleteTape

func (c *StorageGateway) DeleteTape(input *DeleteTapeInput) (*DeleteTapeOutput, error)

DeleteTape API operation for AWS Storage Gateway.

Deletes the specified virtual tape. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteTape for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape

Example

StorageGateway DeleteTape shared00

To delete a virtual tape

This example deletes the specified virtual tape.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteTapeInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:204469490176:gateway/sgw-12A3456B"), TapeARN: aws.String("arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0"), } result, err := svc.DeleteTape(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteTapeArchive

func (c *StorageGateway) DeleteTapeArchive(input *DeleteTapeArchiveInput) (*DeleteTapeArchiveOutput, error)

DeleteTapeArchive API operation for AWS Storage Gateway.

Deletes the specified virtual tape from the virtual tape shelf (VTS). This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteTapeArchive for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive

Example

StorageGateway DeleteTapeArchive shared00

To delete a virtual tape from the shelf (VTS)

Deletes the specified virtual tape from the virtual tape shelf (VTS).

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteTapeArchiveInput{ TapeARN: aws.String("arn:aws:storagegateway:us-east-1:204469490176:tape/TEST05A2A0"), } result, err := svc.DeleteTapeArchive(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteTapeArchiveRequest

func (c *StorageGateway) DeleteTapeArchiveRequest(input *DeleteTapeArchiveInput) (req *request.Request, output *DeleteTapeArchiveOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTapeArchive

DeleteTapeArchiveWithContext

func (c *StorageGateway) DeleteTapeArchiveWithContext(ctx aws.Context, input *DeleteTapeArchiveInput, opts ...request.Option) (*DeleteTapeArchiveOutput, error)

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

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

DeleteTapeRequest

func (c *StorageGateway) DeleteTapeRequest(input *DeleteTapeInput) (req *request.Request, output *DeleteTapeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteTape

DeleteTapeWithContext

func (c *StorageGateway) DeleteTapeWithContext(ctx aws.Context, input *DeleteTapeInput, opts ...request.Option) (*DeleteTapeOutput, error)

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

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

DeleteVolume

func (c *StorageGateway) DeleteVolume(input *DeleteVolumeInput) (*DeleteVolumeOutput, error)

DeleteVolume API operation for AWS Storage Gateway.

Deletes the specified storage volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API. This operation is only supported in the cached volume and stored volume types. For stored volume gateways, the local disk that was configured as the storage volume is not deleted. You can reuse the local disk to create another storage volume.

Before you delete a volume, make sure there are no iSCSI connections to the volume you are deleting. You should also make sure there is no snapshot in progress. You can use the Amazon Elastic Compute Cloud (Amazon EC2) API to query snapshots on the volume you are deleting and check the snapshot status. For more information, go to DescribeSnapshots (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeSnapshots.html) in the Amazon Elastic Compute Cloud API Reference.

In the request, you must provide the Amazon Resource Name (ARN) of the storage volume you want to delete.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DeleteVolume for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume

Example

StorageGateway DeleteVolume shared00

To delete a gateway volume

Deletes the specified gateway volume that you previously created using the CreateCachediSCSIVolume or CreateStorediSCSIVolume API.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DeleteVolumeInput{ VolumeARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), } result, err := svc.DeleteVolume(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteVolumeRequest

func (c *StorageGateway) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Request, output *DeleteVolumeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DeleteVolume

DeleteVolumeWithContext

func (c *StorageGateway) DeleteVolumeWithContext(ctx aws.Context, input *DeleteVolumeInput, opts ...request.Option) (*DeleteVolumeOutput, error)

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

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

DescribeBandwidthRateLimit

func (c *StorageGateway) DescribeBandwidthRateLimit(input *DescribeBandwidthRateLimitInput) (*DescribeBandwidthRateLimitOutput, error)

DescribeBandwidthRateLimit API operation for AWS Storage Gateway.

Returns the bandwidth rate limits of a gateway. By default, these limits are not set, which means no bandwidth rate limiting is in effect.

This operation only returns a value for a bandwidth rate limit only if the limit is set. If no limits are set for the gateway, then this operation returns only the gateway ARN in the response body. To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in your request.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeBandwidthRateLimit for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit

Example

StorageGateway DescribeBandwidthRateLimit shared00

To describe the bandwidth rate limits of a gateway

Returns a value for a bandwidth rate limit if set. If not set, then only the gateway ARN is returned.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeBandwidthRateLimitInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeBandwidthRateLimit(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeBandwidthRateLimitRequest

func (c *StorageGateway) DescribeBandwidthRateLimitRequest(input *DescribeBandwidthRateLimitInput) (req *request.Request, output *DescribeBandwidthRateLimitOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeBandwidthRateLimit

DescribeBandwidthRateLimitWithContext

func (c *StorageGateway) DescribeBandwidthRateLimitWithContext(ctx aws.Context, input *DescribeBandwidthRateLimitInput, opts ...request.Option) (*DescribeBandwidthRateLimitOutput, error)

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

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

DescribeCache

func (c *StorageGateway) DescribeCache(input *DescribeCacheInput) (*DescribeCacheOutput, error)

DescribeCache API operation for AWS Storage Gateway.

Returns information about the cache of a gateway. This operation is only supported in the cached volume, tape and file gateway types.

The response includes disk IDs that are configured as cache, and it includes the amount of cache allocated and used.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeCache for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache

Example

StorageGateway DescribeCache shared00

To describe cache information

Returns information about the cache of a gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeCacheInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeCache(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeCacheRequest

func (c *StorageGateway) DescribeCacheRequest(input *DescribeCacheInput) (req *request.Request, output *DescribeCacheOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCache

DescribeCacheWithContext

func (c *StorageGateway) DescribeCacheWithContext(ctx aws.Context, input *DescribeCacheInput, opts ...request.Option) (*DescribeCacheOutput, error)

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

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

DescribeCachediSCSIVolumes

func (c *StorageGateway) DescribeCachediSCSIVolumes(input *DescribeCachediSCSIVolumesInput) (*DescribeCachediSCSIVolumesOutput, error)

DescribeCachediSCSIVolumes API operation for AWS Storage Gateway.

Returns a description of the gateway volumes specified in the request. This operation is only supported in the cached volume gateway types.

The list of gateway volumes in the request must be from one gateway. In the response Amazon Storage Gateway returns volume information sorted by volume Amazon Resource Name (ARN).

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeCachediSCSIVolumes for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes

Example

StorageGateway DescribeCachediSCSIVolumes shared00

To describe gateway cached iSCSI volumes

Returns a description of the gateway cached iSCSI volumes specified in the request.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeCachediSCSIVolumesInput{ VolumeARNs: []*string{ aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), }, } result, err := svc.DescribeCachediSCSIVolumes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeCachediSCSIVolumesRequest

func (c *StorageGateway) DescribeCachediSCSIVolumesRequest(input *DescribeCachediSCSIVolumesInput) (req *request.Request, output *DescribeCachediSCSIVolumesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeCachediSCSIVolumes

DescribeCachediSCSIVolumesWithContext

func (c *StorageGateway) DescribeCachediSCSIVolumesWithContext(ctx aws.Context, input *DescribeCachediSCSIVolumesInput, opts ...request.Option) (*DescribeCachediSCSIVolumesOutput, error)

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

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

DescribeChapCredentials

func (c *StorageGateway) DescribeChapCredentials(input *DescribeChapCredentialsInput) (*DescribeChapCredentialsOutput, error)

DescribeChapCredentials API operation for AWS Storage Gateway.

Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeChapCredentials for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials

Example

StorageGateway DescribeChapCredentials shared00

To describe CHAP credetnitals for an iSCSI

Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeChapCredentialsInput{ TargetARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume"), } result, err := svc.DescribeChapCredentials(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeChapCredentialsRequest

func (c *StorageGateway) DescribeChapCredentialsRequest(input *DescribeChapCredentialsInput) (req *request.Request, output *DescribeChapCredentialsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeChapCredentials

DescribeChapCredentialsWithContext

func (c *StorageGateway) DescribeChapCredentialsWithContext(ctx aws.Context, input *DescribeChapCredentialsInput, opts ...request.Option) (*DescribeChapCredentialsOutput, error)

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

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

DescribeGatewayInformation

func (c *StorageGateway) DescribeGatewayInformation(input *DescribeGatewayInformationInput) (*DescribeGatewayInformationOutput, error)

DescribeGatewayInformation API operation for AWS Storage Gateway.

Returns metadata about a gateway such as its name, network interfaces, configured time zone, and the state (whether the gateway is running or not). To specify which gateway to describe, use the Amazon Resource Name (ARN) of the gateway in your request.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeGatewayInformation for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation

Example

StorageGateway DescribeGatewayInformation shared00

To describe metadata about the gateway

Returns metadata about a gateway such as its name, network interfaces, configured time zone, and the state (whether the gateway is running or not).

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeGatewayInformationInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeGatewayInformation(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeGatewayInformationRequest

func (c *StorageGateway) DescribeGatewayInformationRequest(input *DescribeGatewayInformationInput) (req *request.Request, output *DescribeGatewayInformationOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeGatewayInformation

DescribeGatewayInformationWithContext

func (c *StorageGateway) DescribeGatewayInformationWithContext(ctx aws.Context, input *DescribeGatewayInformationInput, opts ...request.Option) (*DescribeGatewayInformationOutput, error)

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

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

DescribeMaintenanceStartTime

func (c *StorageGateway) DescribeMaintenanceStartTime(input *DescribeMaintenanceStartTimeInput) (*DescribeMaintenanceStartTimeOutput, error)

DescribeMaintenanceStartTime API operation for AWS Storage Gateway.

Returns your gateway's weekly maintenance start time including the day and time of the week. Note that values are in terms of the gateway's time zone.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeMaintenanceStartTime for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime

Example

StorageGateway DescribeMaintenanceStartTime shared00

To describe gateway's maintenance start time

Returns your gateway's weekly maintenance start time including the day and time of the week.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeMaintenanceStartTimeInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeMaintenanceStartTime(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeMaintenanceStartTimeRequest

func (c *StorageGateway) DescribeMaintenanceStartTimeRequest(input *DescribeMaintenanceStartTimeInput) (req *request.Request, output *DescribeMaintenanceStartTimeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeMaintenanceStartTime

DescribeMaintenanceStartTimeWithContext

func (c *StorageGateway) DescribeMaintenanceStartTimeWithContext(ctx aws.Context, input *DescribeMaintenanceStartTimeInput, opts ...request.Option) (*DescribeMaintenanceStartTimeOutput, error)

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

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

DescribeNFSFileShares

func (c *StorageGateway) DescribeNFSFileShares(input *DescribeNFSFileSharesInput) (*DescribeNFSFileSharesOutput, error)

DescribeNFSFileShares API operation for AWS Storage Gateway.

Gets a description for one or more Network File System (NFS) file shares from a file gateway. This operation is only supported for file gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeNFSFileShares for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares

DescribeNFSFileSharesRequest

func (c *StorageGateway) DescribeNFSFileSharesRequest(input *DescribeNFSFileSharesInput) (req *request.Request, output *DescribeNFSFileSharesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeNFSFileShares

DescribeNFSFileSharesWithContext

func (c *StorageGateway) DescribeNFSFileSharesWithContext(ctx aws.Context, input *DescribeNFSFileSharesInput, opts ...request.Option) (*DescribeNFSFileSharesOutput, error)

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

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

DescribeSMBFileShares

func (c *StorageGateway) DescribeSMBFileShares(input *DescribeSMBFileSharesInput) (*DescribeSMBFileSharesOutput, error)

DescribeSMBFileShares API operation for AWS Storage Gateway.

Gets a description for one or more Server Message Block (SMB) file shares from a file gateway. This operation is only supported for file gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeSMBFileShares for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares

DescribeSMBFileSharesRequest

func (c *StorageGateway) DescribeSMBFileSharesRequest(input *DescribeSMBFileSharesInput) (req *request.Request, output *DescribeSMBFileSharesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBFileShares

DescribeSMBFileSharesWithContext

func (c *StorageGateway) DescribeSMBFileSharesWithContext(ctx aws.Context, input *DescribeSMBFileSharesInput, opts ...request.Option) (*DescribeSMBFileSharesOutput, error)

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

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

DescribeSMBSettings

func (c *StorageGateway) DescribeSMBSettings(input *DescribeSMBSettingsInput) (*DescribeSMBSettingsOutput, error)

DescribeSMBSettings API operation for AWS Storage Gateway.

Gets a description of a Server Message Block (SMB) file share settings from a file gateway. This operation is only supported for file gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeSMBSettings for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings

DescribeSMBSettingsRequest

func (c *StorageGateway) DescribeSMBSettingsRequest(input *DescribeSMBSettingsInput) (req *request.Request, output *DescribeSMBSettingsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSMBSettings

DescribeSMBSettingsWithContext

func (c *StorageGateway) DescribeSMBSettingsWithContext(ctx aws.Context, input *DescribeSMBSettingsInput, opts ...request.Option) (*DescribeSMBSettingsOutput, error)

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

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

DescribeSnapshotSchedule

func (c *StorageGateway) DescribeSnapshotSchedule(input *DescribeSnapshotScheduleInput) (*DescribeSnapshotScheduleOutput, error)

DescribeSnapshotSchedule API operation for AWS Storage Gateway.

Describes the snapshot schedule for the specified gateway volume. The snapshot schedule information includes intervals at which snapshots are automatically initiated on the volume. This operation is only supported in the cached volume and stored volume types.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeSnapshotSchedule for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule

Example

StorageGateway DescribeSnapshotSchedule shared00

To describe snapshot schedule for gateway volume

Describes the snapshot schedule for the specified gateway volume including intervals at which snapshots are automatically initiated.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeSnapshotScheduleInput{ VolumeARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), } result, err := svc.DescribeSnapshotSchedule(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeSnapshotScheduleRequest

func (c *StorageGateway) DescribeSnapshotScheduleRequest(input *DescribeSnapshotScheduleInput) (req *request.Request, output *DescribeSnapshotScheduleOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeSnapshotSchedule

DescribeSnapshotScheduleWithContext

func (c *StorageGateway) DescribeSnapshotScheduleWithContext(ctx aws.Context, input *DescribeSnapshotScheduleInput, opts ...request.Option) (*DescribeSnapshotScheduleOutput, error)

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

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

DescribeStorediSCSIVolumes

func (c *StorageGateway) DescribeStorediSCSIVolumes(input *DescribeStorediSCSIVolumesInput) (*DescribeStorediSCSIVolumesOutput, error)

DescribeStorediSCSIVolumes API operation for AWS Storage Gateway.

Returns the description of the gateway volumes specified in the request. The list of gateway volumes in the request must be from one gateway. In the response Amazon Storage Gateway returns volume information sorted by volume ARNs. This operation is only supported in stored volume gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeStorediSCSIVolumes for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes

Example

StorageGateway DescribeStorediSCSIVolumes shared00

To describe the volumes of a gateway

Returns the description of the gateway volumes specified in the request belonging to the same gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeStorediSCSIVolumesInput{ VolumeARNs: []*string{ aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), }, } result, err := svc.DescribeStorediSCSIVolumes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeStorediSCSIVolumesRequest

func (c *StorageGateway) DescribeStorediSCSIVolumesRequest(input *DescribeStorediSCSIVolumesInput) (req *request.Request, output *DescribeStorediSCSIVolumesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeStorediSCSIVolumes

DescribeStorediSCSIVolumesWithContext

func (c *StorageGateway) DescribeStorediSCSIVolumesWithContext(ctx aws.Context, input *DescribeStorediSCSIVolumesInput, opts ...request.Option) (*DescribeStorediSCSIVolumesOutput, error)

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

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

DescribeTapeArchives

func (c *StorageGateway) DescribeTapeArchives(input *DescribeTapeArchivesInput) (*DescribeTapeArchivesOutput, error)

DescribeTapeArchives API operation for AWS Storage Gateway.

Returns a description of specified virtual tapes in the virtual tape shelf (VTS). This operation is only supported in the tape gateway type.

If a specific TapeARN is not specified, AWS Storage Gateway returns a description of all virtual tapes found in the VTS associated with your account.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeTapeArchives for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives

Example

StorageGateway DescribeTapeArchives shared00

To describe virtual tapes in the VTS

Returns a description of specified virtual tapes in the virtual tape shelf (VTS).

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeTapeArchivesInput{ Limit: aws.Int64(123), Marker: aws.String("1"), TapeARNs: []*string{ aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/AM08A1AD"), aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/AMZN01A2A4"), }, } result, err := svc.DescribeTapeArchives(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeTapeArchivesPages

func (c *StorageGateway) DescribeTapeArchivesPages(input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool) error

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

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

See Also

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

DescribeTapeArchivesPagesWithContext

func (c *StorageGateway) DescribeTapeArchivesPagesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, fn func(*DescribeTapeArchivesOutput, bool) bool, opts ...request.Option) error

DescribeTapeArchivesPagesWithContext same as DescribeTapeArchivesPages 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.

DescribeTapeArchivesRequest

func (c *StorageGateway) DescribeTapeArchivesRequest(input *DescribeTapeArchivesInput) (req *request.Request, output *DescribeTapeArchivesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeArchives

DescribeTapeArchivesWithContext

func (c *StorageGateway) DescribeTapeArchivesWithContext(ctx aws.Context, input *DescribeTapeArchivesInput, opts ...request.Option) (*DescribeTapeArchivesOutput, error)

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

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

DescribeTapeRecoveryPoints

func (c *StorageGateway) DescribeTapeRecoveryPoints(input *DescribeTapeRecoveryPointsInput) (*DescribeTapeRecoveryPointsOutput, error)

DescribeTapeRecoveryPoints API operation for AWS Storage Gateway.

Returns a list of virtual tape recovery points that are available for the specified tape gateway.

A recovery point is a point-in-time view of a virtual tape at which all the data on the virtual tape is consistent. If your gateway crashes, virtual tapes that have recovery points can be recovered to a new gateway. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeTapeRecoveryPoints for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints

Example

StorageGateway DescribeTapeRecoveryPoints shared00

To describe virtual tape recovery points

Returns a list of virtual tape recovery points that are available for the specified gateway-VTL.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeTapeRecoveryPointsInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), Limit: aws.Int64(1), Marker: aws.String("1"), } result, err := svc.DescribeTapeRecoveryPoints(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeTapeRecoveryPointsPages

func (c *StorageGateway) DescribeTapeRecoveryPointsPages(input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool) error

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

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

See Also

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

DescribeTapeRecoveryPointsPagesWithContext

func (c *StorageGateway) DescribeTapeRecoveryPointsPagesWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, fn func(*DescribeTapeRecoveryPointsOutput, bool) bool, opts ...request.Option) error

DescribeTapeRecoveryPointsPagesWithContext same as DescribeTapeRecoveryPointsPages 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.

DescribeTapeRecoveryPointsRequest

func (c *StorageGateway) DescribeTapeRecoveryPointsRequest(input *DescribeTapeRecoveryPointsInput) (req *request.Request, output *DescribeTapeRecoveryPointsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapeRecoveryPoints

DescribeTapeRecoveryPointsWithContext

func (c *StorageGateway) DescribeTapeRecoveryPointsWithContext(ctx aws.Context, input *DescribeTapeRecoveryPointsInput, opts ...request.Option) (*DescribeTapeRecoveryPointsOutput, error)

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

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

DescribeTapes

func (c *StorageGateway) DescribeTapes(input *DescribeTapesInput) (*DescribeTapesOutput, error)

DescribeTapes API operation for AWS Storage Gateway.

Returns a description of the specified Amazon Resource Name (ARN) of virtual tapes. If a TapeARN is not specified, returns a description of all virtual tapes associated with the specified gateway. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeTapes for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes

Example

StorageGateway DescribeTapes shared00

To describe virtual tape(s) associated with gateway

Returns a description of the specified Amazon Resource Name (ARN) of virtual tapes. If a TapeARN is not specified, returns a description of all virtual tapes.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeTapesInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), Limit: aws.Int64(2), Marker: aws.String("1"), TapeARNs: []*string{ aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/TEST04A2A1"), aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/TEST05A2A0"), }, } result, err := svc.DescribeTapes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeTapesPages

func (c *StorageGateway) DescribeTapesPages(input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool) error

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

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

See Also

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

DescribeTapesPagesWithContext

func (c *StorageGateway) DescribeTapesPagesWithContext(ctx aws.Context, input *DescribeTapesInput, fn func(*DescribeTapesOutput, bool) bool, opts ...request.Option) error

DescribeTapesPagesWithContext same as DescribeTapesPages 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.

DescribeTapesRequest

func (c *StorageGateway) DescribeTapesRequest(input *DescribeTapesInput) (req *request.Request, output *DescribeTapesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeTapes

DescribeTapesWithContext

func (c *StorageGateway) DescribeTapesWithContext(ctx aws.Context, input *DescribeTapesInput, opts ...request.Option) (*DescribeTapesOutput, error)

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

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

DescribeUploadBuffer

func (c *StorageGateway) DescribeUploadBuffer(input *DescribeUploadBufferInput) (*DescribeUploadBufferOutput, error)

DescribeUploadBuffer API operation for AWS Storage Gateway.

Returns information about the upload buffer of a gateway. This operation is supported for the stored volume, cached volume and tape gateway types.

The response includes disk IDs that are configured as upload buffer space, and it includes the amount of upload buffer space allocated and used.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeUploadBuffer for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer

Examples

StorageGateway DescribeUploadBuffer shared00

To describe upload buffer of gateway

Returns information about the upload buffer of a gateway including disk IDs and the amount of upload buffer space allocated/used.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeUploadBufferInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeUploadBuffer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }
StorageGateway DescribeUploadBuffer shared01

To describe upload buffer of a gateway

Returns information about the upload buffer of a gateway including disk IDs and the amount of upload buffer space allocated and used.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeUploadBufferInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeUploadBuffer(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeUploadBufferRequest

func (c *StorageGateway) DescribeUploadBufferRequest(input *DescribeUploadBufferInput) (req *request.Request, output *DescribeUploadBufferOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeUploadBuffer

DescribeUploadBufferWithContext

func (c *StorageGateway) DescribeUploadBufferWithContext(ctx aws.Context, input *DescribeUploadBufferInput, opts ...request.Option) (*DescribeUploadBufferOutput, error)

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

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

DescribeVTLDevices

func (c *StorageGateway) DescribeVTLDevices(input *DescribeVTLDevicesInput) (*DescribeVTLDevicesOutput, error)

DescribeVTLDevices API operation for AWS Storage Gateway.

Returns a description of virtual tape library (VTL) devices for the specified tape gateway. In the response, AWS Storage Gateway returns VTL device information.

This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeVTLDevices for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices

Example

StorageGateway DescribeVTLDevices shared00

To describe virtual tape library (VTL) devices of a single gateway

Returns a description of virtual tape library (VTL) devices for the specified gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeVTLDevicesInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), Limit: aws.Int64(123), Marker: aws.String("1"), } result, err := svc.DescribeVTLDevices(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeVTLDevicesPages

func (c *StorageGateway) DescribeVTLDevicesPages(input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool) error

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

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

See Also

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

DescribeVTLDevicesPagesWithContext

func (c *StorageGateway) DescribeVTLDevicesPagesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, fn func(*DescribeVTLDevicesOutput, bool) bool, opts ...request.Option) error

DescribeVTLDevicesPagesWithContext same as DescribeVTLDevicesPages 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.

DescribeVTLDevicesRequest

func (c *StorageGateway) DescribeVTLDevicesRequest(input *DescribeVTLDevicesInput) (req *request.Request, output *DescribeVTLDevicesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeVTLDevices

DescribeVTLDevicesWithContext

func (c *StorageGateway) DescribeVTLDevicesWithContext(ctx aws.Context, input *DescribeVTLDevicesInput, opts ...request.Option) (*DescribeVTLDevicesOutput, error)

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

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

DescribeWorkingStorage

func (c *StorageGateway) DescribeWorkingStorage(input *DescribeWorkingStorageInput) (*DescribeWorkingStorageOutput, error)

DescribeWorkingStorage API operation for AWS Storage Gateway.

Returns information about the working storage of a gateway. This operation is only supported in the stored volumes gateway type. This operation is deprecated in cached volumes API version (20120630). Use DescribeUploadBuffer instead.

Working storage is also referred to as upload buffer. You can also use the DescribeUploadBuffer operation to add upload buffer to a stored volume gateway.

The response includes disk IDs that are configured as working storage, and it includes the amount of working storage allocated and used.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DescribeWorkingStorage for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage

Example

StorageGateway DescribeWorkingStorage shared00

To describe the working storage of a gateway [Depreciated]

This operation is supported only for the gateway-stored volume architecture. This operation is deprecated in cached-volumes API version (20120630). Use DescribeUploadBuffer instead.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DescribeWorkingStorageInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DescribeWorkingStorage(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeWorkingStorageRequest

func (c *StorageGateway) DescribeWorkingStorageRequest(input *DescribeWorkingStorageInput) (req *request.Request, output *DescribeWorkingStorageOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DescribeWorkingStorage

DescribeWorkingStorageWithContext

func (c *StorageGateway) DescribeWorkingStorageWithContext(ctx aws.Context, input *DescribeWorkingStorageInput, opts ...request.Option) (*DescribeWorkingStorageOutput, error)

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

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

DetachVolume

func (c *StorageGateway) DetachVolume(input *DetachVolumeInput) (*DetachVolumeOutput, error)

DetachVolume API operation for AWS Storage Gateway.

Disconnects a volume from an iSCSI connection and then detaches the volume from the specified gateway. Detaching and attaching a volume enables you to recover your data from one gateway to a different gateway without creating a snapshot. It also makes it easier to move your volumes from an on-premises gateway to a gateway hosted on an Amazon EC2 instance.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DetachVolume for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume

DetachVolumeRequest

func (c *StorageGateway) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Request, output *DetachVolumeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DetachVolume

DetachVolumeWithContext

func (c *StorageGateway) DetachVolumeWithContext(ctx aws.Context, input *DetachVolumeInput, opts ...request.Option) (*DetachVolumeOutput, error)

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

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

DisableGateway

func (c *StorageGateway) DisableGateway(input *DisableGatewayInput) (*DisableGatewayOutput, error)

DisableGateway API operation for AWS Storage Gateway.

Disables a tape gateway when the gateway is no longer functioning. For example, if your gateway VM is damaged, you can disable the gateway so you can recover virtual tapes.

Use this operation for a tape gateway that is not reachable or not functioning. This operation is only supported in the tape gateway type.

Once a gateway is disabled it cannot be enabled.

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

See the AWS API reference guide for AWS Storage Gateway's API operation DisableGateway for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway

Example

StorageGateway DisableGateway shared00

To disable a gateway when it is no longer functioning

Disables a gateway when the gateway is no longer functioning. Use this operation for a gateway-VTL that is not reachable or not functioning.

{ svc := storagegateway.New(session.New()) input := &storagegateway.DisableGatewayInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.DisableGateway(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DisableGatewayRequest

func (c *StorageGateway) DisableGatewayRequest(input *DisableGatewayInput) (req *request.Request, output *DisableGatewayOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/DisableGateway

DisableGatewayWithContext

func (c *StorageGateway) DisableGatewayWithContext(ctx aws.Context, input *DisableGatewayInput, opts ...request.Option) (*DisableGatewayOutput, error)

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

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

JoinDomain

func (c *StorageGateway) JoinDomain(input *JoinDomainInput) (*JoinDomainOutput, error)

JoinDomain API operation for AWS Storage Gateway.

Adds a file gateway to an Active Directory domain. This operation is only supported for file gateways that support the SMB file protocol.

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

See the AWS API reference guide for AWS Storage Gateway's API operation JoinDomain for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain

JoinDomainRequest

func (c *StorageGateway) JoinDomainRequest(input *JoinDomainInput) (req *request.Request, output *JoinDomainOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/JoinDomain

JoinDomainWithContext

func (c *StorageGateway) JoinDomainWithContext(ctx aws.Context, input *JoinDomainInput, opts ...request.Option) (*JoinDomainOutput, error)

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

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

ListFileShares

func (c *StorageGateway) ListFileShares(input *ListFileSharesInput) (*ListFileSharesOutput, error)

ListFileShares API operation for AWS Storage Gateway.

Gets a list of the file shares for a specific file gateway, or the list of file shares that belong to the calling user account. This operation is only supported for file gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListFileShares for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares

ListFileSharesRequest

func (c *StorageGateway) ListFileSharesRequest(input *ListFileSharesInput) (req *request.Request, output *ListFileSharesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListFileShares

ListFileSharesWithContext

func (c *StorageGateway) ListFileSharesWithContext(ctx aws.Context, input *ListFileSharesInput, opts ...request.Option) (*ListFileSharesOutput, error)

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

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

ListGateways

func (c *StorageGateway) ListGateways(input *ListGatewaysInput) (*ListGatewaysOutput, error)

ListGateways API operation for AWS Storage Gateway.

Lists gateways owned by an AWS account in a region specified in the request. The returned list is ordered by gateway Amazon Resource Name (ARN).

By default, the operation returns a maximum of 100 gateways. This operation supports pagination that allows you to optionally reduce the number of gateways returned in a response.

If you have more gateways than are returned in a response (that is, the response returns only a truncated list of your gateways), the response contains a marker that you can specify in your next request to fetch the next page of gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListGateways for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways

Example

StorageGateway ListGateways shared00

To lists region specific gateways per AWS account

Lists gateways owned by an AWS account in a specified region as requested. Results are sorted by gateway ARN up to a maximum of 100 gateways.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ListGatewaysInput{ Limit: aws.Int64(2), Marker: aws.String("1"), } result, err := svc.ListGateways(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListGatewaysPages

func (c *StorageGateway) ListGatewaysPages(input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool) error

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

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

See Also

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

ListGatewaysPagesWithContext

func (c *StorageGateway) ListGatewaysPagesWithContext(ctx aws.Context, input *ListGatewaysInput, fn func(*ListGatewaysOutput, bool) bool, opts ...request.Option) error

ListGatewaysPagesWithContext same as ListGatewaysPages 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.

ListGatewaysRequest

func (c *StorageGateway) ListGatewaysRequest(input *ListGatewaysInput) (req *request.Request, output *ListGatewaysOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListGateways

ListGatewaysWithContext

func (c *StorageGateway) ListGatewaysWithContext(ctx aws.Context, input *ListGatewaysInput, opts ...request.Option) (*ListGatewaysOutput, error)

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

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

ListLocalDisks

func (c *StorageGateway) ListLocalDisks(input *ListLocalDisksInput) (*ListLocalDisksOutput, error)

ListLocalDisks API operation for AWS Storage Gateway.

Returns a list of the gateway's local disks. To specify which gateway to describe, you use the Amazon Resource Name (ARN) of the gateway in the body of the request.

The request returns a list of all disks, specifying which are configured as working storage, cache storage, or stored volume or not configured at all. The response includes a DiskStatus field. This field can have a value of present (the disk is available to use), missing (the disk is no longer connected to the gateway), or mismatch (the disk node is occupied by a disk that has incorrect metadata or the disk content is corrupted).

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListLocalDisks for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks

Example

StorageGateway ListLocalDisks shared00

To list the gateway's local disks

The request returns a list of all disks, specifying which are configured as working storage, cache storage, or stored volume or not configured at all.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ListLocalDisksInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.ListLocalDisks(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListLocalDisksRequest

func (c *StorageGateway) ListLocalDisksRequest(input *ListLocalDisksInput) (req *request.Request, output *ListLocalDisksOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListLocalDisks

ListLocalDisksWithContext

func (c *StorageGateway) ListLocalDisksWithContext(ctx aws.Context, input *ListLocalDisksInput, opts ...request.Option) (*ListLocalDisksOutput, error)

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

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

ListTagsForResource

func (c *StorageGateway) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error)

ListTagsForResource API operation for AWS Storage Gateway.

Lists the tags that have been added to the specified resource. This operation is only supported in the cached volume, stored volume and tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListTagsForResource for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource

Example

StorageGateway ListTagsForResource shared00

To list tags that have been added to a resource

Lists the tags that have been added to the specified resource.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ListTagsForResourceInput{ Limit: aws.Int64(1), Marker: aws.String("1"), ResourceARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B"), } result, err := svc.ListTagsForResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListTagsForResourceRequest

func (c *StorageGateway) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTagsForResource

ListTagsForResourceWithContext

func (c *StorageGateway) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error)

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

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

ListTapes

func (c *StorageGateway) ListTapes(input *ListTapesInput) (*ListTapesOutput, error)

ListTapes API operation for AWS Storage Gateway.

Lists virtual tapes in your virtual tape library (VTL) and your virtual tape shelf (VTS). You specify the tapes to list by specifying one or more tape Amazon Resource Names (ARNs). If you don't specify a tape ARN, the operation lists all virtual tapes in both your VTL and VTS.

This operation supports pagination. By default, the operation returns a maximum of up to 100 tapes. You can optionally specify the Limit parameter in the body to limit the number of tapes in the response. If the number of tapes returned in the response is truncated, the response includes a Marker element that you can use in your subsequent request to retrieve the next set of tapes. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListTapes for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes

ListTapesRequest

func (c *StorageGateway) ListTapesRequest(input *ListTapesInput) (req *request.Request, output *ListTapesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListTapes

ListTapesWithContext

func (c *StorageGateway) ListTapesWithContext(ctx aws.Context, input *ListTapesInput, opts ...request.Option) (*ListTapesOutput, error)

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

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

ListVolumeInitiators

func (c *StorageGateway) ListVolumeInitiators(input *ListVolumeInitiatorsInput) (*ListVolumeInitiatorsOutput, error)

ListVolumeInitiators API operation for AWS Storage Gateway.

Lists iSCSI initiators that are connected to a volume. You can use this operation to determine whether a volume is being used or not. This operation is only supported in the cached volume and stored volume gateway types.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListVolumeInitiators for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators

ListVolumeInitiatorsRequest

func (c *StorageGateway) ListVolumeInitiatorsRequest(input *ListVolumeInitiatorsInput) (req *request.Request, output *ListVolumeInitiatorsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeInitiators

ListVolumeInitiatorsWithContext

func (c *StorageGateway) ListVolumeInitiatorsWithContext(ctx aws.Context, input *ListVolumeInitiatorsInput, opts ...request.Option) (*ListVolumeInitiatorsOutput, error)

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

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

ListVolumeRecoveryPoints

func (c *StorageGateway) ListVolumeRecoveryPoints(input *ListVolumeRecoveryPointsInput) (*ListVolumeRecoveryPointsOutput, error)

ListVolumeRecoveryPoints API operation for AWS Storage Gateway.

Lists the recovery points for a specified gateway. This operation is only supported in the cached volume gateway type.

Each cache volume has one recovery point. A volume recovery point is a point in time at which all data of the volume is consistent and from which you can create a snapshot or clone a new cached volume from a source volume. To create a snapshot from a volume recovery point use the CreateSnapshotFromVolumeRecoveryPoint operation.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListVolumeRecoveryPoints for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints

Example

StorageGateway ListVolumeRecoveryPoints shared00

To list recovery points for a gateway

Lists the recovery points for a specified gateway in which all data of the volume is consistent and can be used to create a snapshot.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ListVolumeRecoveryPointsInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.ListVolumeRecoveryPoints(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListVolumeRecoveryPointsRequest

func (c *StorageGateway) ListVolumeRecoveryPointsRequest(input *ListVolumeRecoveryPointsInput) (req *request.Request, output *ListVolumeRecoveryPointsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumeRecoveryPoints

ListVolumeRecoveryPointsWithContext

func (c *StorageGateway) ListVolumeRecoveryPointsWithContext(ctx aws.Context, input *ListVolumeRecoveryPointsInput, opts ...request.Option) (*ListVolumeRecoveryPointsOutput, error)

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

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

ListVolumes

func (c *StorageGateway) ListVolumes(input *ListVolumesInput) (*ListVolumesOutput, error)

ListVolumes API operation for AWS Storage Gateway.

Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN. The response includes only the volume ARNs. If you want additional volume information, use the DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes API.

The operation supports pagination. By default, the operation returns a maximum of up to 100 volumes. You can optionally specify the Limit field in the body to limit the number of volumes in the response. If the number of volumes returned in the response is truncated, the response includes a Marker field. You can use this Marker value in your subsequent request to retrieve the next set of volumes. This operation is only supported in the cached volume and stored volume gateway types.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ListVolumes for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes

Example

StorageGateway ListVolumes shared00

To list the iSCSI stored volumes of a gateway

Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN up to a maximum of 100 volumes.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ListVolumesInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), Limit: aws.Int64(2), Marker: aws.String("1"), } result, err := svc.ListVolumes(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListVolumesPages

func (c *StorageGateway) ListVolumesPages(input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool) error

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

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

See Also

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

ListVolumesPagesWithContext

func (c *StorageGateway) ListVolumesPagesWithContext(ctx aws.Context, input *ListVolumesInput, fn func(*ListVolumesOutput, bool) bool, opts ...request.Option) error

ListVolumesPagesWithContext same as ListVolumesPages 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.

ListVolumesRequest

func (c *StorageGateway) ListVolumesRequest(input *ListVolumesInput) (req *request.Request, output *ListVolumesOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ListVolumes

ListVolumesWithContext

func (c *StorageGateway) ListVolumesWithContext(ctx aws.Context, input *ListVolumesInput, opts ...request.Option) (*ListVolumesOutput, error)

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

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

NotifyWhenUploaded

func (c *StorageGateway) NotifyWhenUploaded(input *NotifyWhenUploadedInput) (*NotifyWhenUploadedOutput, error)

NotifyWhenUploaded API operation for AWS Storage Gateway.

Sends you notification through CloudWatch Events when all files written to your NFS file share have been uploaded to Amazon S3.

AWS Storage Gateway can send a notification through Amazon CloudWatch Events when all files written to your file share up to that point in time have been uploaded to Amazon S3. These files include files written to the NFS file share up to the time that you make a request for notification. When the upload is done, Storage Gateway sends you notification through an Amazon CloudWatch Event. You can configure CloudWatch Events to send the notification through event targets such as Amazon SNS or AWS Lambda function. This operation is only supported for file gateways.

For more information, see Getting File Upload Notification in the Storage Gateway User Guide (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-upload-notification).

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

See the AWS API reference guide for AWS Storage Gateway's API operation NotifyWhenUploaded for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded

NotifyWhenUploadedRequest

func (c *StorageGateway) NotifyWhenUploadedRequest(input *NotifyWhenUploadedInput) (req *request.Request, output *NotifyWhenUploadedOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/NotifyWhenUploaded

NotifyWhenUploadedWithContext

func (c *StorageGateway) NotifyWhenUploadedWithContext(ctx aws.Context, input *NotifyWhenUploadedInput, opts ...request.Option) (*NotifyWhenUploadedOutput, error)

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

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

RefreshCache

func (c *StorageGateway) RefreshCache(input *RefreshCacheInput) (*RefreshCacheOutput, error)

RefreshCache API operation for AWS Storage Gateway.

Refreshes the cache for the specified file share. This operation finds objects in the Amazon S3 bucket that were added, removed or replaced since the gateway last listed the bucket's contents and cached the results. This operation is only supported in the file gateway type. You can subscribe to be notified through an Amazon CloudWatch event when your RefreshCache operation completes. For more information, see Getting Notified About File Operations (https://docs.aws.amazon.com/storagegateway/latest/userguide/monitoring-file-gateway.html#get-notification).

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

See the AWS API reference guide for AWS Storage Gateway's API operation RefreshCache for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache

RefreshCacheRequest

func (c *StorageGateway) RefreshCacheRequest(input *RefreshCacheInput) (req *request.Request, output *RefreshCacheOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RefreshCache

RefreshCacheWithContext

func (c *StorageGateway) RefreshCacheWithContext(ctx aws.Context, input *RefreshCacheInput, opts ...request.Option) (*RefreshCacheOutput, error)

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

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

RemoveTagsFromResource

func (c *StorageGateway) RemoveTagsFromResource(input *RemoveTagsFromResourceInput) (*RemoveTagsFromResourceOutput, error)

RemoveTagsFromResource API operation for AWS Storage Gateway.

Removes one or more tags from the specified resource. This operation is only supported in the cached volume, stored volume and tape gateway types.

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

See the AWS API reference guide for AWS Storage Gateway's API operation RemoveTagsFromResource for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource

Example

StorageGateway RemoveTagsFromResource shared00

To remove tags from a resource

Lists the iSCSI stored volumes of a gateway. Removes one or more tags from the specified resource.

{ svc := storagegateway.New(session.New()) input := &storagegateway.RemoveTagsFromResourceInput{ ResourceARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-11A2222B"), TagKeys: []*string{ aws.String("Dev Gatgeway Region"), aws.String("East Coast"), }, } result, err := svc.RemoveTagsFromResource(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

RemoveTagsFromResourceRequest

func (c *StorageGateway) RemoveTagsFromResourceRequest(input *RemoveTagsFromResourceInput) (req *request.Request, output *RemoveTagsFromResourceOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RemoveTagsFromResource

RemoveTagsFromResourceWithContext

func (c *StorageGateway) RemoveTagsFromResourceWithContext(ctx aws.Context, input *RemoveTagsFromResourceInput, opts ...request.Option) (*RemoveTagsFromResourceOutput, error)

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

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

ResetCache

func (c *StorageGateway) ResetCache(input *ResetCacheInput) (*ResetCacheOutput, error)

ResetCache API operation for AWS Storage Gateway.

Resets all cache disks that have encountered a error and makes the disks available for reconfiguration as cache storage. If your cache disk encounters a error, the gateway prevents read and write operations on virtual tapes in the gateway. For example, an error can occur when a disk is corrupted or removed from the gateway. When a cache is reset, the gateway loses its cache storage. At this point you can reconfigure the disks as cache disks. This operation is only supported in the cached volume and tape types.

If the cache disk you are resetting contains data that has not been uploaded to Amazon S3 yet, that data can be lost. After you reset cache disks, there will be no configured cache disks left in the gateway, so you must configure at least one new cache disk for your gateway to function properly.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ResetCache for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache

Example

StorageGateway ResetCache shared00

To reset cache disks in error status

Resets all cache disks that have encountered a error and makes the disks available for reconfiguration as cache storage.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ResetCacheInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-13B4567C"), } result, err := svc.ResetCache(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ResetCacheRequest

func (c *StorageGateway) ResetCacheRequest(input *ResetCacheInput) (req *request.Request, output *ResetCacheOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ResetCache

ResetCacheWithContext

func (c *StorageGateway) ResetCacheWithContext(ctx aws.Context, input *ResetCacheInput, opts ...request.Option) (*ResetCacheOutput, error)

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

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

RetrieveTapeArchive

func (c *StorageGateway) RetrieveTapeArchive(input *RetrieveTapeArchiveInput) (*RetrieveTapeArchiveOutput, error)

RetrieveTapeArchive API operation for AWS Storage Gateway.

Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a tape gateway. Virtual tapes archived in the VTS are not associated with any gateway. However after a tape is retrieved, it is associated with a gateway, even though it is also listed in the VTS, that is, archive. This operation is only supported in the tape gateway type.

Once a tape is successfully retrieved to a gateway, it cannot be retrieved again to another gateway. You must archive the tape again before you can retrieve it to another gateway. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation RetrieveTapeArchive for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive

Example

StorageGateway RetrieveTapeArchive shared00

To retrieve an archived tape from the VTS

Retrieves an archived virtual tape from the virtual tape shelf (VTS) to a gateway-VTL. Virtual tapes archived in the VTS are not associated with any gateway.

{ svc := storagegateway.New(session.New()) input := &storagegateway.RetrieveTapeArchiveInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), TapeARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF"), } result, err := svc.RetrieveTapeArchive(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

RetrieveTapeArchiveRequest

func (c *StorageGateway) RetrieveTapeArchiveRequest(input *RetrieveTapeArchiveInput) (req *request.Request, output *RetrieveTapeArchiveOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeArchive

RetrieveTapeArchiveWithContext

func (c *StorageGateway) RetrieveTapeArchiveWithContext(ctx aws.Context, input *RetrieveTapeArchiveInput, opts ...request.Option) (*RetrieveTapeArchiveOutput, error)

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

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

RetrieveTapeRecoveryPoint

func (c *StorageGateway) RetrieveTapeRecoveryPoint(input *RetrieveTapeRecoveryPointInput) (*RetrieveTapeRecoveryPointOutput, error)

RetrieveTapeRecoveryPoint API operation for AWS Storage Gateway.

Retrieves the recovery point for the specified virtual tape. This operation is only supported in the tape gateway type.

A recovery point is a point in time view of a virtual tape at which all the data on the tape is consistent. If your gateway crashes, virtual tapes that have recovery points can be recovered to a new gateway.

The virtual tape can be retrieved to only one gateway. The retrieved tape is read-only. The virtual tape can be retrieved to only a tape gateway. There is no charge for retrieving recovery points.

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

See the AWS API reference guide for AWS Storage Gateway's API operation RetrieveTapeRecoveryPoint for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint

Example

StorageGateway RetrieveTapeRecoveryPoint shared00

To retrieve the recovery point of a virtual tape

Retrieves the recovery point for the specified virtual tape.

{ svc := storagegateway.New(session.New()) input := &storagegateway.RetrieveTapeRecoveryPointInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), TapeARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:tape/TEST0AA2AF"), } result, err := svc.RetrieveTapeRecoveryPoint(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

RetrieveTapeRecoveryPointRequest

func (c *StorageGateway) RetrieveTapeRecoveryPointRequest(input *RetrieveTapeRecoveryPointInput) (req *request.Request, output *RetrieveTapeRecoveryPointOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/RetrieveTapeRecoveryPoint

RetrieveTapeRecoveryPointWithContext

func (c *StorageGateway) RetrieveTapeRecoveryPointWithContext(ctx aws.Context, input *RetrieveTapeRecoveryPointInput, opts ...request.Option) (*RetrieveTapeRecoveryPointOutput, error)

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

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

SetLocalConsolePassword

func (c *StorageGateway) SetLocalConsolePassword(input *SetLocalConsolePasswordInput) (*SetLocalConsolePasswordOutput, error)

SetLocalConsolePassword API operation for AWS Storage Gateway.

Sets the password for your VM local console. When you log in to the local console for the first time, you log in to the VM with the default credentials. We recommend that you set a new password. You don't need to know the default password to set a new password.

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

See the AWS API reference guide for AWS Storage Gateway's API operation SetLocalConsolePassword for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword

Example

StorageGateway SetLocalConsolePassword shared00

To set a password for your VM

Sets the password for your VM local console.

{ svc := storagegateway.New(session.New()) input := &storagegateway.SetLocalConsolePasswordInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), LocalConsolePassword: aws.String("PassWordMustBeAtLeast6Chars."), } result, err := svc.SetLocalConsolePassword(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

SetLocalConsolePasswordRequest

func (c *StorageGateway) SetLocalConsolePasswordRequest(input *SetLocalConsolePasswordInput) (req *request.Request, output *SetLocalConsolePasswordOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetLocalConsolePassword

SetLocalConsolePasswordWithContext

func (c *StorageGateway) SetLocalConsolePasswordWithContext(ctx aws.Context, input *SetLocalConsolePasswordInput, opts ...request.Option) (*SetLocalConsolePasswordOutput, error)

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

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

SetSMBGuestPassword

func (c *StorageGateway) SetSMBGuestPassword(input *SetSMBGuestPasswordInput) (*SetSMBGuestPasswordOutput, error)

SetSMBGuestPassword API operation for AWS Storage Gateway.

Sets the password for the guest user smbguest. The smbguest user is the user when the authentication method for the file share is set to GuestAccess.

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

See the AWS API reference guide for AWS Storage Gateway's API operation SetSMBGuestPassword for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword

SetSMBGuestPasswordRequest

func (c *StorageGateway) SetSMBGuestPasswordRequest(input *SetSMBGuestPasswordInput) (req *request.Request, output *SetSMBGuestPasswordOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/SetSMBGuestPassword

SetSMBGuestPasswordWithContext

func (c *StorageGateway) SetSMBGuestPasswordWithContext(ctx aws.Context, input *SetSMBGuestPasswordInput, opts ...request.Option) (*SetSMBGuestPasswordOutput, error)

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

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

ShutdownGateway

func (c *StorageGateway) ShutdownGateway(input *ShutdownGatewayInput) (*ShutdownGatewayOutput, error)

ShutdownGateway API operation for AWS Storage Gateway.

Shuts down a gateway. To specify which gateway to shut down, use the Amazon Resource Name (ARN) of the gateway in the body of your request.

The operation shuts down the gateway service component running in the gateway's virtual machine (VM) and not the host VM.

If you want to shut down the VM, it is recommended that you first shut down the gateway component in the VM to avoid unpredictable conditions.

After the gateway is shutdown, you cannot call any other API except StartGateway, DescribeGatewayInformation, and ListGateways. For more information, see ActivateGateway. Your applications cannot read from or write to the gateway's storage volumes, and there are no snapshots taken.

When you make a shutdown request, you will get a 200 OK success response immediately. However, it might take some time for the gateway to shut down. You can call the DescribeGatewayInformation API to check the status. For more information, see ActivateGateway.

If do not intend to use the gateway again, you must delete the gateway (using DeleteGateway) to no longer pay software charges associated with the gateway.

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

See the AWS API reference guide for AWS Storage Gateway's API operation ShutdownGateway for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway

Example

StorageGateway ShutdownGateway shared00

To shut down a gateway service

This operation shuts down the gateway service component running in the storage gateway's virtual machine (VM) and not the VM.

{ svc := storagegateway.New(session.New()) input := &storagegateway.ShutdownGatewayInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), } result, err := svc.ShutdownGateway(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ShutdownGatewayRequest

func (c *StorageGateway) ShutdownGatewayRequest(input *ShutdownGatewayInput) (req *request.Request, output *ShutdownGatewayOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/ShutdownGateway

ShutdownGatewayWithContext

func (c *StorageGateway) ShutdownGatewayWithContext(ctx aws.Context, input *ShutdownGatewayInput, opts ...request.Option) (*ShutdownGatewayOutput, error)

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

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

StartGateway

func (c *StorageGateway) StartGateway(input *StartGatewayInput) (*StartGatewayOutput, error)

StartGateway API operation for AWS Storage Gateway.

Starts a gateway that you previously shut down (see ShutdownGateway). After the gateway starts, you can then make other API calls, your applications can read from or write to the gateway's storage volumes and you will be able to take snapshot backups.

When you make a request, you will get a 200 OK success response immediately. However, it might take some time for the gateway to be ready. You should call DescribeGatewayInformation and check the status before making any additional API calls. For more information, see ActivateGateway.

To specify which gateway to start, use the Amazon Resource Name (ARN) of the gateway in your request.

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

See the AWS API reference guide for AWS Storage Gateway's API operation StartGateway for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway

Example

StorageGateway StartGateway shared00

To start a gateway service

Starts a gateway service that was previously shut down.

{ svc := storagegateway.New(session.New()) input := &storagegateway.StartGatewayInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B"), } result, err := svc.StartGateway(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

StartGatewayRequest

func (c *StorageGateway) StartGatewayRequest(input *StartGatewayInput) (req *request.Request, output *StartGatewayOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/StartGateway

StartGatewayWithContext

func (c *StorageGateway) StartGatewayWithContext(ctx aws.Context, input *StartGatewayInput, opts ...request.Option) (*StartGatewayOutput, error)

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

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

UpdateBandwidthRateLimit

func (c *StorageGateway) UpdateBandwidthRateLimit(input *UpdateBandwidthRateLimitInput) (*UpdateBandwidthRateLimitOutput, error)

UpdateBandwidthRateLimit API operation for AWS Storage Gateway.

Updates the bandwidth rate limits of a gateway. You can update both the upload and download bandwidth rate limit or specify only one of the two. If you don't set a bandwidth rate limit, the existing rate limit remains.

By default, a gateway's bandwidth rate limits are not set. If you don't set any limit, the gateway does not have any limitations on its bandwidth usage and could potentially use the maximum available bandwidth.

To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in your request.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateBandwidthRateLimit for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit

Example

StorageGateway UpdateBandwidthRateLimit shared00

To update the bandwidth rate limits of a gateway

Updates the bandwidth rate limits of a gateway. Both the upload and download bandwidth rate limit can be set, or either one of the two. If a new limit is not set, the existing rate limit remains.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateBandwidthRateLimitInput{ AverageDownloadRateLimitInBitsPerSec: aws.Int64(102400), AverageUploadRateLimitInBitsPerSec: aws.Int64(51200), GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.UpdateBandwidthRateLimit(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateBandwidthRateLimitRequest

func (c *StorageGateway) UpdateBandwidthRateLimitRequest(input *UpdateBandwidthRateLimitInput) (req *request.Request, output *UpdateBandwidthRateLimitOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateBandwidthRateLimit

UpdateBandwidthRateLimitWithContext

func (c *StorageGateway) UpdateBandwidthRateLimitWithContext(ctx aws.Context, input *UpdateBandwidthRateLimitInput, opts ...request.Option) (*UpdateBandwidthRateLimitOutput, error)

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

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

UpdateChapCredentials

func (c *StorageGateway) UpdateChapCredentials(input *UpdateChapCredentialsInput) (*UpdateChapCredentialsOutput, error)

UpdateChapCredentials API operation for AWS Storage Gateway.

Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target. By default, a gateway does not have CHAP enabled; however, for added security, you might use it.

When you update CHAP credentials, all existing connections on the target are closed and initiators must reconnect with the new credentials.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateChapCredentials for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials

Example

StorageGateway UpdateChapCredentials shared00

To update CHAP credentials for an iSCSI target

Updates the Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateChapCredentialsInput{ InitiatorName: aws.String("iqn.1991-05.com.microsoft:computername.domain.example.com"), SecretToAuthenticateInitiator: aws.String("111111111111"), SecretToAuthenticateTarget: aws.String("222222222222"), TargetARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume"), } result, err := svc.UpdateChapCredentials(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateChapCredentialsRequest

func (c *StorageGateway) UpdateChapCredentialsRequest(input *UpdateChapCredentialsInput) (req *request.Request, output *UpdateChapCredentialsOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateChapCredentials

UpdateChapCredentialsWithContext

func (c *StorageGateway) UpdateChapCredentialsWithContext(ctx aws.Context, input *UpdateChapCredentialsInput, opts ...request.Option) (*UpdateChapCredentialsOutput, error)

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

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

UpdateGatewayInformation

func (c *StorageGateway) UpdateGatewayInformation(input *UpdateGatewayInformationInput) (*UpdateGatewayInformationOutput, error)

UpdateGatewayInformation API operation for AWS Storage Gateway.

Updates a gateway's metadata, which includes the gateway's name and time zone. To specify which gateway to update, use the Amazon Resource Name (ARN) of the gateway in your request.

For Gateways activated after September 2, 2015, the gateway's ARN contains the gateway ID rather than the gateway name. However, changing the name of the gateway has no effect on the gateway's ARN.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateGatewayInformation for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation

Example

StorageGateway UpdateGatewayInformation shared00

To update a gateway's metadata

Updates a gateway's metadata, which includes the gateway's name and time zone.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateGatewayInformationInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), GatewayName: aws.String("MyGateway2"), GatewayTimezone: aws.String("GMT-12:00"), } result, err := svc.UpdateGatewayInformation(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateGatewayInformationRequest

func (c *StorageGateway) UpdateGatewayInformationRequest(input *UpdateGatewayInformationInput) (req *request.Request, output *UpdateGatewayInformationOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewayInformation

UpdateGatewayInformationWithContext

func (c *StorageGateway) UpdateGatewayInformationWithContext(ctx aws.Context, input *UpdateGatewayInformationInput, opts ...request.Option) (*UpdateGatewayInformationOutput, error)

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

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

UpdateGatewaySoftwareNow

func (c *StorageGateway) UpdateGatewaySoftwareNow(input *UpdateGatewaySoftwareNowInput) (*UpdateGatewaySoftwareNowOutput, error)

UpdateGatewaySoftwareNow API operation for AWS Storage Gateway.

Updates the gateway virtual machine (VM) software. The request immediately triggers the software update.

When you make this request, you get a 200 OK success response immediately. However, it might take some time for the update to complete. You can call DescribeGatewayInformation to verify the gateway is in the STATE_RUNNING state.

A software update forces a system restart of your gateway. You can minimize the chance of any disruption to your applications by increasing your iSCSI Initiators' timeouts. For more information about increasing iSCSI Initiator timeouts for Windows and Linux, see Customizing Your Windows iSCSI Settings (https://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorWindowsClient.html#CustomizeWindowsiSCSISettings) and Customizing Your Linux iSCSI Settings (https://docs.aws.amazon.com/storagegateway/latest/userguide/ConfiguringiSCSIClientInitiatorRedHatClient.html#CustomizeLinuxiSCSISettings), respectively.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateGatewaySoftwareNow for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow

Example

StorageGateway UpdateGatewaySoftwareNow shared00

To update a gateway's VM software

Updates the gateway virtual machine (VM) software. The request immediately triggers the software update.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateGatewaySoftwareNowInput{ GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), } result, err := svc.UpdateGatewaySoftwareNow(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateGatewaySoftwareNowRequest

func (c *StorageGateway) UpdateGatewaySoftwareNowRequest(input *UpdateGatewaySoftwareNowInput) (req *request.Request, output *UpdateGatewaySoftwareNowOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateGatewaySoftwareNow

UpdateGatewaySoftwareNowWithContext

func (c *StorageGateway) UpdateGatewaySoftwareNowWithContext(ctx aws.Context, input *UpdateGatewaySoftwareNowInput, opts ...request.Option) (*UpdateGatewaySoftwareNowOutput, error)

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

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

UpdateMaintenanceStartTime

func (c *StorageGateway) UpdateMaintenanceStartTime(input *UpdateMaintenanceStartTimeInput) (*UpdateMaintenanceStartTimeOutput, error)

UpdateMaintenanceStartTime API operation for AWS Storage Gateway.

Updates a gateway's weekly maintenance start time information, including day and time of the week. The maintenance time is the time in your gateway's time zone.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateMaintenanceStartTime for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime

Example

StorageGateway UpdateMaintenanceStartTime shared00

To update a gateway's maintenance start time

Updates a gateway's weekly maintenance start time information, including day and time of the week. The maintenance time is in your gateway's time zone.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateMaintenanceStartTimeInput{ DayOfWeek: aws.Int64(2), GatewayARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B"), HourOfDay: aws.Int64(0), MinuteOfHour: aws.Int64(30), } result, err := svc.UpdateMaintenanceStartTime(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateMaintenanceStartTimeRequest

func (c *StorageGateway) UpdateMaintenanceStartTimeRequest(input *UpdateMaintenanceStartTimeInput) (req *request.Request, output *UpdateMaintenanceStartTimeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateMaintenanceStartTime

UpdateMaintenanceStartTimeWithContext

func (c *StorageGateway) UpdateMaintenanceStartTimeWithContext(ctx aws.Context, input *UpdateMaintenanceStartTimeInput, opts ...request.Option) (*UpdateMaintenanceStartTimeOutput, error)

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

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

UpdateNFSFileShare

func (c *StorageGateway) UpdateNFSFileShare(input *UpdateNFSFileShareInput) (*UpdateNFSFileShareOutput, error)

UpdateNFSFileShare API operation for AWS Storage Gateway.

Updates a Network File System (NFS) file share. This operation is only supported in the file gateway type.

To leave a file share field unchanged, set the corresponding input field to null.

Updates the following file share setting:

  • Default storage class for your S3 bucket

  • Metadata defaults for your S3 bucket

  • Allowed NFS clients for your file share

  • Squash settings

  • Write status of your file share

To leave a file share field unchanged, set the corresponding input field to null. This operation is only supported in file gateways.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateNFSFileShare for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare

UpdateNFSFileShareRequest

func (c *StorageGateway) UpdateNFSFileShareRequest(input *UpdateNFSFileShareInput) (req *request.Request, output *UpdateNFSFileShareOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateNFSFileShare

UpdateNFSFileShareWithContext

func (c *StorageGateway) UpdateNFSFileShareWithContext(ctx aws.Context, input *UpdateNFSFileShareInput, opts ...request.Option) (*UpdateNFSFileShareOutput, error)

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

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

UpdateSMBFileShare

func (c *StorageGateway) UpdateSMBFileShare(input *UpdateSMBFileShareInput) (*UpdateSMBFileShareOutput, error)

UpdateSMBFileShare API operation for AWS Storage Gateway.

Updates a Server Message Block (SMB) file share.

To leave a file share field unchanged, set the corresponding input field to null. This operation is only supported for file gateways.

File gateways require AWS Security Token Service (AWS STS) to be activated to enable you to create a file share. Make sure that AWS STS is activated in the AWS Region you are creating your file gateway in. If AWS STS is not activated in this AWS Region, activate it. For information about how to activate AWS STS, see Activating and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) in the AWS Identity and Access Management User Guide.

File gateways don't support creating hard or symbolic links on a file share.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateSMBFileShare for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare

UpdateSMBFileShareRequest

func (c *StorageGateway) UpdateSMBFileShareRequest(input *UpdateSMBFileShareInput) (req *request.Request, output *UpdateSMBFileShareOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSMBFileShare

UpdateSMBFileShareWithContext

func (c *StorageGateway) UpdateSMBFileShareWithContext(ctx aws.Context, input *UpdateSMBFileShareInput, opts ...request.Option) (*UpdateSMBFileShareOutput, error)

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

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

UpdateSnapshotSchedule

func (c *StorageGateway) UpdateSnapshotSchedule(input *UpdateSnapshotScheduleInput) (*UpdateSnapshotScheduleOutput, error)

UpdateSnapshotSchedule API operation for AWS Storage Gateway.

Updates a snapshot schedule configured for a gateway volume. This operation is only supported in the cached volume and stored volume gateway types.

The default snapshot schedule for volume is once every 24 hours, starting at the creation time of the volume. You can use this API to change the snapshot schedule configured for the volume.

In the request you must identify the gateway volume whose snapshot schedule you want to update, and the schedule information, including when you want the snapshot to begin on a day and the frequency (in hours) of snapshots.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateSnapshotSchedule for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule

Example

StorageGateway UpdateSnapshotSchedule shared00

To update a volume snapshot schedule

Updates a snapshot schedule configured for a gateway volume.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateSnapshotScheduleInput{ Description: aws.String("Hourly snapshot"), RecurrenceInHours: aws.Int64(1), StartAt: aws.Int64(0), VolumeARN: aws.String("arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/volume/vol-1122AABB"), } result, err := svc.UpdateSnapshotSchedule(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateSnapshotScheduleRequest

func (c *StorageGateway) UpdateSnapshotScheduleRequest(input *UpdateSnapshotScheduleInput) (req *request.Request, output *UpdateSnapshotScheduleOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateSnapshotSchedule

UpdateSnapshotScheduleWithContext

func (c *StorageGateway) UpdateSnapshotScheduleWithContext(ctx aws.Context, input *UpdateSnapshotScheduleInput, opts ...request.Option) (*UpdateSnapshotScheduleOutput, error)

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

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

UpdateVTLDeviceType

func (c *StorageGateway) UpdateVTLDeviceType(input *UpdateVTLDeviceTypeInput) (*UpdateVTLDeviceTypeOutput, error)

UpdateVTLDeviceType API operation for AWS Storage Gateway.

Updates the type of medium changer in a tape gateway. When you activate a tape gateway, you select a medium changer type for the tape gateway. This operation enables you to select a different type of medium changer after a tape gateway is activated. This operation is only supported in the tape gateway type.

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

See the AWS API reference guide for AWS Storage Gateway's API operation UpdateVTLDeviceType for usage and error information.

Returned Error Codes:

  • ErrCodeInvalidGatewayRequestException "InvalidGatewayRequestException" An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.

  • ErrCodeInternalServerError "InternalServerError" An internal server error has occurred during the request. For more information, see the error and message fields.

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType

Example

StorageGateway UpdateVTLDeviceType shared00

To update a VTL device type

Updates the type of medium changer in a gateway-VTL after a gateway-VTL is activated.

{ svc := storagegateway.New(session.New()) input := &storagegateway.UpdateVTLDeviceTypeInput{ DeviceType: aws.String("Medium Changer"), VTLDeviceARN: aws.String("arn:aws:storagegateway:us-east-1:999999999999:gateway/sgw-12A3456B/device/AMZN_SGW-1FAD4876_MEDIACHANGER_00001"), } result, err := svc.UpdateVTLDeviceType(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case storagegateway.ErrCodeInvalidGatewayRequestException: fmt.Println(storagegateway.ErrCodeInvalidGatewayRequestException, aerr.Error()) case storagegateway.ErrCodeInternalServerError: fmt.Println(storagegateway.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateVTLDeviceTypeRequest

func (c *StorageGateway) UpdateVTLDeviceTypeRequest(input *UpdateVTLDeviceTypeInput) (req *request.Request, output *UpdateVTLDeviceTypeOutput)

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

See also, https://docs.aws.amazon.com/goto/WebAPI/storagegateway-2013-06-30/UpdateVTLDeviceType

UpdateVTLDeviceTypeWithContext

func (c *StorageGateway) UpdateVTLDeviceTypeWithContext(ctx aws.Context, input *UpdateVTLDeviceTypeInput, opts ...request.Option) (*UpdateVTLDeviceTypeOutput, error)

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

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