untagResource method

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

This action removes a tag from an Amazon FSx resource.

May throw BadRequest. May throw InternalServerError. May throw ResourceNotFound. May throw NotServiceResourceError. May throw ResourceDoesNotSupportTagging.

Parameter resourceARN : The ARN of the Amazon FSx resource to untag.

Parameter tagKeys : A list of keys of tags on the resource to untag. In case the tag key doesn't exist, the call will still succeed to be idempotent.

Implementation

Future<void> untagResource({
  required String resourceARN,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceARN, 'resourceARN');
  _s.validateStringLength(
    'resourceARN',
    resourceARN,
    8,
    512,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSSimbaAPIService_v20180301.UntagResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceARN': resourceARN,
      'TagKeys': tagKeys,
    },
  );
}