• 沒有找到結果。

See Also

在文檔中 Storage Gateway (頁 24-62)

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG Date: Wed, 25 Apr 2012 12:00:02 GMT

Content-type: application/x-amz-json-1.1 Content-length: 80

{ "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-11A2222B"

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

AddCache

AddCache

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 How Storage Gateway works (architecture).

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.

Request Syntax

{ "DiskIds": [ "string" ], "GatewayARN": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

DiskIds (p. 9)

An array of strings that identify disks that are to be configured as working storage. Each string has a minimum length of 1 and maximum length of 300. You can get the disk IDs from the ListLocalDisks (p. 201) API.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 300.

Required: Yes GatewayARN (p. 9)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes

Response Syntax

{ "GatewayARN": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

Errors

The following data is returned in JSON format by the service.

GatewayARN (p. 9)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 366).

InternalServerError

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

HTTP Status Code: 400 InvalidGatewayRequestException

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

HTTP Status Code: 400

Examples

Example request

The following example shows a request that activates a stored volumes gateway.

Sample Request

POST / HTTP/1.1

Host: storagegateway.us-east-2.amazonaws.com Content-Type: application/x-amz-json-1.1

Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120425/us-east-2/

storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=9cd5a3584d1d67d57e61f120f35102d6b3649066abdd4bf4bbcf05bd9f2f8fe2

x-amz-date: 20120425T120000Z

x-amz-target: StorageGateway_20120630.AddCache {

"GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B", "DiskIds": [

"pci-0000:03:00.0-scsi-0:0:0:0", "pci-0000:03:00.0-scsi-0:0:1:0"

] }

Sample Response

HTTP/1.1 200 OK

See Also

x-amzn-RequestId: gur28r2rqlgb8vvs0mq17hlgij1q8glle1qeu3kpgg6f0kstauu0 Date: Wed, 25 Apr 2012 12:00:02 GMT

Content-Type: application/x-amz-json-1.1 Content-length: 85

{

"GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B"

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

AddTagsToResource

AddTagsToResource

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 Storage Gateway resources:

• Storage gateways of all types

• Storage volumes

• Virtual tapes

• NFS and SMB file shares

• File System associations

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

Request Syntax

{

"ResourceARN": "string", "Tags": [

{

"Key": "string", "Value": "string"

} ]}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

ResourceARN (p. 12)

The Amazon Resource Name (ARN) of the resource you want to add tags to.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes Tags (p. 12)

The key-value pair that represents the tag you want to add to the resource. The value can be an empty string.

NoteValid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. The maximum length of a tag's key is 128 characters, and the maximum length for a tag's value is 256.

Type: Array of Tag (p. 348) objects

Response Syntax

Required: Yes

Response Syntax

{ "ResourceARN": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ResourceARN (p. 13)

The Amazon Resource Name (ARN) of the resource you want to add tags to.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 366).

InternalServerError

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

HTTP Status Code: 400 InvalidGatewayRequestException

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

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

See Also

• AWS SDK for Ruby V3

AddUploadBuffer

AddUploadBuffer

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.

Request Syntax

{ "DiskIds": [ "string" ], "GatewayARN": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

DiskIds (p. 15)

An array of strings that identify disks that are to be configured as working storage. Each string has a minimum length of 1 and maximum length of 300. You can get the disk IDs from the ListLocalDisks (p. 201) API.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 300.

Required: Yes GatewayARN (p. 15)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes

Response Syntax

{ "GatewayARN": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

Errors

The following data is returned in JSON format by the service.

GatewayARN (p. 15)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 366).

InternalServerError

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

HTTP Status Code: 400 InvalidGatewayRequestException

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

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

AddWorkingStorage

AddWorkingStorage

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 (p. 15) instead.

NoteWorking storage is also referred to as upload buffer. You can also use the

AddUploadBuffer (p. 15) 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.

Request Syntax

{

"DiskIds": [ "string" ], "GatewayARN": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

DiskIds (p. 17)

An array of strings that identify disks that are to be configured as working storage. Each string has a minimum length of 1 and maximum length of 300. You can get the disk IDs from the ListLocalDisks (p. 201) API.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 300.

Required: Yes GatewayARN (p. 17)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes

Response Syntax

{ "GatewayARN": "string"

}

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

GatewayARN (p. 17)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 366).

InternalServerError

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

HTTP Status Code: 400 InvalidGatewayRequestException

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

HTTP Status Code: 400

Examples

Example request

The following example shows a request that specifies that two local disks of a gateway are to be configured as working storage.

Sample Request

POST / HTTP/1.1

Host: storagegateway.us-east-2.amazonaws.com x-amz-Date: 20120425T120000Z

Authorization: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG Content-type: application/x-amz-json-1.1

x-amz-target: StorageGateway_20120630.AddWorkingStorage

{ "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B", "DiskIds": [

"pci-0000:03:00.0-scsi-0:0:0:0", "pci-0000:04:00.0-scsi-1:0:0:0"

] }

See Also

Sample Response

HTTP/1.1 200 OK

x-amzn-RequestId: CSOC7TJPLR0OOKIRLGOHVAICUFVV4KQNSO5AEMVJF66Q9ASUAAJG Date: Wed, 25 Apr 2012 12:00:02 GMT

Content-type: application/x-amz-json-1.1 Content-length: 80

{ "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B"

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

AssignTapePool

AssignTapePool

Assigns a tape to a tape pool for archiving. The tape assigned to a pool is archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the S3 storage class (S3 Glacier or S3 Glacier Deep Archive) that corresponds to the pool.

Request Syntax

{ "BypassGovernanceRetention": boolean, "PoolId": "string",

"TapeARN": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

BypassGovernanceRetention (p. 20)

Set permissions to bypass governance retention. If the lock type of the archived tape is

Governance, the tape's archived age is not older than RetentionLockInDays, and the user does not already have BypassGovernanceRetention, setting this to TRUE enables the user to bypass the retention lock. This parameter is set to true by default for calls from the console.

Valid values: TRUE | FALSE Type: Boolean

Required: No PoolId (p. 20)

The ID of the pool that you want to add your tape to for archiving. The tape in this pool is archived in the S3 storage class that is associated with the pool. When you use your backup application to eject the tape, the tape is archived directly into the storage class (S3 Glacier or S3 Glacier Deep Archive) that corresponds to the pool.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 100.

Required: Yes TapeARN (p. 20)

The unique Amazon Resource Name (ARN) of the virtual tape that you want to add to the tape pool.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Pattern: ^arn:(aws|aws-cn|aws-us-gov):storagegateway:[a-z\-0-9]+:[0-9]+:tape\/

[0-9A-Z]{7,16}$

Response Syntax

Required: Yes

Response Syntax

{ "TapeARN": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

TapeARN (p. 21)

The unique Amazon Resource Names (ARN) of the virtual tape that was added to the tape pool.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Pattern: ^arn:(aws|aws-cn|aws-us-gov):storagegateway:[a-z\-0-9]+:[0-9]+:tape\/

[0-9A-Z]{7,16}$

Errors

For information about the errors that are common to all actions, see Common Errors (p. 366).

InternalServerError

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

HTTP Status Code: 400 InvalidGatewayRequestException

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

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

See Also

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

AssociateFileSystem

AssociateFileSystem

Associate an Amazon FSx file system with the FSx File Gateway. After the association process is complete, the file shares on the Amazon FSx file system are available for access through the gateway. This

operation only supports the FSx File Gateway type.

Request Syntax

{ "AuditDestinationARN": "string", "CacheAttributes": {

"CacheStaleTimeoutInSeconds": number },

"ClientToken": "string",

"EndpointNetworkConfiguration": { "IpAddresses": [ "string" ] },

"GatewayARN": "string", "LocationARN": "string", "Password": "string", "Tags": [

"UserName": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

AuditDestinationARN (p. 23)

The Amazon Resource Name (ARN) of the storage used for the audit logs.

Type: String

Length Constraints: Maximum length of 1024.

Required: No CacheAttributes (p. 23)

The refresh cache information for the file share or FSx file systems.

Type: CacheAttributes (p. 307) object Required: No

ClientToken (p. 23)

A unique string value that you supply that is used by the FSx File Gateway to ensure idempotent file system association creation.

Type: String

Request Parameters

Length Constraints: Minimum length of 5. Maximum length of 100.

Required: Yes

EndpointNetworkConfiguration (p. 23)

Specifies the network configuration information for the gateway associated with the Amazon FSx file system.

NoteIf multiple file systems are associated with this gateway, this parameter's IpAddresses field is required.

Type: EndpointNetworkConfiguration (p. 316) object Required: No

GatewayARN (p. 23)

The Amazon Resource Name (ARN) of the gateway. Use the ListGateways (p. 198) operation to return a list of gateways for your account and AWS Region.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes LocationARN (p. 23)

The Amazon Resource Name (ARN) of the Amazon FSx file system to associate with the FSx File Gateway.

Type: String

Length Constraints: Minimum length of 8. Maximum length of 512.

Required: Yes Password (p. 23)

The password of the user credential.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: ^[ -~]+$

Required: Yes Tags (p. 23)

A list of up to 50 tags that can be assigned to the file system association. Each tag is a key-value pair.

Type: Array of Tag (p. 348) objects Required: No

UserName (p. 23)

The user name of the user credential that has permission to access the root share D$ of the Amazon FSx file system. The user account must belong to the Amazon FSx delegated admin user group.

Type: String

Response Syntax

Length Constraints: Minimum length of 1. Maximum length of 1024.

Pattern: ^\w[\w\.\- ]*$

Required: Yes

Response Syntax

{ "FileSystemAssociationARN": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

FileSystemAssociationARN (p. 25)

The ARN of the newly created file system association.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 366).

InternalServerError

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

HTTP Status Code: 400 InvalidGatewayRequestException

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

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of AssociateFileSystem.

Sample Request

__Sample Request__

{

See Also

"UserName": "Admin", "Password": "Password123", "ClientToken": "foo-fsx-101",

"GatewayARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-7A8D6313", "LocationARN": "arn:aws:fsx:us-east-1:111122223333:file-system/fs-0bb4bf5cedebd814f", }

Example

This example illustrates one usage of AssociateFileSystem.

Sample Response

__Sample Response__

{

"FileSystemAssociationARNList": ["arn:aws:storagegateway:us-east-1:111122223333:fs-association/fsa-1122AABBCCDDEEFFG"]

}

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

AttachVolume

AttachVolume

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.

Request Syntax

{ "DiskId": "string", "GatewayARN": "string",

"NetworkInterfaceId": "string", "TargetName": "string",

"VolumeARN": "string"

}

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters (p. 364).

The request accepts the following data in JSON format.

DiskId (p. 27)

The unique device ID or other distinguishing data that identifies the local disk used to create the volume. This value is only required when you are attaching a stored volume.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 300.

Required: No GatewayARN (p. 27)

The Amazon Resource Name (ARN) of the gateway that you want to attach the volume to.

Type: String

Length Constraints: Minimum length of 50. Maximum length of 500.

Required: Yes

NetworkInterfaceId (p. 27)

The network interface of the gateway on which to expose the iSCSI target. Only IPv4 addresses are accepted. Use DescribeGatewayInformation (p. 132) to get a list of the network interfaces available on a gateway.

Valid Values: A valid IP address.

Type: String

Pattern: \A(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)) {3}\z

Response Syntax

Required: Yes TargetName (p. 27)

The name of the iSCSI target used by an initiator to connect to a volume and used as a suffix for the target ARN. For example, specifying TargetName as myvolume results in the target ARN of arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-12A3456B/target/

iqn.1997-05.com.amazon:myvolume. The target name must be unique across all volumes on a gateway.

If you don't specify a value, Storage Gateway uses the value that was previously used for this volume as the new target name.

If you don't specify a value, Storage Gateway uses the value that was previously used for this volume as the new target name.

在文檔中 Storage Gateway (頁 24-62)