untagResource method

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

Removes the given tags (metadata) from the resource.

May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ResourceInUseException. May throw ThrottlingException. May throw InternalFailureException.

Parameter resourceArn : The ARN of the resource.

Parameter tagKeys : A list of the keys of the tags to be removed from the resource.

Implementation

Future<void> untagResource({
  required String resourceArn,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  _s.validateStringLength(
    'resourceArn',
    resourceArn,
    1,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final $query = <String, List<String>>{
    'resourceArn': [resourceArn],
    'tagKeys': tagKeys,
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/tags',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}