StorageGateway / Client / describe_chap_credentials
describe_chap_credentials#
- StorageGateway.Client.describe_chap_credentials(**kwargs)#
Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair. This operation is supported in the volume and tape gateway types.
See also: AWS API Documentation
Request Syntax
response = client.describe_chap_credentials( TargetARN='string' )
- Parameters:
TargetARN (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes operation to return to retrieve the TargetARN for specified VolumeARN.
- Return type:
dict
- Returns:
Response Syntax
{ 'ChapCredentials': [ { 'TargetARN': 'string', 'SecretToAuthenticateInitiator': 'string', 'InitiatorName': 'string', 'SecretToAuthenticateTarget': 'string' }, ] }
Response Structure
(dict) –
A JSON object containing the following fields:
ChapCredentials (list) –
An array of ChapInfo objects that represent CHAP credentials. Each object in the array contains CHAP credential information for one target-initiator pair. If no CHAP credentials are set, an empty array is returned. CHAP credential information is provided in a JSON object with the following fields:
InitiatorName: The iSCSI initiator that connects to the target.
SecretToAuthenticateInitiator: The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.
SecretToAuthenticateTarget: The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g. Windows client).
TargetARN: The Amazon Resource Name (ARN) of the storage volume.
(dict) –
Describes Challenge-Handshake Authentication Protocol (CHAP) information that supports authentication between your gateway and iSCSI initiators.
TargetARN (string) –
The Amazon Resource Name (ARN) of the volume.
Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).
SecretToAuthenticateInitiator (string) –
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.
InitiatorName (string) –
The iSCSI initiator that connects to the target.
SecretToAuthenticateTarget (string) –
The secret key that the target must provide to participate in mutual CHAP with the initiator (e.g., Windows client).
Exceptions
StorageGateway.Client.exceptions.InvalidGatewayRequestException
StorageGateway.Client.exceptions.InternalServerError
Examples
Returns an array of Challenge-Handshake Authentication Protocol (CHAP) credentials information for a specified iSCSI target, one for each target-initiator pair.
response = client.describe_chap_credentials( TargetARN='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume', ) print(response)
Expected Output:
{ 'ChapCredentials': [ { 'InitiatorName': 'iqn.1991-05.com.microsoft:computername.domain.example.com', 'SecretToAuthenticateInitiator': '111111111111', 'SecretToAuthenticateTarget': '222222222222', 'TargetARN': 'arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B/target/iqn.1997-05.com.amazon:myvolume', }, ], 'ResponseMetadata': { '...': '...', }, }