Compute Engine v1 API - Class FirewallPoliciesClient (2.10.0)

public abstract class FirewallPoliciesClient

Reference documentation and code samples for the Compute Engine v1 API class FirewallPoliciesClient.

FirewallPolicies client wrapper, for convenient use.

Inheritance

object > FirewallPoliciesClient

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The FirewallPolicies API.

Properties

AddAssociationOperationsClient

public virtual OperationsClient AddAssociationOperationsClient { get; }

The long-running operations client for AddAssociation.

Property Value
TypeDescription
OperationsClient

AddRuleOperationsClient

public virtual OperationsClient AddRuleOperationsClient { get; }

The long-running operations client for AddRule.

Property Value
TypeDescription
OperationsClient

CloneRulesOperationsClient

public virtual OperationsClient CloneRulesOperationsClient { get; }

The long-running operations client for CloneRules.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default FirewallPolicies scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual FirewallPolicies.FirewallPoliciesClient GrpcClient { get; }

The underlying gRPC FirewallPolicies client

Property Value
TypeDescription
FirewallPoliciesFirewallPoliciesClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

MoveOperationsClient

public virtual OperationsClient MoveOperationsClient { get; }

The long-running operations client for Move.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

PatchRuleOperationsClient

public virtual OperationsClient PatchRuleOperationsClient { get; }

The long-running operations client for PatchRule.

Property Value
TypeDescription
OperationsClient

RemoveAssociationOperationsClient

public virtual OperationsClient RemoveAssociationOperationsClient { get; }

The long-running operations client for RemoveAssociation.

Property Value
TypeDescription
OperationsClient

RemoveRuleOperationsClient

public virtual OperationsClient RemoveRuleOperationsClient { get; }

The long-running operations client for RemoveRule.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

AddAssociation(AddAssociationFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> AddAssociation(AddAssociationFirewallPolicyRequest request, CallSettings callSettings = null)

Inserts an association for the specified firewall policy.

Parameters
NameDescription
requestAddAssociationFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
AddAssociationFirewallPolicyRequest request = new AddAssociationFirewallPolicyRequest
{
    RequestId = "",
    ReplaceExistingAssociation = false,
    FirewallPolicyAssociationResource = new FirewallPolicyAssociation(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.AddAssociation(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceAddAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddAssociation(string, FirewallPolicyAssociation, CallSettings)

public virtual Operation<Operation, Operation> AddAssociation(string firewallPolicy, FirewallPolicyAssociation firewallPolicyAssociationResource, CallSettings callSettings = null)

Inserts an association for the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyAssociationResourceFirewallPolicyAssociation

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyAssociation firewallPolicyAssociationResource = new FirewallPolicyAssociation();
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.AddAssociation(firewallPolicy, firewallPolicyAssociationResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceAddAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddAssociationAsync(AddAssociationFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> AddAssociationAsync(AddAssociationFirewallPolicyRequest request, CallSettings callSettings = null)

Inserts an association for the specified firewall policy.

Parameters
NameDescription
requestAddAssociationFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
AddAssociationFirewallPolicyRequest request = new AddAssociationFirewallPolicyRequest
{
    RequestId = "",
    ReplaceExistingAssociation = false,
    FirewallPolicyAssociationResource = new FirewallPolicyAssociation(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddAssociationAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddAssociationAsync(AddAssociationFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> AddAssociationAsync(AddAssociationFirewallPolicyRequest request, CancellationToken cancellationToken)

Inserts an association for the specified firewall policy.

Parameters
NameDescription
requestAddAssociationFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
AddAssociationFirewallPolicyRequest request = new AddAssociationFirewallPolicyRequest
{
    RequestId = "",
    ReplaceExistingAssociation = false,
    FirewallPolicyAssociationResource = new FirewallPolicyAssociation(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddAssociationAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddAssociationAsync(string, FirewallPolicyAssociation, CallSettings)

public virtual Task<Operation<Operation, Operation>> AddAssociationAsync(string firewallPolicy, FirewallPolicyAssociation firewallPolicyAssociationResource, CallSettings callSettings = null)

Inserts an association for the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyAssociationResourceFirewallPolicyAssociation

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyAssociation firewallPolicyAssociationResource = new FirewallPolicyAssociation();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddAssociationAsync(firewallPolicy, firewallPolicyAssociationResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddAssociationAsync(string, FirewallPolicyAssociation, CancellationToken)

public virtual Task<Operation<Operation, Operation>> AddAssociationAsync(string firewallPolicy, FirewallPolicyAssociation firewallPolicyAssociationResource, CancellationToken cancellationToken)

Inserts an association for the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyAssociationResourceFirewallPolicyAssociation

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyAssociation firewallPolicyAssociationResource = new FirewallPolicyAssociation();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddAssociationAsync(firewallPolicy, firewallPolicyAssociationResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddRule(AddRuleFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> AddRule(AddRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Inserts a rule into a firewall policy.

Parameters
NameDescription
requestAddRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
AddRuleFirewallPolicyRequest request = new AddRuleFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyRuleResource = new FirewallPolicyRule(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.AddRule(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceAddRule(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddRule(string, FirewallPolicyRule, CallSettings)

public virtual Operation<Operation, Operation> AddRule(string firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource, CallSettings callSettings = null)

Inserts a rule into a firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyRule firewallPolicyRuleResource = new FirewallPolicyRule();
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.AddRule(firewallPolicy, firewallPolicyRuleResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceAddRule(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddRuleAsync(AddRuleFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> AddRuleAsync(AddRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Inserts a rule into a firewall policy.

Parameters
NameDescription
requestAddRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
AddRuleFirewallPolicyRequest request = new AddRuleFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyRuleResource = new FirewallPolicyRule(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddRuleAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddRuleAsync(AddRuleFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> AddRuleAsync(AddRuleFirewallPolicyRequest request, CancellationToken cancellationToken)

Inserts a rule into a firewall policy.

Parameters
NameDescription
requestAddRuleFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
AddRuleFirewallPolicyRequest request = new AddRuleFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyRuleResource = new FirewallPolicyRule(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddRuleAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddRuleAsync(string, FirewallPolicyRule, CallSettings)

public virtual Task<Operation<Operation, Operation>> AddRuleAsync(string firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource, CallSettings callSettings = null)

Inserts a rule into a firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyRule firewallPolicyRuleResource = new FirewallPolicyRule();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddRuleAsync(firewallPolicy, firewallPolicyRuleResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

AddRuleAsync(string, FirewallPolicyRule, CancellationToken)

public virtual Task<Operation<Operation, Operation>> AddRuleAsync(string firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource, CancellationToken cancellationToken)

Inserts a rule into a firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyRule firewallPolicyRuleResource = new FirewallPolicyRule();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.AddRuleAsync(firewallPolicy, firewallPolicyRuleResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceAddRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CloneRules(CloneRulesFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> CloneRules(CloneRulesFirewallPolicyRequest request, CallSettings callSettings = null)

Copies rules to the specified firewall policy.

Parameters
NameDescription
requestCloneRulesFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
CloneRulesFirewallPolicyRequest request = new CloneRulesFirewallPolicyRequest
{
    SourceFirewallPolicy = "",
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.CloneRules(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceCloneRules(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CloneRules(string, CallSettings)

public virtual Operation<Operation, Operation> CloneRules(string firewallPolicy, CallSettings callSettings = null)

Copies rules to the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.CloneRules(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceCloneRules(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CloneRulesAsync(CloneRulesFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> CloneRulesAsync(CloneRulesFirewallPolicyRequest request, CallSettings callSettings = null)

Copies rules to the specified firewall policy.

Parameters
NameDescription
requestCloneRulesFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
CloneRulesFirewallPolicyRequest request = new CloneRulesFirewallPolicyRequest
{
    SourceFirewallPolicy = "",
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.CloneRulesAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceCloneRulesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CloneRulesAsync(CloneRulesFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> CloneRulesAsync(CloneRulesFirewallPolicyRequest request, CancellationToken cancellationToken)

Copies rules to the specified firewall policy.

Parameters
NameDescription
requestCloneRulesFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
CloneRulesFirewallPolicyRequest request = new CloneRulesFirewallPolicyRequest
{
    SourceFirewallPolicy = "",
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.CloneRulesAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceCloneRulesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CloneRulesAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> CloneRulesAsync(string firewallPolicy, CallSettings callSettings = null)

Copies rules to the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.CloneRulesAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceCloneRulesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

CloneRulesAsync(string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> CloneRulesAsync(string firewallPolicy, CancellationToken cancellationToken)

Copies rules to the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.CloneRulesAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceCloneRulesAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Create()

public static FirewallPoliciesClient Create()

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

Returns
TypeDescription
FirewallPoliciesClient

The created FirewallPoliciesClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskFirewallPoliciesClient

The task representing the created FirewallPoliciesClient.

Delete(DeleteFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteFirewallPolicyRequest request, CallSettings callSettings = null)

Deletes the specified policy.

Parameters
NameDescription
requestDeleteFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
DeleteFirewallPolicyRequest request = new DeleteFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Delete(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Delete(string, CallSettings)

public virtual Operation<Operation, Operation> Delete(string firewallPolicy, CallSettings callSettings = null)

Deletes the specified policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Delete(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteFirewallPolicyRequest request, CallSettings callSettings = null)

Deletes the specified policy.

Parameters
NameDescription
requestDeleteFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
DeleteFirewallPolicyRequest request = new DeleteFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteFirewallPolicyRequest request, CancellationToken cancellationToken)

Deletes the specified policy.

Parameters
NameDescription
requestDeleteFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
DeleteFirewallPolicyRequest request = new DeleteFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string firewallPolicy, CallSettings callSettings = null)

Deletes the specified policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.DeleteAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string firewallPolicy, CancellationToken cancellationToken)

Deletes the specified policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.DeleteAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetFirewallPolicyRequest, CallSettings)

public virtual FirewallPolicy Get(GetFirewallPolicyRequest request, CallSettings callSettings = null)

Returns the specified firewall policy.

Parameters
NameDescription
requestGetFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPolicy

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
GetFirewallPolicyRequest request = new GetFirewallPolicyRequest { FirewallPolicy = "", };
// Make the request
FirewallPolicy response = firewallPoliciesClient.Get(request);

Get(string, CallSettings)

public virtual FirewallPolicy Get(string firewallPolicy, CallSettings callSettings = null)

Returns the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPolicy

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicy response = firewallPoliciesClient.Get(firewallPolicy);

GetAssociation(GetAssociationFirewallPolicyRequest, CallSettings)

public virtual FirewallPolicyAssociation GetAssociation(GetAssociationFirewallPolicyRequest request, CallSettings callSettings = null)

Gets an association with the specified name.

Parameters
NameDescription
requestGetAssociationFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPolicyAssociation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
GetAssociationFirewallPolicyRequest request = new GetAssociationFirewallPolicyRequest
{
    Name = "",
    FirewallPolicy = "",
};
// Make the request
FirewallPolicyAssociation response = firewallPoliciesClient.GetAssociation(request);

GetAssociation(string, CallSettings)

public virtual FirewallPolicyAssociation GetAssociation(string firewallPolicy, CallSettings callSettings = null)

Gets an association with the specified name.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to which the queried rule belongs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPolicyAssociation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicyAssociation response = firewallPoliciesClient.GetAssociation(firewallPolicy);

GetAssociationAsync(GetAssociationFirewallPolicyRequest, CallSettings)

public virtual Task<FirewallPolicyAssociation> GetAssociationAsync(GetAssociationFirewallPolicyRequest request, CallSettings callSettings = null)

Gets an association with the specified name.

Parameters
NameDescription
requestGetAssociationFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPolicyAssociation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetAssociationFirewallPolicyRequest request = new GetAssociationFirewallPolicyRequest
{
    Name = "",
    FirewallPolicy = "",
};
// Make the request
FirewallPolicyAssociation response = await firewallPoliciesClient.GetAssociationAsync(request);

GetAssociationAsync(GetAssociationFirewallPolicyRequest, CancellationToken)

public virtual Task<FirewallPolicyAssociation> GetAssociationAsync(GetAssociationFirewallPolicyRequest request, CancellationToken cancellationToken)

Gets an association with the specified name.

Parameters
NameDescription
requestGetAssociationFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPolicyAssociation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetAssociationFirewallPolicyRequest request = new GetAssociationFirewallPolicyRequest
{
    Name = "",
    FirewallPolicy = "",
};
// Make the request
FirewallPolicyAssociation response = await firewallPoliciesClient.GetAssociationAsync(request);

GetAssociationAsync(string, CallSettings)

public virtual Task<FirewallPolicyAssociation> GetAssociationAsync(string firewallPolicy, CallSettings callSettings = null)

Gets an association with the specified name.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to which the queried rule belongs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPolicyAssociation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicyAssociation response = await firewallPoliciesClient.GetAssociationAsync(firewallPolicy);

GetAssociationAsync(string, CancellationToken)

public virtual Task<FirewallPolicyAssociation> GetAssociationAsync(string firewallPolicy, CancellationToken cancellationToken)

Gets an association with the specified name.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to which the queried rule belongs.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPolicyAssociation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicyAssociation response = await firewallPoliciesClient.GetAssociationAsync(firewallPolicy);

GetAsync(GetFirewallPolicyRequest, CallSettings)

public virtual Task<FirewallPolicy> GetAsync(GetFirewallPolicyRequest request, CallSettings callSettings = null)

Returns the specified firewall policy.

Parameters
NameDescription
requestGetFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetFirewallPolicyRequest request = new GetFirewallPolicyRequest { FirewallPolicy = "", };
// Make the request
FirewallPolicy response = await firewallPoliciesClient.GetAsync(request);

GetAsync(GetFirewallPolicyRequest, CancellationToken)

public virtual Task<FirewallPolicy> GetAsync(GetFirewallPolicyRequest request, CancellationToken cancellationToken)

Returns the specified firewall policy.

Parameters
NameDescription
requestGetFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetFirewallPolicyRequest request = new GetFirewallPolicyRequest { FirewallPolicy = "", };
// Make the request
FirewallPolicy response = await firewallPoliciesClient.GetAsync(request);

GetAsync(string, CallSettings)

public virtual Task<FirewallPolicy> GetAsync(string firewallPolicy, CallSettings callSettings = null)

Returns the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicy response = await firewallPoliciesClient.GetAsync(firewallPolicy);

GetAsync(string, CancellationToken)

public virtual Task<FirewallPolicy> GetAsync(string firewallPolicy, CancellationToken cancellationToken)

Returns the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicy response = await firewallPoliciesClient.GetAsync(firewallPolicy);

GetIamPolicy(GetIamPolicyFirewallPolicyRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyFirewallPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
GetIamPolicyFirewallPolicyRequest request = new GetIamPolicyFirewallPolicyRequest
{
    Resource = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = firewallPoliciesClient.GetIamPolicy(request);

GetIamPolicy(string, CallSettings)

public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string resource = "";
// Make the request
Policy response = firewallPoliciesClient.GetIamPolicy(resource);

GetIamPolicyAsync(GetIamPolicyFirewallPolicyRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyFirewallPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyFirewallPolicyRequest request = new GetIamPolicyFirewallPolicyRequest
{
    Resource = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await firewallPoliciesClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyFirewallPolicyRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyFirewallPolicyRequest request, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
requestGetIamPolicyFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyFirewallPolicyRequest request = new GetIamPolicyFirewallPolicyRequest
{
    Resource = "",
    OptionsRequestedPolicyVersion = 0,
};
// Make the request
Policy response = await firewallPoliciesClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(string, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string resource = "";
// Make the request
Policy response = await firewallPoliciesClient.GetIamPolicyAsync(resource);

GetIamPolicyAsync(string, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string resource = "";
// Make the request
Policy response = await firewallPoliciesClient.GetIamPolicyAsync(resource);

GetRule(GetRuleFirewallPolicyRequest, CallSettings)

public virtual FirewallPolicyRule GetRule(GetRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Gets a rule of the specified priority.

Parameters
NameDescription
requestGetRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPolicyRule

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
GetRuleFirewallPolicyRequest request = new GetRuleFirewallPolicyRequest
{
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
FirewallPolicyRule response = firewallPoliciesClient.GetRule(request);

GetRule(string, CallSettings)

public virtual FirewallPolicyRule GetRule(string firewallPolicy, CallSettings callSettings = null)

Gets a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to which the queried rule belongs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPolicyRule

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicyRule response = firewallPoliciesClient.GetRule(firewallPolicy);

GetRuleAsync(GetRuleFirewallPolicyRequest, CallSettings)

public virtual Task<FirewallPolicyRule> GetRuleAsync(GetRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Gets a rule of the specified priority.

Parameters
NameDescription
requestGetRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPolicyRule

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetRuleFirewallPolicyRequest request = new GetRuleFirewallPolicyRequest
{
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
FirewallPolicyRule response = await firewallPoliciesClient.GetRuleAsync(request);

GetRuleAsync(GetRuleFirewallPolicyRequest, CancellationToken)

public virtual Task<FirewallPolicyRule> GetRuleAsync(GetRuleFirewallPolicyRequest request, CancellationToken cancellationToken)

Gets a rule of the specified priority.

Parameters
NameDescription
requestGetRuleFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPolicyRule

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
GetRuleFirewallPolicyRequest request = new GetRuleFirewallPolicyRequest
{
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
FirewallPolicyRule response = await firewallPoliciesClient.GetRuleAsync(request);

GetRuleAsync(string, CallSettings)

public virtual Task<FirewallPolicyRule> GetRuleAsync(string firewallPolicy, CallSettings callSettings = null)

Gets a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to which the queried rule belongs.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPolicyRule

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicyRule response = await firewallPoliciesClient.GetRuleAsync(firewallPolicy);

GetRuleAsync(string, CancellationToken)

public virtual Task<FirewallPolicyRule> GetRuleAsync(string firewallPolicy, CancellationToken cancellationToken)

Gets a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to which the queried rule belongs.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPolicyRule

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
FirewallPolicyRule response = await firewallPoliciesClient.GetRuleAsync(firewallPolicy);

Insert(InsertFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> Insert(InsertFirewallPolicyRequest request, CallSettings callSettings = null)

Creates a new policy in the specified project using the data included in the request.

Parameters
NameDescription
requestInsertFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
InsertFirewallPolicyRequest request = new InsertFirewallPolicyRequest
{
    RequestId = "",
    ParentId = "",
    FirewallPolicyResource = new FirewallPolicy(),
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Insert(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Insert(string, FirewallPolicy, CallSettings)

public virtual Operation<Operation, Operation> Insert(string parentId, FirewallPolicy firewallPolicyResource, CallSettings callSettings = null)

Creates a new policy in the specified project using the data included in the request.

Parameters
NameDescription
parentIdstring

Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.

firewallPolicyResourceFirewallPolicy

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string parentId = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Insert(parentId, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertFirewallPolicyRequest request, CallSettings callSettings = null)

Creates a new policy in the specified project using the data included in the request.

Parameters
NameDescription
requestInsertFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
InsertFirewallPolicyRequest request = new InsertFirewallPolicyRequest
{
    RequestId = "",
    ParentId = "",
    FirewallPolicyResource = new FirewallPolicy(),
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertFirewallPolicyRequest request, CancellationToken cancellationToken)

Creates a new policy in the specified project using the data included in the request.

Parameters
NameDescription
requestInsertFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
InsertFirewallPolicyRequest request = new InsertFirewallPolicyRequest
{
    RequestId = "",
    ParentId = "",
    FirewallPolicyResource = new FirewallPolicy(),
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(string, FirewallPolicy, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string parentId, FirewallPolicy firewallPolicyResource, CallSettings callSettings = null)

Creates a new policy in the specified project using the data included in the request.

Parameters
NameDescription
parentIdstring

Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.

firewallPolicyResourceFirewallPolicy

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string parentId = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.InsertAsync(parentId, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(string, FirewallPolicy, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string parentId, FirewallPolicy firewallPolicyResource, CancellationToken cancellationToken)

Creates a new policy in the specified project using the data included in the request.

Parameters
NameDescription
parentIdstring

Parent ID for this request. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.

firewallPolicyResourceFirewallPolicy

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string parentId = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.InsertAsync(parentId, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

List(ListFirewallPoliciesRequest, CallSettings)

public virtual PagedEnumerable<FirewallPolicyList, FirewallPolicy> List(ListFirewallPoliciesRequest request, CallSettings callSettings = null)

Lists all the policies that have been configured for the specified folder or organization.

Parameters
NameDescription
requestListFirewallPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableFirewallPolicyListFirewallPolicy

A pageable sequence of FirewallPolicy resources.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
ListFirewallPoliciesRequest request = new ListFirewallPoliciesRequest
{
    OrderBy = "",
    Filter = "",
    ParentId = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<FirewallPolicyList, FirewallPolicy> response = firewallPoliciesClient.List(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (FirewallPolicy 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 (FirewallPolicyList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (FirewallPolicy 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<FirewallPolicy> 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 (FirewallPolicy 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;

List(string, int?, CallSettings)

public virtual PagedEnumerable<FirewallPolicyList, FirewallPolicy> List(string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the policies that have been configured for the specified folder or organization.

Parameters
NameDescription
pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableFirewallPolicyListFirewallPolicy

A pageable sequence of FirewallPolicy resources.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Make the request
PagedEnumerable<FirewallPolicyList, FirewallPolicy> response = firewallPoliciesClient.List();

// Iterate over all response items, lazily performing RPCs as required
foreach (FirewallPolicy 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 (FirewallPolicyList page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (FirewallPolicy 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<FirewallPolicy> 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 (FirewallPolicy 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;

ListAssociations(CallSettings)

public virtual FirewallPoliciesListAssociationsResponse ListAssociations(CallSettings callSettings = null)

Lists associations of a specified target, i.e., organization or folder.

Parameter
NameDescription
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPoliciesListAssociationsResponse

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Make the request
FirewallPoliciesListAssociationsResponse response = firewallPoliciesClient.ListAssociations();

ListAssociations(ListAssociationsFirewallPolicyRequest, CallSettings)

public virtual FirewallPoliciesListAssociationsResponse ListAssociations(ListAssociationsFirewallPolicyRequest request, CallSettings callSettings = null)

Lists associations of a specified target, i.e., organization or folder.

Parameters
NameDescription
requestListAssociationsFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
FirewallPoliciesListAssociationsResponse

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
ListAssociationsFirewallPolicyRequest request = new ListAssociationsFirewallPolicyRequest { TargetResource = "", };
// Make the request
FirewallPoliciesListAssociationsResponse response = firewallPoliciesClient.ListAssociations(request);

ListAssociationsAsync(CallSettings)

public virtual Task<FirewallPoliciesListAssociationsResponse> ListAssociationsAsync(CallSettings callSettings = null)

Lists associations of a specified target, i.e., organization or folder.

Parameter
NameDescription
callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPoliciesListAssociationsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Make the request
FirewallPoliciesListAssociationsResponse response = await firewallPoliciesClient.ListAssociationsAsync();

ListAssociationsAsync(ListAssociationsFirewallPolicyRequest, CallSettings)

public virtual Task<FirewallPoliciesListAssociationsResponse> ListAssociationsAsync(ListAssociationsFirewallPolicyRequest request, CallSettings callSettings = null)

Lists associations of a specified target, i.e., organization or folder.

Parameters
NameDescription
requestListAssociationsFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskFirewallPoliciesListAssociationsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
ListAssociationsFirewallPolicyRequest request = new ListAssociationsFirewallPolicyRequest { TargetResource = "", };
// Make the request
FirewallPoliciesListAssociationsResponse response = await firewallPoliciesClient.ListAssociationsAsync(request);

ListAssociationsAsync(ListAssociationsFirewallPolicyRequest, CancellationToken)

public virtual Task<FirewallPoliciesListAssociationsResponse> ListAssociationsAsync(ListAssociationsFirewallPolicyRequest request, CancellationToken cancellationToken)

Lists associations of a specified target, i.e., organization or folder.

Parameters
NameDescription
requestListAssociationsFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPoliciesListAssociationsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
ListAssociationsFirewallPolicyRequest request = new ListAssociationsFirewallPolicyRequest { TargetResource = "", };
// Make the request
FirewallPoliciesListAssociationsResponse response = await firewallPoliciesClient.ListAssociationsAsync(request);

ListAssociationsAsync(CancellationToken)

public virtual Task<FirewallPoliciesListAssociationsResponse> ListAssociationsAsync(CancellationToken cancellationToken)

Lists associations of a specified target, i.e., organization or folder.

Parameter
NameDescription
cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskFirewallPoliciesListAssociationsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Make the request
FirewallPoliciesListAssociationsResponse response = await firewallPoliciesClient.ListAssociationsAsync();

ListAsync(ListFirewallPoliciesRequest, CallSettings)

public virtual PagedAsyncEnumerable<FirewallPolicyList, FirewallPolicy> ListAsync(ListFirewallPoliciesRequest request, CallSettings callSettings = null)

Lists all the policies that have been configured for the specified folder or organization.

Parameters
NameDescription
requestListFirewallPoliciesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableFirewallPolicyListFirewallPolicy

A pageable asynchronous sequence of FirewallPolicy resources.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
ListFirewallPoliciesRequest request = new ListFirewallPoliciesRequest
{
    OrderBy = "",
    Filter = "",
    ParentId = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<FirewallPolicyList, FirewallPolicy> response = firewallPoliciesClient.ListAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FirewallPolicy 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((FirewallPolicyList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (FirewallPolicy 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<FirewallPolicy> 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 (FirewallPolicy 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;

ListAsync(string, int?, CallSettings)

public virtual PagedAsyncEnumerable<FirewallPolicyList, FirewallPolicy> ListAsync(string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the policies that have been configured for the specified folder or organization.

Parameters
NameDescription
pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableFirewallPolicyListFirewallPolicy

A pageable asynchronous sequence of FirewallPolicy resources.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Make the request
PagedAsyncEnumerable<FirewallPolicyList, FirewallPolicy> response = firewallPoliciesClient.ListAsync();

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FirewallPolicy 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((FirewallPolicyList page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (FirewallPolicy 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<FirewallPolicy> 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 (FirewallPolicy 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;

Move(MoveFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> Move(MoveFirewallPolicyRequest request, CallSettings callSettings = null)

Moves the specified firewall policy.

Parameters
NameDescription
requestMoveFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
MoveFirewallPolicyRequest request = new MoveFirewallPolicyRequest
{
    RequestId = "",
    ParentId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Move(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceMove(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Move(string, string, CallSettings)

public virtual Operation<Operation, Operation> Move(string firewallPolicy, string parentId, CallSettings callSettings = null)

Moves the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

parentIdstring

The new parent of the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
string parentId = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Move(firewallPolicy, parentId);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceMove(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveAsync(MoveFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> MoveAsync(MoveFirewallPolicyRequest request, CallSettings callSettings = null)

Moves the specified firewall policy.

Parameters
NameDescription
requestMoveFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
MoveFirewallPolicyRequest request = new MoveFirewallPolicyRequest
{
    RequestId = "",
    ParentId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.MoveAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceMoveAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveAsync(MoveFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> MoveAsync(MoveFirewallPolicyRequest request, CancellationToken cancellationToken)

Moves the specified firewall policy.

Parameters
NameDescription
requestMoveFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
MoveFirewallPolicyRequest request = new MoveFirewallPolicyRequest
{
    RequestId = "",
    ParentId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.MoveAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceMoveAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveAsync(string, string, CallSettings)

public virtual Task<Operation<Operation, Operation>> MoveAsync(string firewallPolicy, string parentId, CallSettings callSettings = null)

Moves the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

parentIdstring

The new parent of the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
string parentId = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.MoveAsync(firewallPolicy, parentId);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceMoveAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

MoveAsync(string, string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> MoveAsync(string firewallPolicy, string parentId, CancellationToken cancellationToken)

Moves the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

parentIdstring

The new parent of the firewall policy. The ID can be either be "folders/[FOLDER_ID]" if the parent is a folder or "organizations/[ORGANIZATION_ID]" if the parent is an organization.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
string parentId = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.MoveAsync(firewallPolicy, parentId);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceMoveAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Patch(PatchFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> Patch(PatchFirewallPolicyRequest request, CallSettings callSettings = null)

Patches the specified policy with the data included in the request.

Parameters
NameDescription
requestPatchFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
PatchFirewallPolicyRequest request = new PatchFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyResource = new FirewallPolicy(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Patch(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Patch(string, FirewallPolicy, CallSettings)

public virtual Operation<Operation, Operation> Patch(string firewallPolicy, FirewallPolicy firewallPolicyResource, CallSettings callSettings = null)

Patches the specified policy with the data included in the request.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyResourceFirewallPolicy

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.Patch(firewallPolicy, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchFirewallPolicyRequest request, CallSettings callSettings = null)

Patches the specified policy with the data included in the request.

Parameters
NameDescription
requestPatchFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
PatchFirewallPolicyRequest request = new PatchFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyResource = new FirewallPolicy(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchFirewallPolicyRequest request, CancellationToken cancellationToken)

Patches the specified policy with the data included in the request.

Parameters
NameDescription
requestPatchFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
PatchFirewallPolicyRequest request = new PatchFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyResource = new FirewallPolicy(),
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(string, FirewallPolicy, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string firewallPolicy, FirewallPolicy firewallPolicyResource, CallSettings callSettings = null)

Patches the specified policy with the data included in the request.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyResourceFirewallPolicy

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchAsync(firewallPolicy, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(string, FirewallPolicy, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string firewallPolicy, FirewallPolicy firewallPolicyResource, CancellationToken cancellationToken)

Patches the specified policy with the data included in the request.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyResourceFirewallPolicy

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicy firewallPolicyResource = new FirewallPolicy();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchAsync(firewallPolicy, firewallPolicyResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchRule(PatchRuleFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> PatchRule(PatchRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Patches a rule of the specified priority.

Parameters
NameDescription
requestPatchRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
PatchRuleFirewallPolicyRequest request = new PatchRuleFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyRuleResource = new FirewallPolicyRule(),
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.PatchRule(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOncePatchRule(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchRule(string, FirewallPolicyRule, CallSettings)

public virtual Operation<Operation, Operation> PatchRule(string firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource, CallSettings callSettings = null)

Patches a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyRule firewallPolicyRuleResource = new FirewallPolicyRule();
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.PatchRule(firewallPolicy, firewallPolicyRuleResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOncePatchRule(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchRuleAsync(PatchRuleFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchRuleAsync(PatchRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Patches a rule of the specified priority.

Parameters
NameDescription
requestPatchRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
PatchRuleFirewallPolicyRequest request = new PatchRuleFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyRuleResource = new FirewallPolicyRule(),
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchRuleAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchRuleAsync(PatchRuleFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchRuleAsync(PatchRuleFirewallPolicyRequest request, CancellationToken cancellationToken)

Patches a rule of the specified priority.

Parameters
NameDescription
requestPatchRuleFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
PatchRuleFirewallPolicyRequest request = new PatchRuleFirewallPolicyRequest
{
    RequestId = "",
    FirewallPolicyRuleResource = new FirewallPolicyRule(),
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchRuleAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchRuleAsync(string, FirewallPolicyRule, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchRuleAsync(string firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource, CallSettings callSettings = null)

Patches a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyRule firewallPolicyRuleResource = new FirewallPolicyRule();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchRuleAsync(firewallPolicy, firewallPolicyRuleResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchRuleAsync(string, FirewallPolicyRule, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchRuleAsync(string firewallPolicy, FirewallPolicyRule firewallPolicyRuleResource, CancellationToken cancellationToken)

Patches a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

firewallPolicyRuleResourceFirewallPolicyRule

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
FirewallPolicyRule firewallPolicyRuleResource = new FirewallPolicyRule();
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.PatchRuleAsync(firewallPolicy, firewallPolicyRuleResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOncePatchRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PollOnceAddAssociation(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceAddAssociation(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of AddAssociation.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceAddAssociationAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceAddAssociationAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of AddAssociation.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceAddRule(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceAddRule(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of AddRule.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceAddRuleAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceAddRuleAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of AddRule.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceCloneRules(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceCloneRules(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CloneRules.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceCloneRulesAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceCloneRulesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CloneRules.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceDelete(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Delete.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceDeleteAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Delete .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceInsert(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Insert.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceInsertAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Insert .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceMove(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceMove(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Move.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceMoveAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceMoveAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Move .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOncePatch(string, CallSettings)

public virtual Operation<Operation, Operation> PollOncePatch(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of Patch.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOncePatchAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOncePatchAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of Patch .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOncePatchRule(string, CallSettings)

public virtual Operation<Operation, Operation> PollOncePatchRule(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of PatchRule.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOncePatchRuleAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOncePatchRuleAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of PatchRule.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceRemoveAssociation(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceRemoveAssociation(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of RemoveAssociation .

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceRemoveAssociationAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceRemoveAssociationAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of RemoveAssociation.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

PollOnceRemoveRule(string, CallSettings)

public virtual Operation<Operation, Operation> PollOnceRemoveRule(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of RemoveRule.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The result of polling the operation.

PollOnceRemoveRuleAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceRemoveRuleAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of RemoveRule.

Parameters
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A task representing the result of polling the operation.

RemoveAssociation(RemoveAssociationFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> RemoveAssociation(RemoveAssociationFirewallPolicyRequest request, CallSettings callSettings = null)

Removes an association for the specified firewall policy.

Parameters
NameDescription
requestRemoveAssociationFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
RemoveAssociationFirewallPolicyRequest request = new RemoveAssociationFirewallPolicyRequest
{
    Name = "",
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.RemoveAssociation(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceRemoveAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveAssociation(string, CallSettings)

public virtual Operation<Operation, Operation> RemoveAssociation(string firewallPolicy, CallSettings callSettings = null)

Removes an association for the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.RemoveAssociation(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceRemoveAssociation(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveAssociationAsync(RemoveAssociationFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> RemoveAssociationAsync(RemoveAssociationFirewallPolicyRequest request, CallSettings callSettings = null)

Removes an association for the specified firewall policy.

Parameters
NameDescription
requestRemoveAssociationFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
RemoveAssociationFirewallPolicyRequest request = new RemoveAssociationFirewallPolicyRequest
{
    Name = "",
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveAssociationAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveAssociationAsync(RemoveAssociationFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> RemoveAssociationAsync(RemoveAssociationFirewallPolicyRequest request, CancellationToken cancellationToken)

Removes an association for the specified firewall policy.

Parameters
NameDescription
requestRemoveAssociationFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
RemoveAssociationFirewallPolicyRequest request = new RemoveAssociationFirewallPolicyRequest
{
    Name = "",
    RequestId = "",
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveAssociationAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveAssociationAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> RemoveAssociationAsync(string firewallPolicy, CallSettings callSettings = null)

Removes an association for the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveAssociationAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveAssociationAsync(string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> RemoveAssociationAsync(string firewallPolicy, CancellationToken cancellationToken)

Removes an association for the specified firewall policy.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveAssociationAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveAssociationAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveRule(RemoveRuleFirewallPolicyRequest, CallSettings)

public virtual Operation<Operation, Operation> RemoveRule(RemoveRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Deletes a rule of the specified priority.

Parameters
NameDescription
requestRemoveRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
RemoveRuleFirewallPolicyRequest request = new RemoveRuleFirewallPolicyRequest
{
    RequestId = "",
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.RemoveRule(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceRemoveRule(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveRule(string, CallSettings)

public virtual Operation<Operation, Operation> RemoveRule(string firewallPolicy, CallSettings callSettings = null)

Deletes a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationOperationOperation

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = firewallPoliciesClient.RemoveRule(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = firewallPoliciesClient.PollOnceRemoveRule(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveRuleAsync(RemoveRuleFirewallPolicyRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> RemoveRuleAsync(RemoveRuleFirewallPolicyRequest request, CallSettings callSettings = null)

Deletes a rule of the specified priority.

Parameters
NameDescription
requestRemoveRuleFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
RemoveRuleFirewallPolicyRequest request = new RemoveRuleFirewallPolicyRequest
{
    RequestId = "",
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveRuleAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveRuleAsync(RemoveRuleFirewallPolicyRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> RemoveRuleAsync(RemoveRuleFirewallPolicyRequest request, CancellationToken cancellationToken)

Deletes a rule of the specified priority.

Parameters
NameDescription
requestRemoveRuleFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
RemoveRuleFirewallPolicyRequest request = new RemoveRuleFirewallPolicyRequest
{
    RequestId = "",
    Priority = 0,
    FirewallPolicy = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveRuleAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveRuleAsync(string, CallSettings)

public virtual Task<Operation<Operation, Operation>> RemoveRuleAsync(string firewallPolicy, CallSettings callSettings = null)

Deletes a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveRuleAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

RemoveRuleAsync(string, CancellationToken)

public virtual Task<Operation<Operation, Operation>> RemoveRuleAsync(string firewallPolicy, CancellationToken cancellationToken)

Deletes a rule of the specified priority.

Parameters
NameDescription
firewallPolicystring

Name of the firewall policy to update.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationOperationOperation

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string firewallPolicy = "";
// Make the request
lro::Operation<Operation, Operation> response = await firewallPoliciesClient.RemoveRuleAsync(firewallPolicy);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await firewallPoliciesClient.PollOnceRemoveRuleAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

SetIamPolicy(SetIamPolicyFirewallPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyFirewallPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
SetIamPolicyFirewallPolicyRequest request = new SetIamPolicyFirewallPolicyRequest
{
    GlobalOrganizationSetPolicyRequestResource = new GlobalOrganizationSetPolicyRequest(),
    Resource = "",
};
// Make the request
Policy response = firewallPoliciesClient.SetIamPolicy(request);

SetIamPolicy(string, GlobalOrganizationSetPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(string resource, GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

globalOrganizationSetPolicyRequestResourceGlobalOrganizationSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string resource = "";
GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource = new GlobalOrganizationSetPolicyRequest();
// Make the request
Policy response = firewallPoliciesClient.SetIamPolicy(resource, globalOrganizationSetPolicyRequestResource);

SetIamPolicyAsync(SetIamPolicyFirewallPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyFirewallPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyFirewallPolicyRequest request = new SetIamPolicyFirewallPolicyRequest
{
    GlobalOrganizationSetPolicyRequestResource = new GlobalOrganizationSetPolicyRequest(),
    Resource = "",
};
// Make the request
Policy response = await firewallPoliciesClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyFirewallPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyFirewallPolicyRequest request, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
requestSetIamPolicyFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyFirewallPolicyRequest request = new SetIamPolicyFirewallPolicyRequest
{
    GlobalOrganizationSetPolicyRequestResource = new GlobalOrganizationSetPolicyRequest(),
    Resource = "",
};
// Make the request
Policy response = await firewallPoliciesClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(string, GlobalOrganizationSetPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(string resource, GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

globalOrganizationSetPolicyRequestResourceGlobalOrganizationSetPolicyRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string resource = "";
GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource = new GlobalOrganizationSetPolicyRequest();
// Make the request
Policy response = await firewallPoliciesClient.SetIamPolicyAsync(resource, globalOrganizationSetPolicyRequestResource);

SetIamPolicyAsync(string, GlobalOrganizationSetPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(string resource, GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource, CancellationToken cancellationToken)

Sets the access control policy on the specified resource. Replaces any existing policy.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

globalOrganizationSetPolicyRequestResourceGlobalOrganizationSetPolicyRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string resource = "";
GlobalOrganizationSetPolicyRequest globalOrganizationSetPolicyRequestResource = new GlobalOrganizationSetPolicyRequest();
// Make the request
Policy response = await firewallPoliciesClient.SetIamPolicyAsync(resource, globalOrganizationSetPolicyRequestResource);

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
TypeDescription
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.

TestIamPermissions(TestIamPermissionsFirewallPolicyRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(TestIamPermissionsFirewallPolicyRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
TestIamPermissionsFirewallPolicyRequest request = new TestIamPermissionsFirewallPolicyRequest
{
    Resource = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = firewallPoliciesClient.TestIamPermissions(request);

TestIamPermissions(string, TestPermissionsRequest, CallSettings)

public virtual TestPermissionsResponse TestIamPermissions(string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestPermissionsResponse

The RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = FirewallPoliciesClient.Create();
// Initialize request argument(s)
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = firewallPoliciesClient.TestIamPermissions(resource, testPermissionsRequestResource);

TestIamPermissionsAsync(TestIamPermissionsFirewallPolicyRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsFirewallPolicyRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsFirewallPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsFirewallPolicyRequest request = new TestIamPermissionsFirewallPolicyRequest
{
    Resource = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await firewallPoliciesClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsFirewallPolicyRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsFirewallPolicyRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
requestTestIamPermissionsFirewallPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsFirewallPolicyRequest request = new TestIamPermissionsFirewallPolicyRequest
{
    Resource = "",
    TestPermissionsRequestResource = new TestPermissionsRequest(),
};
// Make the request
TestPermissionsResponse response = await firewallPoliciesClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(string, TestPermissionsRequest, CallSettings)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string resource, TestPermissionsRequest testPermissionsRequestResource, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await firewallPoliciesClient.TestIamPermissionsAsync(resource, testPermissionsRequestResource);

TestIamPermissionsAsync(string, TestPermissionsRequest, CancellationToken)

public virtual Task<TestPermissionsResponse> TestIamPermissionsAsync(string resource, TestPermissionsRequest testPermissionsRequestResource, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified resource.

Parameters
NameDescription
resourcestring

Name or id of the resource for this request.

testPermissionsRequestResourceTestPermissionsRequest

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestPermissionsResponse

A Task containing the RPC response.

Example
// Create client
FirewallPoliciesClient firewallPoliciesClient = await FirewallPoliciesClient.CreateAsync();
// Initialize request argument(s)
string resource = "";
TestPermissionsRequest testPermissionsRequestResource = new TestPermissionsRequest();
// Make the request
TestPermissionsResponse response = await firewallPoliciesClient.TestIamPermissionsAsync(resource, testPermissionsRequestResource);