Skip to main content

@swamp/gcp/orgpolicy

v2026.04.04.1

Google Cloud orgpolicy infrastructure models

Labels

gcpgoogle-cloudorgpolicycloudinfrastructure

Contents

Install

$ swamp extension pull @swamp/gcp/orgpolicy

Release Notes

  • Updated: policies

@swamp/gcp/orgpolicy/constraintsv2026.04.03.3constraints.ts

Global Arguments

ArgumentTypeDescription
namestringInstance name for this resource (used as the unique identifier in the factory pattern)
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
getGet a constraints
ArgumentTypeDescription
identifierstringThe name of the constraints
syncSync constraints state from GCP

Resources

state(infinite)— A constraint describes a way to restrict a resource's configuration. For exam...
@swamp/gcp/orgpolicy/customconstraintsv2026.04.03.3customconstraints.ts

Global Arguments

ArgumentTypeDescription
actionType?enumAllow or deny type.
condition?stringA Common Expression Language (CEL) condition which is used in the evaluation of the constraint. For example: `resource.instanceName.matches("(production|test)_(.+_)?[\\d]+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
description?stringDetailed information about this custom policy constraint. The max length of the description is 2000 characters.
displayName?stringOne line display name for the UI. The max length of the display_name is 200 characters.
methodTypes?arrayAll the operations being applied for this constraint.
name?stringImmutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 71 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/custom.` is not counted.
resourceTypes?arrayImmutable. The resource instance type on which this policy applies. Format will be of the form: `/` Example: * `compute.googleapis.com/Instance`.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a customConstraints
getGet a customConstraints
ArgumentTypeDescription
identifierstringThe name of the customConstraints
updateUpdate customConstraints attributes
deleteDelete the customConstraints
ArgumentTypeDescription
identifierstringThe name of the customConstraints
syncSync customConstraints state from GCP

Resources

state(infinite)— A custom constraint defined by customers which can *only* be applied to the g...
@swamp/gcp/orgpolicy/policiesv2026.04.04.1policies.ts

Global Arguments

ArgumentTypeDescription
alternate?objectSimilar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run.
dryRunSpec?objectDefines a Google Cloud policy specification that is used to specify constraints for configurations of Google Cloud resources.
name?stringImmutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint that this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requ
spec?objectDefines a Google Cloud policy specification that is used to specify constraints for configurations of Google Cloud resources.
parent?stringThe parent resource name (e.g., projects/my-project/locations/us-central1, organizations/123, folders/456)
createCreate a policies
getGet a policies
ArgumentTypeDescription
identifierstringThe name of the policies
updateUpdate policies attributes
deleteDelete the policies
ArgumentTypeDescription
identifierstringThe name of the policies
syncSync policies state from GCP
get_effective_policyget effective policy

Resources

state(infinite)— Defines an organization policy that is used to specify constraints for config...