tagResource method

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

Adds one or more custom tags, each in the form of a key:value pair, to the specified resource.

To learn more about using tags with Amazon Transcribe, refer to Tagging resources.

May throw BadRequestException. May throw ConflictException. May throw InternalFailureException. May throw LimitExceededException. May throw NotFoundException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource you want to tag. ARNs have the format arn:partition:service:region:account-id:resource-type/resource-id.

For example, arn:aws:transcribe:us-west-2:111122223333:transcription-job/transcription-job-name.

Valid values for resource-type are: transcription-job, medical-transcription-job, vocabulary, medical-vocabulary, vocabulary-filter, and language-model.

Parameter tags : Adds one or more custom tags, each in the form of a key:value pair, to the specified resource.

To learn more about using tags with Amazon Transcribe, refer to Tagging resources.

Implementation

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