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 application.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter resourceARN : The Amazon Resource Name (ARN) of the application 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 application, append the TagKeys parameter and argument for each additional tag to remove, separated by an ampersand.

Implementation

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