deleteResolverQueryLogConfig method

Future<DeleteResolverQueryLogConfigResponse> deleteResolverQueryLogConfig({
  1. required String resolverQueryLogConfigId,
})

Deletes a query logging configuration. When you delete a configuration, Resolver stops logging DNS queries for all of the Amazon VPCs that are associated with the configuration. This also applies if the query logging configuration is shared with other AWS accounts, and the other accounts have associated VPCs with the shared configuration.

Before you can delete a query logging configuration, you must first disassociate all VPCs from the configuration. See DisassociateResolverQueryLogConfig.

If you used Resource Access Manager (RAM) to share a query logging configuration with other accounts, you must stop sharing the configuration before you can delete a configuration. The accounts that you shared the configuration with can first disassociate VPCs that they associated with the configuration, but that's not necessary. If you stop sharing the configuration, those VPCs are automatically disassociated from the configuration.

May throw ResourceNotFoundException. May throw InvalidParameterException. May throw InvalidRequestException. May throw InternalServiceErrorException. May throw ThrottlingException. May throw AccessDeniedException.

Parameter resolverQueryLogConfigId : The ID of the query logging configuration that you want to delete.

Implementation

Future<DeleteResolverQueryLogConfigResponse> deleteResolverQueryLogConfig({
  required String resolverQueryLogConfigId,
}) async {
  ArgumentError.checkNotNull(
      resolverQueryLogConfigId, 'resolverQueryLogConfigId');
  _s.validateStringLength(
    'resolverQueryLogConfigId',
    resolverQueryLogConfigId,
    1,
    64,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Route53Resolver.DeleteResolverQueryLogConfig'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResolverQueryLogConfigId': resolverQueryLogConfigId,
    },
  );

  return DeleteResolverQueryLogConfigResponse.fromJson(jsonResponse.body);
}