tagResource method

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

Adds the specified tags to the specified resource.

May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ValidationException. May throw InternalServerException.

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>{
    'resourceArn': resourceArn,
    'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/TagResource',
    exceptionFnMap: _exceptionFns,
  );
}