v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1363121226.6 KB
projects

Creates a new AuthzPolicy in a given project and location.

post/v1/{+parent}/authzPolicies

Path parameters

parentstring required

Required. The parent resource of the AuthzPolicy resource. Must be in the format projects/{project}/locations/{location}.

Query parameters

authzPolicyIdstring

Required. User-provided ID of the AuthzPolicy resource to be created.

requestIdstring

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Request body

createTimestring google-datetime

Output only. The timestamp when the resource was created.

descriptionstring

Optional. A human-readable description of the resource.

labelsobject

Optional. Set of labels associated with the AuthzPolicy resource. The format must comply with the following requirements.

namestring

Required. Identifier. Name of the AuthzPolicy resource in the following format: projects/{project}/locations/{location}/authzPolicies/{authz_policy}.

action'AUTHZ_ACTION_UNSPECIFIED' | 'ALLOW' | 'DENY' | 'CUSTOM'

Required. Can be one of ALLOW, DENY, CUSTOM. When the action is CUSTOM, customProvider must be specified. When the action is ALLOW, only requests matching the policy will be allowed. When the action is DENY, only requests matching the policy will be denied. When a request arrives, the policies are evaluated in the following order: 1. If there is a CUSTOM policy that matches the request, the CUSTOM policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request. 2. If there are any DENY policies that match the request, the request is denied. 3. If there are no ALLOW policies for the resource or if any of the ALLOW policies match the request, the request is allowed. 4. Else the request is denied by default if none of the configured AuthzPolicies with ALLOW action match the request.

policyProfile'POLICY_PROFILE_UNSPECIFIED' | 'REQUEST_AUTHZ' | 'CONTENT_AUTHZ'

Optional. Immutable. Defines the type of authorization being performed. If not specified, REQUEST_AUTHZ is applied. This field cannot be changed once AuthzPolicy is created.

updateTimestring google-datetime

Output only. The timestamp when the resource was updated.

Response

Successful response