listTagsForResource method
Lists the tags that have been added to the specified resource. This operation is supported in storage gateways of all types.
May throw InvalidGatewayRequestException. May throw InternalServerError.
Parameter resourceARN
:
The Amazon Resource Name (ARN) of the resource for which you want to list
tags.
Parameter limit
:
Specifies that the list of tags returned be limited to the specified
number of items.
Parameter marker
:
An opaque string that indicates the position at which to begin returning
the list of tags.
Implementation
Future<ListTagsForResourceOutput> listTagsForResource({
required String resourceARN,
int? limit,
String? marker,
}) async {
ArgumentError.checkNotNull(resourceARN, 'resourceARN');
_s.validateStringLength(
'resourceARN',
resourceARN,
50,
500,
isRequired: true,
);
_s.validateNumRange(
'limit',
limit,
1,
1152921504606846976,
);
_s.validateStringLength(
'marker',
marker,
1,
1000,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.ListTagsForResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
if (limit != null) 'Limit': limit,
if (marker != null) 'Marker': marker,
},
);
return ListTagsForResourceOutput.fromJson(jsonResponse.body);
}