tagResource method
Adds the specified tags to the specified resource.
The supported resource types are users, routing profiles, quick connects, and contact flows.
For sample policies that use tags, see Amazon Connect Identity-Based Policy Examples in the Amazon Connect Administrator Guide.
May throw InvalidRequestException. May throw InvalidParameterException. May throw InternalServiceException. May throw ResourceNotFoundException. May throw ThrottlingException.
Parameter resourceArn
:
The Amazon Resource Name (ARN) of the resource.
Parameter tags
:
One or more tags. For example, { "tags": {"key1":"value1",
"key2":"value2"} }.
Implementation
Future<void> tagResource({
required String resourceArn,
required Map<String, String> tags,
}) async {
ArgumentError.checkNotNull(resourceArn, 'resourceArn');
ArgumentError.checkNotNull(tags, 'tags');
final $payload = <String, dynamic>{
'tags': tags,
};
await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
exceptionFnMap: _exceptionFns,
);
}