untagResource method

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

Removes one or more tags from an AWS resource.

May throw ResourceNotFoundException. May throw InvalidOperationException. May throw InternalErrorException. May throw InvalidInputException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource to return tags for. The AWS Firewall Manager resources that support tagging are policies, applications lists, and protocols lists.

Parameter tagKeys : The keys of the tags to remove from the resource.

Implementation

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