---
title: "POST /v1/{+parent}/dnsThreatDetectors"
method: POST
path: "/v1/{+parent}/dnsThreatDetectors"
tags: ["projects"]
---

# POST /v1/{+parent}/dnsThreatDetectors

`POST /v1/{+parent}/dnsThreatDetectors`

Creates a new DnsThreatDetector in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `dnsThreatDetectorId` string

## Request body

- DnsThreatDetector — A DNS threat detector sends DNS query logs to a _provider_ that then analyzes the logs to identify threat events in the DNS queries. By default, all VPC networks in your projects are included. You can exclude specific networks by supplying `excluded_networks`.
  - `labels` object — Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.
  - `excludedNetworks` string[] — Optional. A list of network resource names which aren't monitored by this DnsThreatDetector. Example: `projects/PROJECT_ID/global/networks/NETWORK_NAME`.
  - `createTime` string, google-datetime — Output only. Create time stamp.
  - `provider` 'PROVIDER_UNSPECIFIED' | 'INFOBLOX' — Required. The provider used for DNS threat analysis.
  - `updateTime` string, google-datetime — Output only. Update time stamp.
  - `name` string — Immutable. Identifier. Name of the DnsThreatDetector resource.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/networksecurity.md) · [All operations](https://skmtc.net/google/apis/networksecurity/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/networksecurity/versions/4afd54463fe6/schema)
