rules
Creates, updates, deletes, gets or lists a rules
resource.
Overview
Name | rules |
Type | Resource |
Id | google.networksecurity.rules |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^a-z?$). |
description | string | Optional. Free-text description of the resource. |
applicationMatcher | string | Optional. CEL expression for matching on L7/application level criteria. |
basicProfile | string | Required. Profile which tells what the primitive action should be. |
createTime | string | Output only. Time when the rule was created. |
enabled | boolean | Required. Whether the rule is enforced. |
priority | integer | Required. Priority of the rule. Lower number corresponds to higher precedence. |
sessionMatcher | string | Required. CEL expression for matching on session criteria. |
tlsInspectionEnabled | boolean | Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig. |
updateTime | string | Output only. Time when the rule was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_gateway_security_policies_rules_get | SELECT | gatewaySecurityPoliciesId, locationsId, projectsId, rulesId | Gets details of a single GatewaySecurityPolicyRule. |
projects_locations_gateway_security_policies_rules_list | SELECT | gatewaySecurityPoliciesId, locationsId, projectsId | Lists GatewaySecurityPolicyRules in a given project and location. |
projects_locations_gateway_security_policies_rules_create | INSERT | gatewaySecurityPoliciesId, locationsId, projectsId | Creates a new GatewaySecurityPolicy in a given project and location. |
projects_locations_gateway_security_policies_rules_delete | DELETE | gatewaySecurityPoliciesId, locationsId, projectsId, rulesId | Deletes a single GatewaySecurityPolicyRule. |
projects_locations_gateway_security_policies_rules_patch | UPDATE | gatewaySecurityPoliciesId, locationsId, projectsId, rulesId | Updates the parameters of a single GatewaySecurityPolicyRule. |
SELECT
examples
Lists GatewaySecurityPolicyRules in a given project and location.
SELECT
name,
description,
applicationMatcher,
basicProfile,
createTime,
enabled,
priority,
sessionMatcher,
tlsInspectionEnabled,
updateTime
FROM google.networksecurity.rules
WHERE gatewaySecurityPoliciesId = '{{ gatewaySecurityPoliciesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new rules
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.networksecurity.rules (
gatewaySecurityPoliciesId,
locationsId,
projectsId,
basicProfile,
name,
enabled,
priority,
description,
sessionMatcher,
applicationMatcher,
tlsInspectionEnabled
)
SELECT
'{{ gatewaySecurityPoliciesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ basicProfile }}',
'{{ name }}',
{{ enabled }},
'{{ priority }}',
'{{ description }}',
'{{ sessionMatcher }}',
'{{ applicationMatcher }}',
{{ tlsInspectionEnabled }}
;
- name: your_resource_model_name
props:
- name: basicProfile
value: string
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: enabled
value: boolean
- name: priority
value: integer
- name: description
value: string
- name: sessionMatcher
value: string
- name: applicationMatcher
value: string
- name: tlsInspectionEnabled
value: boolean
UPDATE
example
Updates a rules
resource.
/*+ update */
UPDATE google.networksecurity.rules
SET
basicProfile = '{{ basicProfile }}',
name = '{{ name }}',
enabled = true|false,
priority = '{{ priority }}',
description = '{{ description }}',
sessionMatcher = '{{ sessionMatcher }}',
applicationMatcher = '{{ applicationMatcher }}',
tlsInspectionEnabled = true|false
WHERE
gatewaySecurityPoliciesId = '{{ gatewaySecurityPoliciesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND rulesId = '{{ rulesId }}';
DELETE
example
Deletes the specified rules
resource.
/*+ delete */
DELETE FROM google.networksecurity.rules
WHERE gatewaySecurityPoliciesId = '{{ gatewaySecurityPoliciesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND rulesId = '{{ rulesId }}';