tagResource method

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

Adds or overwrites only the specified tags for the specified Elastic Disaster Recovery resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceArn : ARN of the resource for which tags are to be added or updated.

Parameter tags : Array of tags to be added or updated.

Implementation

Future<void> tagResource({
  required String resourceArn,
  required Map<String, String> tags,
}) async {
  final $payload = <String, dynamic>{
    'tags': tags,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/tags/${Uri.encodeComponent(resourceArn)}',
    exceptionFnMap: _exceptionFns,
  );
}