listVolumeInitiators method
Lists iSCSI initiators that are connected to a volume. You can use this operation to determine whether a volume is being used or not. This operation is only supported in the cached volume and stored volume gateway types.
May throw InvalidGatewayRequestException. May throw InternalServerError.
Parameter volumeARN
:
The Amazon Resource Name (ARN) of the volume. Use the ListVolumes
operation to return a list of gateway volumes for the gateway.
Implementation
Future<ListVolumeInitiatorsOutput> listVolumeInitiators({
required String volumeARN,
}) async {
ArgumentError.checkNotNull(volumeARN, 'volumeARN');
_s.validateStringLength(
'volumeARN',
volumeARN,
50,
500,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.ListVolumeInitiators'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'VolumeARN': volumeARN,
},
);
return ListVolumeInitiatorsOutput.fromJson(jsonResponse.body);
}