tagResource method

Future<void> tagResource({
  1. required String resourceArn,
  2. required List<ResourceTag> tags,
})

Add a tag to a Amazon SWF domain.

May throw LimitExceededFault. May throw OperationNotPermittedFault. May throw TooManyTagsFault. May throw UnknownResourceFault.

Parameter resourceArn : The Amazon Resource Name (ARN) for the Amazon SWF domain.

Parameter tags : The list of tags to add to a domain.

Tags may only contain unicode letters, digits, whitespace, or these symbols: _ . : / = + - @.

Implementation

Future<void> tagResource({
  required String resourceArn,
  required List<ResourceTag> tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'SimpleWorkflowService.TagResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'resourceArn': resourceArn,
      'tags': tags,
    },
  );
}