untagResource method

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

Remove one or more tags (keys and values) from a specified resource.

May throw BadRequestException. May throw ConcurrentModificationException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource that you want to remove one or more tags from.

Parameter tagKeys : The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value.

To remove more than one tag from the resource, append the TagKeys parameter and argument for each additional tag to remove, separated by an ampersand. For example: /v1/email/tags?ResourceArn=ResourceArn&TagKeys=Key1&TagKeys=Key2

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>>{
    'ResourceArn': [resourceArn],
    'TagKeys': tagKeys,
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/v1/email/tags',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}