Skip to main content

psc_authorization_policies

Creates, updates, deletes, gets or lists a psc_authorization_policies resource.

Overview

Namepsc_authorization_policies
TypeResource
Idgoogle.networkconnectivity.psc_authorization_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The name of the PscAuthorizationPolicy. Format: projects/{project}/locations/{location}/pscAuthorizationPolicies/{psc_authorization_policy}
authorizationModestringRequired. The authorization mode. (AUTHORIZATION_MODE_UNSPECIFIED, AUTHORIZATION_MODE_TRANSITIVE_TO_SERVICE_ATTACHMENT)
authorizedClientResourcesarrayRequired. 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).
createTimestring (google-datetime)Output only. The time when the PscAuthorizationPolicy was created.
descriptionstringOptional. A description of this resource.
etagstringOutput only. The etag of the PscAuthorizationPolicy.
labelsobjectOptional. User-defined labels.
targetResourceUristringRequired. 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}
uidstringOutput only. The unique identifier of the PscAuthorizationPolicy.
updateTimestring (google-datetime)Output only. The time when the PscAuthorizationPolicy was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, pscAuthorizationPoliciesIdGets details of a single PscAuthorizationPolicy.
listselectprojectsId, locationsIdorderBy, pageSize, pageToken, filterLists PscAuthorizationPolicies in a given project and location.
createinsertprojectsId, locationsIdrequestId, pscAuthorizationPolicyIdCreates a new PscAuthorizationPolicy in a given project and location.
deletedeleteprojectsId, locationsId, pscAuthorizationPoliciesIdrequestId, etagDeletes 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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
pscAuthorizationPoliciesIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
pscAuthorizationPolicyIdstring
requestIdstring

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

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 }}'
;