tagResource method
Applies the specified tags to the specified Amazon WorkMail organization resource.
May throw ResourceNotFoundException. May throw TooManyTagsException. May throw OrganizationStateException.
Parameter resourceARN
:
The resource ARN.
Parameter tags
:
The tag key-value pairs.
Implementation
Future<void> tagResource({
required String resourceARN,
required List<Tag> tags,
}) async {
ArgumentError.checkNotNull(resourceARN, 'resourceARN');
_s.validateStringLength(
'resourceARN',
resourceARN,
1,
1011,
isRequired: true,
);
ArgumentError.checkNotNull(tags, 'tags');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.TagResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceARN': resourceARN,
'Tags': tags,
},
);
}