deleteChapCredentials method

Future<DeleteChapCredentialsOutput> deleteChapCredentials({
  1. required String initiatorName,
  2. required String targetARN,
})

Deletes Challenge-Handshake Authentication Protocol (CHAP) credentials for a specified iSCSI target and initiator pair. This operation is supported in volume and tape gateway types.

May throw InternalServerError. May throw InvalidGatewayRequestException.

Parameter initiatorName : The iSCSI initiator that connects to the target.

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<DeleteChapCredentialsOutput> deleteChapCredentials({
  required String initiatorName,
  required String targetARN,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'StorageGateway_20130630.DeleteChapCredentials'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'InitiatorName': initiatorName,
      'TargetARN': targetARN,
    },
  );

  return DeleteChapCredentialsOutput.fromJson(jsonResponse.body);
}