tagResource method
Tag a resource. A tag is a key-value pair of metadata that you associate with an Proton resource.
For more information, see Proton resources and tagging in the Proton User Guide.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the Proton resource to apply customer
tags to.
Parameter tags :
A list of customer tags to apply to the Proton resource.
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': 'AwsProton20200720.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'resourceArn': resourceArn,
'tags': tags,
},
);
}