psc_authorization_policies
Creates, updates, deletes, gets or lists a psc_authorization_policies resource.
Overview
| Name | psc_authorization_policies |
| Type | Resource |
| Id | google.networkconnectivity.psc_authorization_policies |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the PscAuthorizationPolicy. Format: projects/{project}/locations/{location}/pscAuthorizationPolicies/{psc_authorization_policy} |
authorizationMode | string | Required. The authorization mode. (AUTHORIZATION_MODE_UNSPECIFIED, AUTHORIZATION_MODE_TRANSITIVE_TO_SERVICE_ATTACHMENT) |
authorizedClientResources | array | Required. List of authorized consumer resources allowed to connect. Supported values are: 1. Project resource name (e.g., projects/{project_id}) 2. Wildcard "*" (grants global ingress authorization to the target). |
createTime | string (google-datetime) | Output only. The time when the PscAuthorizationPolicy was created. |
description | string | Optional. A description of this resource. |
etag | string | Output only. The etag of the PscAuthorizationPolicy. |
labels | object | Optional. User-defined labels. |
targetResourceUri | string | Required. The full absolute URI of the targeted resource governed by this policy. For example, for an AgentRegistry resource, the format is: //agentregistry.googleapis.com/projects/{project}/locations/{location} |
uid | string | Output only. The unique identifier of the PscAuthorizationPolicy. |
updateTime | string (google-datetime) | Output only. The time when the PscAuthorizationPolicy was updated. |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. The name of the PscAuthorizationPolicy. Format: projects/{project}/locations/{location}/pscAuthorizationPolicies/{psc_authorization_policy} |
authorizationMode | string | Required. The authorization mode. (AUTHORIZATION_MODE_UNSPECIFIED, AUTHORIZATION_MODE_TRANSITIVE_TO_SERVICE_ATTACHMENT) |
authorizedClientResources | array | Required. List of authorized consumer resources allowed to connect. Supported values are: 1. Project resource name (e.g., projects/{project_id}) 2. Wildcard "*" (grants global ingress authorization to the target). |
createTime | string (google-datetime) | Output only. The time when the PscAuthorizationPolicy was created. |
description | string | Optional. A description of this resource. |
etag | string | Output only. The etag of the PscAuthorizationPolicy. |
labels | object | Optional. User-defined labels. |
targetResourceUri | string | Required. The full absolute URI of the targeted resource governed by this policy. For example, for an AgentRegistry resource, the format is: //agentregistry.googleapis.com/projects/{project}/locations/{location} |
uid | string | Output only. The unique identifier of the PscAuthorizationPolicy. |
updateTime | string (google-datetime) | Output only. The time when the PscAuthorizationPolicy was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, pscAuthorizationPoliciesId | Gets details of a single PscAuthorizationPolicy. | |
list | select | projectsId, locationsId | orderBy, pageSize, pageToken, filter | Lists PscAuthorizationPolicies in a given project and location. |
create | insert | projectsId, locationsId | requestId, pscAuthorizationPolicyId | Creates a new PscAuthorizationPolicy in a given project and location. |
delete | delete | projectsId, locationsId, pscAuthorizationPoliciesId | requestId, etag | Deletes a single PscAuthorizationPolicy. |
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 |
|---|---|---|
locationsId | string | |
projectsId | string | |
pscAuthorizationPoliciesId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
pscAuthorizationPolicyId | string | |
requestId | string |
SELECT examples
- get
- list
Gets details of a single PscAuthorizationPolicy.
SELECT
name,
authorizationMode,
authorizedClientResources,
createTime,
description,
etag,
labels,
targetResourceUri,
uid,
updateTime
FROM google.networkconnectivity.psc_authorization_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pscAuthorizationPoliciesId = '{{ pscAuthorizationPoliciesId }}' -- required
;
Lists PscAuthorizationPolicies in a given project and location.
SELECT
name,
authorizationMode,
authorizedClientResources,
createTime,
description,
etag,
labels,
targetResourceUri,
uid,
updateTime
FROM google.networkconnectivity.psc_authorization_policies
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new PscAuthorizationPolicy in a given project and location.
INSERT INTO google.networkconnectivity.psc_authorization_policies (
data__targetResourceUri,
data__authorizedClientResources,
data__labels,
data__etag,
data__name,
data__authorizationMode,
data__description,
projectsId,
locationsId,
requestId,
pscAuthorizationPolicyId
)
SELECT
'{{ targetResourceUri }}',
'{{ authorizedClientResources }}',
'{{ labels }}',
'{{ etag }}',
'{{ name }}',
'{{ authorizationMode }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ requestId }}',
'{{ pscAuthorizationPolicyId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: psc_authorization_policies
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the psc_authorization_policies resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the psc_authorization_policies resource.
- name: targetResourceUri
value: "{{ targetResourceUri }}"
description: |
Required. The full absolute URI of the targeted resource governed by this policy. For example, for an AgentRegistry resource, the format is: `//agentregistry.googleapis.com/projects/{project}/locations/{location}`
- name: authorizedClientResources
value:
- "{{ authorizedClientResources }}"
description: |
Required. List of authorized consumer resources allowed to connect. Supported values are: 1. Project resource name (e.g., `projects/{project_id}`) 2. Wildcard `"*"` (grants global ingress authorization to the target).
- name: labels
value: "{{ labels }}"
description: |
Optional. User-defined labels.
- name: etag
value: "{{ etag }}"
description: |
Output only. The etag of the PscAuthorizationPolicy.
- name: name
value: "{{ name }}"
description: |
Identifier. The name of the PscAuthorizationPolicy. Format: projects/{project}/locations/{location}/pscAuthorizationPolicies/{psc_authorization_policy}
- name: authorizationMode
value: "{{ authorizationMode }}"
description: |
Required. The authorization mode.
valid_values: ['AUTHORIZATION_MODE_UNSPECIFIED', 'AUTHORIZATION_MODE_TRANSITIVE_TO_SERVICE_ATTACHMENT']
- name: description
value: "{{ description }}"
description: |
Optional. A description of this resource.
- name: requestId
value: "{{ requestId }}"
- name: pscAuthorizationPolicyId
value: "{{ pscAuthorizationPolicyId }}"
DELETE examples
- delete
Deletes a single PscAuthorizationPolicy.
DELETE FROM google.networkconnectivity.psc_authorization_policies
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND pscAuthorizationPoliciesId = '{{ pscAuthorizationPoliciesId }}' --required
AND requestId = '{{ requestId }}'
AND etag = '{{ etag }}'
;