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'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the iSCSI volume target. Use the DescribeStorediSCSIVolumes operation to return to retrieve the TargetARN for specified VolumeARN.
{
'ChapCredentials': [
{
'TargetARN': 'string',
'SecretToAuthenticateInitiator': 'string',
'InitiatorName': 'string',
'SecretToAuthenticateTarget': 'string'
},
]
}
Response Structure
A JSON object containing the following fields:
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:
Describes Challenge-Handshake Authentication Protocol (CHAP) information that supports authentication between your gateway and iSCSI initiators.
The Amazon Resource Name (ARN) of the volume.
Valid Values: 50 to 500 lowercase letters, numbers, periods (.), and hyphens (-).
The secret key that the initiator (for example, the Windows client) must provide to participate in mutual CHAP with the target.
The iSCSI initiator that connects to the target.
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': {
'...': '...',
},
}