Menu
AWS Storage Gateway Service
API Reference (API Version 2013-06-30)

UpdateNFSFileShare

Updates a file share. This operation is only supported in the file gateway type.

Note

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

Note

To leave a file share field unchanged, set the corresponding input field to null. This operation is only supported in file gateways.

Request Syntax

{
   "ClientList": [ "string" ],
   "DefaultStorageClass": "string",
   "FileShareARN": "string",
   "GuessMIMETypeEnabled": boolean,
   "KMSEncrypted": boolean,
   "KMSKey": "string",
   "NFSFileShareDefaults": { 
      "DirectoryMode": "string",
      "FileMode": "string",
      "GroupId": number,
      "OwnerId": number
   },
   "ReadOnly": boolean,
   "Squash": "string"
}

Request Parameters

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

The request accepts the following data in JSON format.

ClientList

The list of clients that are allowed to access the file gateway. The list must contain either valid IP addresses or valid CIDR blocks.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))?$

Required: No

DefaultStorageClass

The default storage class for objects put into an Amazon S3 bucket by a file gateway. Possible values are S3_STANDARD or S3_STANDARD_IA. If this field is not populated, the default value S3_STANDARD is used. Optional.

Type: String

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

Required: No

FileShareARN

The Amazon Resource Name (ARN) of the file share to be updated.

Type: String

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

Required: Yes

GuessMIMETypeEnabled

Enables guessing of the MIME type for uploaded objects based on file extensions: "true" to enable MIME type guessing, and otherwise "false". The default value is "true".

Type: Boolean

Required: No

KMSEncrypted

True to use Amazon S3 server side encryption with your own AWS KMS key, or false to use a key managed by Amazon S3. Optional.

Type: Boolean

Required: No

KMSKey

The KMS key used for Amazon S3 server side encryption. This value can only be set when KmsEncrypted is true. Optional.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Required: No

NFSFileShareDefaults

The default values for the file share. Optional.

Type: NFSFileShareDefaults object

Required: No

ReadOnly

Sets the write status of a file share: "true" if the write status is read-only, otherwise "false".

Type: Boolean

Required: No

Squash

The user mapped to anonymous user. Valid options are the following:

  • "RootSquash" - Only root is mapped to anonymous user.

  • "NoSquash" - No one is mapped to anonymous user

  • "AllSquash" - Everyone is mapped to anonymous user.

Type: String

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

Required: No

Response Syntax

{
   "FileShareARN": "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.

FileShareARN

The Amazon Resource Name (ARN) of the updated file share.

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.

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

Example

Update a File Share

In the following request, you update the file mode for a file share.

Sample Request


{"ClientToken": "xy23421",
 "NfsFileShareDefaults":
  {"FileMode": "0777",
   "DirectoryMode": "0777",
   "GroupId": 500,
   "OwnerId": 500},
 "GatewayARN": "arn:aws:storagegateway:us-east-2:111122223333:gateway/sgw-XXXXXXX",
 "GuessMIMETypeEnabled": "true",
 "KMSEncrypted": "false",
 "Role": "arn:aws:iam::111122223333:role/my-role",
 "ReadOnly": "false",
 "LocationARN": "arn:aws:s3:::my-bucket-alpha",
 "DefaultStorageClass" : "S3_STANDARD",
 "Squash" : "RootSquash"}

            

Sample Response


{"FileShareARN": "arn:aws:storagegateway:us-east-2:111122223333:share/share-XXXXXXX"}

See Also

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