untagResource method
Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.
No response is returned from this call.
May throw ServiceUnavailableException. May throw InternalServiceError. May throw InvalidRequestException. May throw ResourceNotFoundException.
Parameter arn
:
The value of the resource that will have the tag removed. An Amazon
Resource Name (ARN) is an identifier for a specific AWS resource, such as
a server, user, or role.
Parameter tagKeys
:
TagKeys are key-value pairs assigned to ARNs that can be used to group and
search for resources by type. This metadata can be attached to resources
for any purpose.
Implementation
Future<void> untagResource({
required String arn,
required List<String> tagKeys,
}) async {
ArgumentError.checkNotNull(arn, 'arn');
_s.validateStringLength(
'arn',
arn,
20,
1600,
isRequired: true,
);
ArgumentError.checkNotNull(tagKeys, 'tagKeys');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'TransferService.UntagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Arn': arn,
'TagKeys': tagKeys,
},
);
}