untagResource method

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

Removes the tags associated with the keys that are provided in the query.

May throw NotFoundException. May throw BadRequestException. May throw InternalServerErrorException.

Parameter resourceArn :

The Amazon Resource Name (ARN) that uniquely identifies the resource that's associated with the tags.

Parameter tagKeys :

Tag keys must be unique for a given cluster. In addition, the following restrictions apply:

  • Each tag key must be unique. If you add a tag with a key that's already in use, your new tag overwrites the existing key-value pair.

  • You can't start a tag key with aws: because this prefix is reserved for use by AWS. AWS creates tags that begin with this prefix on your behalf, but you can't edit or delete them.

  • Tag keys must be between 1 and 128 Unicode characters in length.

  • Tag keys must consist of the following characters: Unicode letters, digits, white space, and the following special characters: _ . / = + - @.

Implementation

Future<void> untagResource({
  required String resourceArn,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final $query = <String, List<String>>{
    'tagKeys': tagKeys,
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/v1/tags/${Uri.encodeComponent(resourceArn)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}