Network Security v1beta1 API - Class DnsThreatDetectorServiceClient (2.0.0-beta08)

public abstract class DnsThreatDetectorServiceClient

Reference documentation and code samples for the Network Security v1beta1 API class DnsThreatDetectorServiceClient.

DnsThreatDetectorService client wrapper, for convenient use.

Inheritance

object > DnsThreatDetectorServiceClient

Namespace

Google.Cloud.NetworkSecurity.V1Beta1

Assembly

Google.Cloud.NetworkSecurity.V1Beta1.dll

Remarks

The Network Security API for DNS Threat Detectors.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the DnsThreatDetectorService service, which is a host of "networksecurity.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default DnsThreatDetectorService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default DnsThreatDetectorService scopes are:

GrpcClient

public virtual DnsThreatDetectorService.DnsThreatDetectorServiceClient GrpcClient { get; }

The underlying gRPC DnsThreatDetectorService client

Property Value
Type Description
DnsThreatDetectorServiceDnsThreatDetectorServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static DnsThreatDetectorServiceClient Create()

Synchronously creates a DnsThreatDetectorServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DnsThreatDetectorServiceClientBuilder.

Returns
Type Description
DnsThreatDetectorServiceClient

The created DnsThreatDetectorServiceClient.

CreateAsync(CancellationToken)

public static Task<DnsThreatDetectorServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a DnsThreatDetectorServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use DnsThreatDetectorServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskDnsThreatDetectorServiceClient

The task representing the created DnsThreatDetectorServiceClient.

CreateDnsThreatDetector(LocationName, DnsThreatDetector, string, CallSettings)

public virtual DnsThreatDetector CreateDnsThreatDetector(LocationName parent, DnsThreatDetector dnsThreatDetector, string dnsThreatDetectorId, CallSettings callSettings = null)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
parent LocationName

Required. The value for the parent of the DnsThreatDetector resource.

dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource to create.

dnsThreatDetectorId string

Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
string dnsThreatDetectorId = "";
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.CreateDnsThreatDetector(parent, dnsThreatDetector, dnsThreatDetectorId);

CreateDnsThreatDetector(CreateDnsThreatDetectorRequest, CallSettings)

public virtual DnsThreatDetector CreateDnsThreatDetector(CreateDnsThreatDetectorRequest request, CallSettings callSettings = null)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
request CreateDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
CreateDnsThreatDetectorRequest request = new CreateDnsThreatDetectorRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DnsThreatDetectorId = "",
    DnsThreatDetector = new DnsThreatDetector(),
};
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.CreateDnsThreatDetector(request);

CreateDnsThreatDetector(string, DnsThreatDetector, string, CallSettings)

public virtual DnsThreatDetector CreateDnsThreatDetector(string parent, DnsThreatDetector dnsThreatDetector, string dnsThreatDetectorId, CallSettings callSettings = null)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
parent string

Required. The value for the parent of the DnsThreatDetector resource.

dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource to create.

dnsThreatDetectorId string

Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
string dnsThreatDetectorId = "";
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.CreateDnsThreatDetector(parent, dnsThreatDetector, dnsThreatDetectorId);

CreateDnsThreatDetectorAsync(LocationName, DnsThreatDetector, string, CallSettings)

public virtual Task<DnsThreatDetector> CreateDnsThreatDetectorAsync(LocationName parent, DnsThreatDetector dnsThreatDetector, string dnsThreatDetectorId, CallSettings callSettings = null)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
parent LocationName

Required. The value for the parent of the DnsThreatDetector resource.

dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource to create.

dnsThreatDetectorId string

Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
string dnsThreatDetectorId = "";
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.CreateDnsThreatDetectorAsync(parent, dnsThreatDetector, dnsThreatDetectorId);

CreateDnsThreatDetectorAsync(LocationName, DnsThreatDetector, string, CancellationToken)

public virtual Task<DnsThreatDetector> CreateDnsThreatDetectorAsync(LocationName parent, DnsThreatDetector dnsThreatDetector, string dnsThreatDetectorId, CancellationToken cancellationToken)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
parent LocationName

Required. The value for the parent of the DnsThreatDetector resource.

dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource to create.

dnsThreatDetectorId string

Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
string dnsThreatDetectorId = "";
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.CreateDnsThreatDetectorAsync(parent, dnsThreatDetector, dnsThreatDetectorId);

CreateDnsThreatDetectorAsync(CreateDnsThreatDetectorRequest, CallSettings)

public virtual Task<DnsThreatDetector> CreateDnsThreatDetectorAsync(CreateDnsThreatDetectorRequest request, CallSettings callSettings = null)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
request CreateDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDnsThreatDetectorRequest request = new CreateDnsThreatDetectorRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DnsThreatDetectorId = "",
    DnsThreatDetector = new DnsThreatDetector(),
};
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.CreateDnsThreatDetectorAsync(request);

CreateDnsThreatDetectorAsync(CreateDnsThreatDetectorRequest, CancellationToken)

public virtual Task<DnsThreatDetector> CreateDnsThreatDetectorAsync(CreateDnsThreatDetectorRequest request, CancellationToken cancellationToken)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
request CreateDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
CreateDnsThreatDetectorRequest request = new CreateDnsThreatDetectorRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    DnsThreatDetectorId = "",
    DnsThreatDetector = new DnsThreatDetector(),
};
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.CreateDnsThreatDetectorAsync(request);

CreateDnsThreatDetectorAsync(string, DnsThreatDetector, string, CallSettings)

public virtual Task<DnsThreatDetector> CreateDnsThreatDetectorAsync(string parent, DnsThreatDetector dnsThreatDetector, string dnsThreatDetectorId, CallSettings callSettings = null)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
parent string

Required. The value for the parent of the DnsThreatDetector resource.

dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource to create.

dnsThreatDetectorId string

Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
string dnsThreatDetectorId = "";
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.CreateDnsThreatDetectorAsync(parent, dnsThreatDetector, dnsThreatDetectorId);

CreateDnsThreatDetectorAsync(string, DnsThreatDetector, string, CancellationToken)

public virtual Task<DnsThreatDetector> CreateDnsThreatDetectorAsync(string parent, DnsThreatDetector dnsThreatDetector, string dnsThreatDetectorId, CancellationToken cancellationToken)

Creates a new DnsThreatDetector in a given project and location.

Parameters
Name Description
parent string

Required. The value for the parent of the DnsThreatDetector resource.

dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource to create.

dnsThreatDetectorId string

Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
string dnsThreatDetectorId = "";
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.CreateDnsThreatDetectorAsync(parent, dnsThreatDetector, dnsThreatDetectorId);

DeleteDnsThreatDetector(DeleteDnsThreatDetectorRequest, CallSettings)

public virtual void DeleteDnsThreatDetector(DeleteDnsThreatDetectorRequest request, CallSettings callSettings = null)

Deletes a single DnsThreatDetector.

Parameters
Name Description
request DeleteDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
DeleteDnsThreatDetectorRequest request = new DeleteDnsThreatDetectorRequest
{
    DnsThreatDetectorName = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]"),
};
// Make the request
dnsThreatDetectorServiceClient.DeleteDnsThreatDetector(request);

DeleteDnsThreatDetector(DnsThreatDetectorName, CallSettings)

public virtual void DeleteDnsThreatDetector(DnsThreatDetectorName name, CallSettings callSettings = null)

Deletes a single DnsThreatDetector.

Parameters
Name Description
name DnsThreatDetectorName

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
DnsThreatDetectorName name = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
// Make the request
dnsThreatDetectorServiceClient.DeleteDnsThreatDetector(name);

DeleteDnsThreatDetector(string, CallSettings)

public virtual void DeleteDnsThreatDetector(string name, CallSettings callSettings = null)

Deletes a single DnsThreatDetector.

Parameters
Name Description
name string

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dnsThreatDetectors/[DNS_THREAT_DETECTOR]";
// Make the request
dnsThreatDetectorServiceClient.DeleteDnsThreatDetector(name);

DeleteDnsThreatDetectorAsync(DeleteDnsThreatDetectorRequest, CallSettings)

public virtual Task DeleteDnsThreatDetectorAsync(DeleteDnsThreatDetectorRequest request, CallSettings callSettings = null)

Deletes a single DnsThreatDetector.

Parameters
Name Description
request DeleteDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteDnsThreatDetectorRequest request = new DeleteDnsThreatDetectorRequest
{
    DnsThreatDetectorName = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]"),
};
// Make the request
await dnsThreatDetectorServiceClient.DeleteDnsThreatDetectorAsync(request);

DeleteDnsThreatDetectorAsync(DeleteDnsThreatDetectorRequest, CancellationToken)

public virtual Task DeleteDnsThreatDetectorAsync(DeleteDnsThreatDetectorRequest request, CancellationToken cancellationToken)

Deletes a single DnsThreatDetector.

Parameters
Name Description
request DeleteDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteDnsThreatDetectorRequest request = new DeleteDnsThreatDetectorRequest
{
    DnsThreatDetectorName = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]"),
};
// Make the request
await dnsThreatDetectorServiceClient.DeleteDnsThreatDetectorAsync(request);

DeleteDnsThreatDetectorAsync(DnsThreatDetectorName, CallSettings)

public virtual Task DeleteDnsThreatDetectorAsync(DnsThreatDetectorName name, CallSettings callSettings = null)

Deletes a single DnsThreatDetector.

Parameters
Name Description
name DnsThreatDetectorName

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DnsThreatDetectorName name = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
// Make the request
await dnsThreatDetectorServiceClient.DeleteDnsThreatDetectorAsync(name);

DeleteDnsThreatDetectorAsync(DnsThreatDetectorName, CancellationToken)

public virtual Task DeleteDnsThreatDetectorAsync(DnsThreatDetectorName name, CancellationToken cancellationToken)

Deletes a single DnsThreatDetector.

Parameters
Name Description
name DnsThreatDetectorName

Required. Name of the DnsThreatDetector resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DnsThreatDetectorName name = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
// Make the request
await dnsThreatDetectorServiceClient.DeleteDnsThreatDetectorAsync(name);

DeleteDnsThreatDetectorAsync(string, CallSettings)

public virtual Task DeleteDnsThreatDetectorAsync(string name, CallSettings callSettings = null)

Deletes a single DnsThreatDetector.

Parameters
Name Description
name string

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dnsThreatDetectors/[DNS_THREAT_DETECTOR]";
// Make the request
await dnsThreatDetectorServiceClient.DeleteDnsThreatDetectorAsync(name);

DeleteDnsThreatDetectorAsync(string, CancellationToken)

public virtual Task DeleteDnsThreatDetectorAsync(string name, CancellationToken cancellationToken)

Deletes a single DnsThreatDetector.

Parameters
Name Description
name string

Required. Name of the DnsThreatDetector resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dnsThreatDetectors/[DNS_THREAT_DETECTOR]";
// Make the request
await dnsThreatDetectorServiceClient.DeleteDnsThreatDetectorAsync(name);

GetDnsThreatDetector(DnsThreatDetectorName, CallSettings)

public virtual DnsThreatDetector GetDnsThreatDetector(DnsThreatDetectorName name, CallSettings callSettings = null)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
name DnsThreatDetectorName

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
DnsThreatDetectorName name = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.GetDnsThreatDetector(name);

GetDnsThreatDetector(GetDnsThreatDetectorRequest, CallSettings)

public virtual DnsThreatDetector GetDnsThreatDetector(GetDnsThreatDetectorRequest request, CallSettings callSettings = null)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
request GetDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
GetDnsThreatDetectorRequest request = new GetDnsThreatDetectorRequest
{
    DnsThreatDetectorName = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]"),
};
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.GetDnsThreatDetector(request);

GetDnsThreatDetector(string, CallSettings)

public virtual DnsThreatDetector GetDnsThreatDetector(string name, CallSettings callSettings = null)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
name string

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dnsThreatDetectors/[DNS_THREAT_DETECTOR]";
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.GetDnsThreatDetector(name);

GetDnsThreatDetectorAsync(DnsThreatDetectorName, CallSettings)

public virtual Task<DnsThreatDetector> GetDnsThreatDetectorAsync(DnsThreatDetectorName name, CallSettings callSettings = null)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
name DnsThreatDetectorName

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DnsThreatDetectorName name = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.GetDnsThreatDetectorAsync(name);

GetDnsThreatDetectorAsync(DnsThreatDetectorName, CancellationToken)

public virtual Task<DnsThreatDetector> GetDnsThreatDetectorAsync(DnsThreatDetectorName name, CancellationToken cancellationToken)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
name DnsThreatDetectorName

Required. Name of the DnsThreatDetector resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DnsThreatDetectorName name = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]");
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.GetDnsThreatDetectorAsync(name);

GetDnsThreatDetectorAsync(GetDnsThreatDetectorRequest, CallSettings)

public virtual Task<DnsThreatDetector> GetDnsThreatDetectorAsync(GetDnsThreatDetectorRequest request, CallSettings callSettings = null)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
request GetDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
GetDnsThreatDetectorRequest request = new GetDnsThreatDetectorRequest
{
    DnsThreatDetectorName = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]"),
};
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.GetDnsThreatDetectorAsync(request);

GetDnsThreatDetectorAsync(GetDnsThreatDetectorRequest, CancellationToken)

public virtual Task<DnsThreatDetector> GetDnsThreatDetectorAsync(GetDnsThreatDetectorRequest request, CancellationToken cancellationToken)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
request GetDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
GetDnsThreatDetectorRequest request = new GetDnsThreatDetectorRequest
{
    DnsThreatDetectorName = DnsThreatDetectorName.FromProjectLocationDnsThreatDetector("[PROJECT]", "[LOCATION]", "[DNS_THREAT_DETECTOR]"),
};
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.GetDnsThreatDetectorAsync(request);

GetDnsThreatDetectorAsync(string, CallSettings)

public virtual Task<DnsThreatDetector> GetDnsThreatDetectorAsync(string name, CallSettings callSettings = null)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
name string

Required. Name of the DnsThreatDetector resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dnsThreatDetectors/[DNS_THREAT_DETECTOR]";
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.GetDnsThreatDetectorAsync(name);

GetDnsThreatDetectorAsync(string, CancellationToken)

public virtual Task<DnsThreatDetector> GetDnsThreatDetectorAsync(string name, CancellationToken cancellationToken)

Gets the details of a single DnsThreatDetector.

Parameters
Name Description
name string

Required. Name of the DnsThreatDetector resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dnsThreatDetectors/[DNS_THREAT_DETECTOR]";
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.GetDnsThreatDetectorAsync(name);

ListDnsThreatDetectors(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> ListDnsThreatDetectors(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DnsThreatDetectors in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent value for ListDnsThreatDetectorsRequest.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDnsThreatDetectorsResponseDnsThreatDetector

A pageable sequence of DnsThreatDetector resources.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> response = dnsThreatDetectorServiceClient.ListDnsThreatDetectors(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DnsThreatDetector item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDnsThreatDetectorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DnsThreatDetector item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DnsThreatDetector> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DnsThreatDetector item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDnsThreatDetectors(ListDnsThreatDetectorsRequest, CallSettings)

public virtual PagedEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> ListDnsThreatDetectors(ListDnsThreatDetectorsRequest request, CallSettings callSettings = null)

Lists DnsThreatDetectors in a given project and location.

Parameters
Name Description
request ListDnsThreatDetectorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDnsThreatDetectorsResponseDnsThreatDetector

A pageable sequence of DnsThreatDetector resources.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
ListDnsThreatDetectorsRequest request = new ListDnsThreatDetectorsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> response = dnsThreatDetectorServiceClient.ListDnsThreatDetectors(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (DnsThreatDetector item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDnsThreatDetectorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DnsThreatDetector item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DnsThreatDetector> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DnsThreatDetector item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDnsThreatDetectors(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> ListDnsThreatDetectors(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DnsThreatDetectors in a given project and location.

Parameters
Name Description
parent string

Required. The parent value for ListDnsThreatDetectorsRequest.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListDnsThreatDetectorsResponseDnsThreatDetector

A pageable sequence of DnsThreatDetector resources.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> response = dnsThreatDetectorServiceClient.ListDnsThreatDetectors(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (DnsThreatDetector item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListDnsThreatDetectorsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DnsThreatDetector item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DnsThreatDetector> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DnsThreatDetector item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDnsThreatDetectorsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> ListDnsThreatDetectorsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DnsThreatDetectors in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent value for ListDnsThreatDetectorsRequest.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDnsThreatDetectorsResponseDnsThreatDetector

A pageable asynchronous sequence of DnsThreatDetector resources.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> response = dnsThreatDetectorServiceClient.ListDnsThreatDetectorsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DnsThreatDetector item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDnsThreatDetectorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DnsThreatDetector item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DnsThreatDetector> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DnsThreatDetector item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDnsThreatDetectorsAsync(ListDnsThreatDetectorsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> ListDnsThreatDetectorsAsync(ListDnsThreatDetectorsRequest request, CallSettings callSettings = null)

Lists DnsThreatDetectors in a given project and location.

Parameters
Name Description
request ListDnsThreatDetectorsRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDnsThreatDetectorsResponseDnsThreatDetector

A pageable asynchronous sequence of DnsThreatDetector resources.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
ListDnsThreatDetectorsRequest request = new ListDnsThreatDetectorsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> response = dnsThreatDetectorServiceClient.ListDnsThreatDetectorsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DnsThreatDetector item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDnsThreatDetectorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DnsThreatDetector item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DnsThreatDetector> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DnsThreatDetector item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListDnsThreatDetectorsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> ListDnsThreatDetectorsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists DnsThreatDetectors in a given project and location.

Parameters
Name Description
parent string

Required. The parent value for ListDnsThreatDetectorsRequest.

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListDnsThreatDetectorsResponseDnsThreatDetector

A pageable asynchronous sequence of DnsThreatDetector resources.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListDnsThreatDetectorsResponse, DnsThreatDetector> response = dnsThreatDetectorServiceClient.ListDnsThreatDetectorsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DnsThreatDetector item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListDnsThreatDetectorsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (DnsThreatDetector item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<DnsThreatDetector> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (DnsThreatDetector item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateDnsThreatDetector(DnsThreatDetector, FieldMask, CallSettings)

public virtual DnsThreatDetector UpdateDnsThreatDetector(DnsThreatDetector dnsThreatDetector, FieldMask updateMask, CallSettings callSettings = null)

Updates a single DnsThreatDetector.

Parameters
Name Description
dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource being updated.

updateMask FieldMask

Optional. The field mask is used to specify the fields to be overwritten in the DnsThreatDetector resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the mask is not provided then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
FieldMask updateMask = new FieldMask();
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.UpdateDnsThreatDetector(dnsThreatDetector, updateMask);

UpdateDnsThreatDetector(UpdateDnsThreatDetectorRequest, CallSettings)

public virtual DnsThreatDetector UpdateDnsThreatDetector(UpdateDnsThreatDetectorRequest request, CallSettings callSettings = null)

Updates a single DnsThreatDetector.

Parameters
Name Description
request UpdateDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
DnsThreatDetector

The RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = DnsThreatDetectorServiceClient.Create();
// Initialize request argument(s)
UpdateDnsThreatDetectorRequest request = new UpdateDnsThreatDetectorRequest
{
    UpdateMask = new FieldMask(),
    DnsThreatDetector = new DnsThreatDetector(),
};
// Make the request
DnsThreatDetector response = dnsThreatDetectorServiceClient.UpdateDnsThreatDetector(request);

UpdateDnsThreatDetectorAsync(DnsThreatDetector, FieldMask, CallSettings)

public virtual Task<DnsThreatDetector> UpdateDnsThreatDetectorAsync(DnsThreatDetector dnsThreatDetector, FieldMask updateMask, CallSettings callSettings = null)

Updates a single DnsThreatDetector.

Parameters
Name Description
dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource being updated.

updateMask FieldMask

Optional. The field mask is used to specify the fields to be overwritten in the DnsThreatDetector resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the mask is not provided then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
FieldMask updateMask = new FieldMask();
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.UpdateDnsThreatDetectorAsync(dnsThreatDetector, updateMask);

UpdateDnsThreatDetectorAsync(DnsThreatDetector, FieldMask, CancellationToken)

public virtual Task<DnsThreatDetector> UpdateDnsThreatDetectorAsync(DnsThreatDetector dnsThreatDetector, FieldMask updateMask, CancellationToken cancellationToken)

Updates a single DnsThreatDetector.

Parameters
Name Description
dnsThreatDetector DnsThreatDetector

Required. The DnsThreatDetector resource being updated.

updateMask FieldMask

Optional. The field mask is used to specify the fields to be overwritten in the DnsThreatDetector resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the mask is not provided then all fields present in the request will be overwritten.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
DnsThreatDetector dnsThreatDetector = new DnsThreatDetector();
FieldMask updateMask = new FieldMask();
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.UpdateDnsThreatDetectorAsync(dnsThreatDetector, updateMask);

UpdateDnsThreatDetectorAsync(UpdateDnsThreatDetectorRequest, CallSettings)

public virtual Task<DnsThreatDetector> UpdateDnsThreatDetectorAsync(UpdateDnsThreatDetectorRequest request, CallSettings callSettings = null)

Updates a single DnsThreatDetector.

Parameters
Name Description
request UpdateDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDnsThreatDetectorRequest request = new UpdateDnsThreatDetectorRequest
{
    UpdateMask = new FieldMask(),
    DnsThreatDetector = new DnsThreatDetector(),
};
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.UpdateDnsThreatDetectorAsync(request);

UpdateDnsThreatDetectorAsync(UpdateDnsThreatDetectorRequest, CancellationToken)

public virtual Task<DnsThreatDetector> UpdateDnsThreatDetectorAsync(UpdateDnsThreatDetectorRequest request, CancellationToken cancellationToken)

Updates a single DnsThreatDetector.

Parameters
Name Description
request UpdateDnsThreatDetectorRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskDnsThreatDetector

A Task containing the RPC response.

Example
// Create client
DnsThreatDetectorServiceClient dnsThreatDetectorServiceClient = await DnsThreatDetectorServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDnsThreatDetectorRequest request = new UpdateDnsThreatDetectorRequest
{
    UpdateMask = new FieldMask(),
    DnsThreatDetector = new DnsThreatDetector(),
};
// Make the request
DnsThreatDetector response = await dnsThreatDetectorServiceClient.UpdateDnsThreatDetectorAsync(request);