untagResource method

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

Removes a tag from an AWS resource.

May throw InvalidRequestException. May throw InternalException.

Parameter keys : The keys in the key-value pair in the tag to remove.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource to remove the tag from.

Implementation

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