tagResource method

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

Adds one or more tags to the specified resource.

May throw AccessDeniedException. May throw InternalServerError. May throw InvalidParameterException. May throw ProvisionedThroughputExceededException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceARN : The Amazon Resource Name (ARN) that specifies the resource to be tagged.

Parameter tags : A set of tags (key-value pairs) that you want to assign to the resource.

Implementation

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