tagResource method

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

Adds a tag to a resource.

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

Parameter resourceArn : The Amazon Resource Name (ARN) of the tags.

Parameter resourceTags : Adds a tag to a resource.

Implementation

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