removeTags method

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

Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

The following example removes the stack tag with value Prod from a cluster:

May throw InternalServerException. May throw InvalidRequestException.

Parameter resourceId : The Amazon EMR resource identifier from which tags will be removed. This value must be a cluster identifier.

Parameter tagKeys : A list of tag keys to remove from a resource.

Implementation

Future<void> removeTags({
  required String resourceId,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceId, 'resourceId');
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ElasticMapReduce.RemoveTags'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceId': resourceId,
      'TagKeys': tagKeys,
    },
  );
}