AWS Storage Gateway
User Guide (API Version 2012-06-30)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

UpdateChapCredentials

Description

This operation 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.

Important

When you update CHAP credentials, all existing connections on the target are closed and initiators must reconnect with the new credentials.

Request

Syntax

POST / HTTP/1.1 
Host: storagegateway.region.amazonaws.com
Authorization: authorization
Content-Type: application/x-amz-json-1.1
x-amz-date: date
x-amz-target: StorageGateway_20120630.UpdateChapCredentials

{
  "TargetARN": "String",
  "SecretToAuthenticateInitiator": "String",
  "InitiatorName": "String",
  "SecretToAuthenticateTarget": "String"
}

JSON Fields

InitiatorName

The iSCSI initiator that connects to the target.

Length: Minimum length of 1. Maximum length of 255.

Valid Values: The initiator name can contain lowercase letters, numbers, periods (.), and hyphens (-).

Required: Yes

Type: String

SecretToAuthenticateInitiator

The secret key that the initiator (e.g. Windows client) must provide to participate in mutual CHAP with the target.

Length: Minimum length of 12. Maximum length of 16.

Required: Yes

Type: String

SecretToAuthenticateTarget

The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).

Length: Minimum length of 12. Maximum length of 16.

Required: No

Type: String

TargetARN

The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes operation to return to retrieve the TargetARN for specified VolumeARN.

Required: yes

Type: String

Response

Syntax

HTTP/1.1 200 OK
x-amzn-RequestId: x-amzn-RequestId
Content-Type: application/x-amz-json-1.1
Content-length: payloadLength
Date: date

{
 "TargetARN": "String",
 "InitiatorName": "String"
}

JSON Fields

InitiatorName

The iSCSI initiator that connects to the target. This is the same initiator name specified in the request.

Type: String

TargetARN

The Amazon Resource Name (ARN) of the target. This is the same target specified in the request.

Type: String

Errors

This operation returns the following error codes in addition to exceptions common to all operations. For information about these errors and common exceptions, see Error Responses.

  • GatewayInternalError

  • GatewayNotConnected

  • GatewayNotFound

  • GatewayProxyNetworkConnectionBusy

  • InternalError

  • InvalidParameters

  • NotSupported

  • TargetInvalid

  • TargetNotFound

Examples

Example Request

The following example shows a request that updates CHAP credentials for an iSCSI target.

POST / HTTP/1.1 
Host: storagegateway.us-east-1.amazonaws.com
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120425/us-east-1/storagegateway/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=9cd5a3584d1d67d57e61f120f35102d6b3649066abdd4bf4bbcf05bd9f2f8fe2
x-amz-date: 20120912T120000Z
x-amz-target: StorageGateway_20120630.UpdateChapCredentials

{
   "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/mygateway/target/iqn.1997-05.com.amazon:myvolume",
   "SecretToAuthenticateInitiator": "111111111111",
   "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com",
   "SecretToAuthenticateTarget": "222222222222"
}

Example Response

HTTP/1.1 200 OK
x-amzn-RequestId: gur28r2rqlgb8vvs0mq17hlgij1q8glle1qeu3kpgg6f0kstauu0
Date: Wed, 12 Sep 2012 12:00:02 GMT
Content-Type: application/x-amz-json-1.1
Content-length: 203

{
  "TargetARN": "arn:aws:storagegateway:us-east-1:111122223333:gateway/mygateway/target/iqn.1997-05.com.amazon:myvolume",
  "InitiatorName": "iqn.1991-05.com.microsoft:computername.domain.example.com"
}