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
Successful response
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] The firewall policy ID of the association. |
shortName | string | [Output Only] The short name of the firewall policy of the association. |
Successful response
Name | Datatype | Description |
---|---|---|
associations | array | A list of associations. |
kind | string | [Output Only] Type of firewallPolicy associations. Always compute#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 | project , region , firewallPolicy | name | Gets an association with the specified name. |
list_associations | select | targetResource | Lists associations of a specified target, i.e., organization or folder. | |
add_association | insert | project , region , firewallPolicy | replaceExistingAssociation , requestId | Inserts an association for the specified network firewall policy. |
remove_association | delete | project , region , firewallPolicy | name , requestId | Removes an association for the specified network 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 | |
project | string | |
region | string | |
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 project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND 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 }}';
INSERT
examples
- add_association
- Manifest
Inserts an association for the specified network firewall policy.
INSERT INTO google.compute.firewall_policies_associations (
data__name,
data__attachmentTarget,
data__firewallPolicyId,
data__shortName,
data__displayName,
project,
region,
firewallPolicy,
replaceExistingAssociation,
requestId
)
SELECT
'{{ name }}',
'{{ attachmentTarget }}',
'{{ firewallPolicyId }}',
'{{ shortName }}',
'{{ displayName }}',
'{{ project }}',
'{{ region }}',
'{{ firewallPolicy }}',
'{{ replaceExistingAssociation }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
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: project
value: string
description: Required parameter for the firewall_policies_associations resource.
- name: region
value: string
description: Required parameter for the firewall_policies_associations resource.
- name: firewallPolicy
value: string
description: Required parameter for the firewall_policies_associations resource.
- name: name
value: string
description: >
The name for an association.
- name: attachmentTarget
value: string
description: >
The target that the firewall policy is attached to.
- name: firewallPolicyId
value: string
description: >
[Output Only] The firewall policy ID of the association.
- name: shortName
value: string
description: >
[Output Only] The short name of the firewall policy of the association.
- name: displayName
value: string
description: >
[Output Only] Deprecated, please use short name instead. The display name of the firewall policy of the association.
- name: replaceExistingAssociation
value: boolean
- name: requestId
value: string
DELETE
examples
- remove_association
Removes an association for the specified network firewall policy.
DELETE FROM google.compute.firewall_policies_associations
WHERE project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND firewallPolicy = '{{ firewallPolicy }}' --required
AND name = '{{ name }}'
AND requestId = '{{ requestId }}';