Skip to main content

dns_threat_detectors

Creates, updates, deletes, gets or lists a dns_threat_detectors resource.

Overview

Namedns_threat_detectors
TypeResource
Idgoogle.networksecurity.dns_threat_detectors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. Identifier. Name of the DnsThreatDetector resource.
createTimestring (google-datetime)Output only. Create time stamp.
excludedNetworksarrayOptional. A list of network resource names which aren't monitored by this DnsThreatDetector. Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.
labelsobjectOptional. Any labels associated with the DnsThreatDetector, listed as key value pairs.
providerstringRequired. The provider used for DNS threat analysis. (PROVIDER_UNSPECIFIED, INFOBLOX)
updateTimestring (google-datetime)Output only. Update time stamp.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_dns_threat_detectors_getselectprojectsId, locationsId, dnsThreatDetectorsIdGets the details of a single DnsThreatDetector.
projects_locations_dns_threat_detectors_listselectprojectsId, locationsIdpageSize, pageTokenLists DnsThreatDetectors in a given project and location.
projects_locations_dns_threat_detectors_createinsertprojectsId, locationsIddnsThreatDetectorIdCreates a new DnsThreatDetector in a given project and location.
projects_locations_dns_threat_detectors_patchupdateprojectsId, locationsId, dnsThreatDetectorsIdupdateMaskUpdates a single DnsThreatDetector.
projects_locations_dns_threat_detectors_deletedeleteprojectsId, locationsId, dnsThreatDetectorsIdDeletes a single DnsThreatDetector.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dnsThreatDetectorsIdstring
locationsIdstring
projectsIdstring
dnsThreatDetectorIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the details of a single DnsThreatDetector.

SELECT
name,
createTime,
excludedNetworks,
labels,
provider,
updateTime
FROM google.networksecurity.dns_threat_detectors
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dnsThreatDetectorsId = '{{ dnsThreatDetectorsId }}' -- required
;

INSERT examples

Creates a new DnsThreatDetector in a given project and location.

INSERT INTO google.networksecurity.dns_threat_detectors (
data__name,
data__provider,
data__labels,
data__excludedNetworks,
projectsId,
locationsId,
dnsThreatDetectorId
)
SELECT
'{{ name }}',
'{{ provider }}',
'{{ labels }}',
'{{ excludedNetworks }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dnsThreatDetectorId }}'
RETURNING
name,
createTime,
excludedNetworks,
labels,
provider,
updateTime
;

UPDATE examples

Updates a single DnsThreatDetector.

UPDATE google.networksecurity.dns_threat_detectors
SET
data__name = '{{ name }}',
data__provider = '{{ provider }}',
data__labels = '{{ labels }}',
data__excludedNetworks = '{{ excludedNetworks }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dnsThreatDetectorsId = '{{ dnsThreatDetectorsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
excludedNetworks,
labels,
provider,
updateTime;

DELETE examples

Deletes a single DnsThreatDetector.

DELETE FROM google.networksecurity.dns_threat_detectors
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dnsThreatDetectorsId = '{{ dnsThreatDetectorsId }}' --required
;