removeTagsFromResource method
Removes one or more tags from 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 you want to remove the tags
from.
Parameter tagKeys
:
The keys of the tags you want to remove from the specified resource. A tag
is composed of a key-value pair.
Implementation
Future<RemoveTagsFromResourceOutput> removeTagsFromResource({
required String resourceARN,
required List<String> tagKeys,
}) async {
ArgumentError.checkNotNull(resourceARN, 'resourceARN');
_s.validateStringLength(
'resourceARN',
resourceARN,
50,
500,
isRequired: true,
);
ArgumentError.checkNotNull(tagKeys, 'tagKeys');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'StorageGateway_20130630.RemoveTagsFromResource'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
'TagKeys': tagKeys,
},
);
return RemoveTagsFromResourceOutput.fromJson(jsonResponse.body);
}