access_levels
Creates, updates, deletes, gets or lists a access_levels
resource.
Overview
Name | access_levels |
Type | Resource |
Id | google.accesscontextmanager.access_levels |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name for the AccessLevel . Format: accessPolicies/{access_policy}/accessLevels/{access_level} . The access_level component must begin with a letter, followed by alphanumeric characters or _ . Its maximum length is 50 characters. After you create an AccessLevel , you cannot change its name . |
description | string | Description of the AccessLevel and its use. Does not affect behavior. |
basic | object | BasicLevel is an AccessLevel using a set of recommended features. |
custom | object | CustomLevel is an AccessLevel using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec |
title | string | Human readable title. Must be unique within the Policy. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accessLevelsId, accessPoliciesId | Gets an access level based on the resource name. |
list | SELECT | accessPoliciesId | Lists all access levels for an access policy. |
create | INSERT | accessPoliciesId | Creates an access level. The long-running operation from this RPC has a successful status after the access level propagates to long-lasting storage. If access levels contain errors, an error response is returned for the first error encountered. |
delete | DELETE | accessLevelsId, accessPoliciesId | Deletes an access level based on the resource name. The long-running operation from this RPC has a successful status after the access level has been removed from long-lasting storage. |
patch | UPDATE | accessLevelsId, accessPoliciesId | Updates an access level. The long-running operation from this RPC has a successful status after the changes to the access level propagate to long-lasting storage. If access levels contain errors, an error response is returned for the first error encountered. |
replace_all | REPLACE | accessPoliciesId | Replaces all existing access levels in an access policy with the access levels provided. This is done atomically. The long-running operation from this RPC has a successful status after all replacements propagate to long-lasting storage. If the replacement contains errors, an error response is returned for the first error encountered. Upon error, the replacement is cancelled, and existing access levels are not affected. The Operation.response field contains ReplaceAccessLevelsResponse. Removing access levels contained in existing service perimeters result in an error. |
SELECT
examples
Lists all access levels for an access policy.
SELECT
name,
description,
basic,
custom,
title
FROM google.accesscontextmanager.access_levels
WHERE accessPoliciesId = '{{ accessPoliciesId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new access_levels
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.accesscontextmanager.access_levels (
accessPoliciesId,
name,
title,
description,
basic,
custom
)
SELECT
'{{ accessPoliciesId }}',
'{{ name }}',
'{{ title }}',
'{{ description }}',
'{{ basic }}',
'{{ custom }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: title
value: string
- name: description
value: string
- name: basic
value:
- name: conditions
value:
- - name: ipSubnetworks
value:
- string
- name: devicePolicy
value:
- name: requireScreenlock
value: boolean
- name: allowedEncryptionStatuses
value:
- string
- name: osConstraints
value:
- - name: osType
value: string
- name: minimumVersion
value: string
- name: requireVerifiedChromeOs
value: boolean
- name: allowedDeviceManagementLevels
value:
- string
- name: requireAdminApproval
value: boolean
- name: requireCorpOwned
value: boolean
- name: requiredAccessLevels
value:
- string
- name: negate
value: boolean
- name: members
value:
- string
- name: regions
value:
- string
- name: vpcNetworkSources
value:
- - name: vpcSubnetwork
value:
- name: network
value: string
- name: vpcIpSubnetworks
value:
- string
- name: combiningFunction
value: string
- name: custom
value:
- name: expr
value:
- name: expression
value: string
- name: title
value: string
- name: description
value: string
- name: location
value: string
UPDATE
example
Updates a access_levels
resource.
/*+ update */
UPDATE google.accesscontextmanager.access_levels
SET
name = '{{ name }}',
title = '{{ title }}',
description = '{{ description }}',
basic = '{{ basic }}',
custom = '{{ custom }}'
WHERE
accessLevelsId = '{{ accessLevelsId }}'
AND accessPoliciesId = '{{ accessPoliciesId }}';
REPLACE
example
Replaces all fields in the specified access_levels
resource.
/*+ update */
REPLACE google.accesscontextmanager.access_levels
SET
accessLevels = '{{ accessLevels }}',
etag = '{{ etag }}'
WHERE
accessPoliciesId = '{{ accessPoliciesId }}';
DELETE
example
Deletes the specified access_levels
resource.
/*+ delete */
DELETE FROM google.accesscontextmanager.access_levels
WHERE accessLevelsId = '{{ accessLevelsId }}'
AND accessPoliciesId = '{{ accessPoliciesId }}';