tagResource method

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

Adds one or more tags to a signaling channel. A tag is a key-value pair (the value is optional) that you can define and assign to AWS resources. If you specify a tag that already exists, the tag value is replaced with the value that you specify in the request. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide.

May throw InvalidArgumentException. May throw ClientLimitExceededException. May throw ResourceNotFoundException. May throw AccessDeniedException. May throw TagsPerResourceExceededLimitException.

Parameter resourceARN : The Amazon Resource Name (ARN) of the signaling channel to which you want to add tags.

Parameter tags : A list of tags to associate with the specified signaling channel. Each tag is a key-value pair.

Implementation

Future<void> tagResource({
  required String resourceARN,
  required List<Tag> tags,
}) async {
  ArgumentError.checkNotNull(resourceARN, 'resourceARN');
  _s.validateStringLength(
    'resourceARN',
    resourceARN,
    1,
    1024,
    isRequired: true,
  );
  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,
  );
}