firewall_policies_associations
Creates, updates, deletes, gets or lists a firewall_policies_associations resource.
Overview
| Name | firewall_policies_associations |
| Type | Resource |
| Id | google.compute.firewall_policies_associations |
Fields
The following fields are returned by SELECT queries:
- get_association
- list_associations
| Name | Datatype | Description |
|---|---|---|
name | string | The name for an association. |
attachmentTarget | string | The target that the firewall policy is attached to. |
displayName | string | [Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association. |
firewallPolicyId | string | Output only. [Output Only] The firewall policy ID of the association. |
shortName | string | Output only. [Output Only] The short name of the firewall policy of the association. |
| Name | Datatype | Description |
|---|---|---|
associations | array | A list of associations. |
kind | string | Output only. [Output Only] Type of firewallPolicy associations. Alwayscompute#FirewallPoliciesListAssociations for lists of firewallPolicy associations. (default: compute#firewallPoliciesListAssociationsResponse) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_association | select | firewallPolicy | name | Gets an association with the specified name. |
list_associations | select | targetResource, includeInheritedPolicies | Lists associations of a specified target, i.e., organization or folder. | |
add_association | insert | firewallPolicy | replaceExistingAssociation, requestId | Inserts an association for the specified firewall policy. |
remove_association | delete | firewallPolicy | name, requestId | Removes an association for the specified firewall policy. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
firewallPolicy | string | |
includeInheritedPolicies | boolean | |
name | string | |
replaceExistingAssociation | boolean | |
requestId | string | |
targetResource | string |
SELECT examples
- get_association
- list_associations
Gets an association with the specified name.
SELECT
name,
attachmentTarget,
displayName,
firewallPolicyId,
shortName
FROM google.compute.firewall_policies_associations
WHERE firewallPolicy = '{{ firewallPolicy }}' -- required
AND name = '{{ name }}'
;
Lists associations of a specified target, i.e., organization or folder.
SELECT
associations,
kind
FROM google.compute.firewall_policies_associations
WHERE targetResource = '{{ targetResource }}'
AND includeInheritedPolicies = '{{ includeInheritedPolicies }}'
;
INSERT examples
- add_association
- Manifest
Inserts an association for the specified firewall policy.
INSERT INTO google.compute.firewall_policies_associations (
data__name,
data__displayName,
data__attachmentTarget,
firewallPolicy,
replaceExistingAssociation,
requestId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ attachmentTarget }}',
'{{ firewallPolicy }}',
'{{ replaceExistingAssociation }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;
# Description fields are for documentation purposes
- name: firewall_policies_associations
props:
- name: firewallPolicy
value: "{{ firewallPolicy }}"
description: Required parameter for the firewall_policies_associations resource.
- name: name
value: "{{ name }}"
description: |
The name for an association.
- name: displayName
value: "{{ displayName }}"
description: |
[Output Only] Deprecated, please use short name instead. The display name
of the firewall policy of the association.
- name: attachmentTarget
value: "{{ attachmentTarget }}"
description: |
The target that the firewall policy is attached to.
- name: replaceExistingAssociation
value: {{ replaceExistingAssociation }}
- name: requestId
value: "{{ requestId }}"
DELETE examples
- remove_association
Removes an association for the specified firewall policy.
DELETE FROM google.compute.firewall_policies_associations
WHERE firewallPolicy = '{{ firewallPolicy }}' --required
AND name = '{{ name }}'
AND requestId = '{{ requestId }}'
;