untagResource method

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

Removes the association of tags from a DAX resource. You can call UntagResource up to 5 times per second, per account.

May throw ClusterNotFoundFault. May throw InvalidARNFault. May throw TagNotFoundFault. May throw InvalidClusterStateFault. May throw ServiceLinkedRoleNotFoundFault. May throw InvalidParameterValueException. May throw InvalidParameterCombinationException.

Parameter resourceName : The name of the DAX resource from which the tags should be removed.

Parameter tagKeys : A list of tag keys. If the DAX cluster has any tags with these keys, then the tags are removed from the cluster.

Implementation

Future<UntagResourceResponse> untagResource({
  required String resourceName,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceName, 'resourceName');
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDAXV3.UntagResource'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceName': resourceName,
      'TagKeys': tagKeys,
    },
  );

  return UntagResourceResponse.fromJson(jsonResponse.body);
}