tagResource method
Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.
There is no response returned from this call.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceARN :
Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services
resource, such as a capability, partnership, profile, or transformer.
Parameter tags :
Specifies the key-value pairs assigned to ARNs that you can use to group
and search for resources by type. You can attach this metadata to
resources (capabilities, partnerships, and so on) for any purpose.
Implementation
Future<void> tagResource({
required String resourceARN,
required List<Tag> tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'B2BI.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
'Tags': tags,
},
);
}