describeChapCredentials method

Future<DescribeChapCredentialsOutput> describeChapCredentials({
  1. required String targetARN,
})

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.

May throw InvalidGatewayRequestException. May throw InternalServerError.

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

Implementation

Future<DescribeChapCredentialsOutput> describeChapCredentials({
  required String targetARN,
}) async {
  ArgumentError.checkNotNull(targetARN, 'targetARN');
  _s.validateStringLength(
    'targetARN',
    targetARN,
    50,
    800,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StorageGateway_20130630.DescribeChapCredentials'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TargetARN': targetARN,
    },
  );

  return DescribeChapCredentialsOutput.fromJson(jsonResponse.body);
}