tagResource method

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

Add a tag to a Amazon SWF domain.

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

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 {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  _s.validateStringLength(
    'resourceArn',
    resourceArn,
    1,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tags, 'tags');
  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,
    },
  );
}