Class SecurityPoliciesResource
The "securityPolicies" collection of methods.
Inherited Members
Namespace: Google.Apis.Compute.v1
Assembly: Google.Apis.Compute.v1.dll
Syntax
public class SecurityPoliciesResource
Constructors
SecurityPoliciesResource(IClientService)
Constructs a new resource.
Declaration
public SecurityPoliciesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
AddRule(SecurityPolicyRule, string, string)
Inserts a rule into a security policy.
Declaration
public virtual SecurityPoliciesResource.AddRuleRequest AddRule(SecurityPolicyRule body, string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
SecurityPolicyRule | body | The body of the request. |
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to update. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.AddRuleRequest |
AggregatedList(string)
Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.
To prevent failure, Google recommends that you set the returnPartialSuccess
parameter to true
.
Declaration
public virtual SecurityPoliciesResource.AggregatedListRequest AggregatedList(string project)
Parameters
Type | Name | Description |
---|---|---|
string | project | Name of the project scoping this request. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.AggregatedListRequest |
Delete(string, string)
Deletes the specified policy.
Declaration
public virtual SecurityPoliciesResource.DeleteRequest Delete(string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to delete. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.DeleteRequest |
Get(string, string)
List all of the ordered rules present in a single specified policy.
Declaration
public virtual SecurityPoliciesResource.GetRequest Get(string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to get. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.GetRequest |
GetRule(string, string)
Gets a rule at the specified priority.
Declaration
public virtual SecurityPoliciesResource.GetRuleRequest GetRule(string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to which the queried rule belongs. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.GetRuleRequest |
Insert(SecurityPolicy, string)
Creates a new policy in the specified project using the data included in the request.
Declaration
public virtual SecurityPoliciesResource.InsertRequest Insert(SecurityPolicy body, string project)
Parameters
Type | Name | Description |
---|---|---|
SecurityPolicy | body | The body of the request. |
string | project | Project ID for this request. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.InsertRequest |
List(string)
List all the policies that have been configured for the specified project.
Declaration
public virtual SecurityPoliciesResource.ListRequest List(string project)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.ListRequest |
ListPreconfiguredExpressionSets(string)
Gets the current list of preconfigured Web Application Firewall (WAF) expressions.
Declaration
public virtual SecurityPoliciesResource.ListPreconfiguredExpressionSetsRequest ListPreconfiguredExpressionSets(string project)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.ListPreconfiguredExpressionSetsRequest |
Patch(SecurityPolicy, string, string)
Patches the specified policy with the data included in the request. To clear fields in the policy, leave the fields empty and specify them in the updateMask. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.
Declaration
public virtual SecurityPoliciesResource.PatchRequest Patch(SecurityPolicy body, string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
SecurityPolicy | body | The body of the request. |
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to update. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.PatchRequest |
PatchRule(SecurityPolicyRule, string, string)
Patches a rule at the specified priority. To clear fields in the rule, leave the fields empty and specify them in the updateMask.
Declaration
public virtual SecurityPoliciesResource.PatchRuleRequest PatchRule(SecurityPolicyRule body, string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
SecurityPolicyRule | body | The body of the request. |
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to update. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.PatchRuleRequest |
RemoveRule(string, string)
Deletes a rule at the specified priority.
Declaration
public virtual SecurityPoliciesResource.RemoveRuleRequest RemoveRule(string project, string securityPolicy)
Parameters
Type | Name | Description |
---|---|---|
string | project | Project ID for this request. |
string | securityPolicy | Name of the security policy to update. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.RemoveRuleRequest |
SetLabels(GlobalSetLabelsRequest, string, string)
Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.
Declaration
public virtual SecurityPoliciesResource.SetLabelsRequest SetLabels(GlobalSetLabelsRequest body, string project, string resource)
Parameters
Type | Name | Description |
---|---|---|
GlobalSetLabelsRequest | body | The body of the request. |
string | project | Project ID for this request. |
string | resource | Name or id of the resource for this request. |
Returns
Type | Description |
---|---|
SecurityPoliciesResource.SetLabelsRequest |