untagResource method

Future<void> untagResource({
  1. required String resourceARN,
  2. required List<String> tagKeys,
})

Removes a tag from an index, FAQ, or a data source.

May throw ValidationException. May throw ResourceUnavailableException. May throw ThrottlingException. May throw AccessDeniedException. May throw InternalServerException.

Parameter resourceARN : The Amazon Resource Name (ARN) of the index, FAQ, or data source to remove the tag from.

Parameter tagKeys : A list of tag keys to remove from the index, FAQ, or data source. If a tag key does not exist on the resource, it is ignored.

Implementation

Future<void> untagResource({
  required String resourceARN,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceARN, 'resourceARN');
  _s.validateStringLength(
    'resourceARN',
    resourceARN,
    1,
    1011,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSKendraFrontendService.UntagResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceARN': resourceARN,
      'TagKeys': tagKeys,
    },
  );
}