- INFORMATION
-
gcloud alpha software-delivery-trust policy-bindings createis not available in universe domainuniverse. - NAME
-
- gcloud alpha software-delivery-trust policy-bindings create - create a Software Delivery Trust policy binding
- SYNOPSIS
-
-
gcloud alpha software-delivery-trust policy-bindings createPOLICY_BINDING--enforcement-mode=ENFORCEMENT_MODE--resource-selectors=[matchPattern=MATCHPATTERN],[path=PATH] [--async] [--location=LOCATION] [--policy=POLICY] [--policy-revision=POLICY_REVISION] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
(ALPHA)Bind a policy to target deployment resources with an enforcement mode (e.g. DRY_RUN or DENY). - EXAMPLES
-
To create policy binding 'prod-gke-binding' linking policy 'require-slsa-build'
to a GKE cluster in location 'us-central1', run:
gcloud alpha software-delivery-trust policy-bindings create prod-gke-binding --location=us-central1 --policy=projects/my-project/locations/us-central1/policies/require-slsa-build --enforcement-mode=DENY --resource-selectors="path=//container.googleapis.com/projects/my-project/locations/us-central1/clusters/prod-cluster,matchPattern=EXACT" - POSITIONAL ARGUMENTS
-
-
PolicyBinding resource - Identifier. Unique resource name of the binding.
Example:
"projects/123456789/locations/global/policyBindings/prod-cluster-binding". This
represents a Cloud resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.
To set the
projectattribute:-
provide the argument
policy_bindingon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
To set the
locationattribute:-
provide the argument
policy_bindingon the command line with a fully specified name; -
provide the argument
--locationon the command line.
This must be specified.
POLICY_BINDING-
ID of the policyBinding or fully qualified identifier for the policyBinding.
To set the
policy_bindingattribute:-
provide the argument
policy_bindingon the command line.
-
provide the argument
-
provide the argument
-
PolicyBinding resource - Identifier. Unique resource name of the binding.
Example:
"projects/123456789/locations/global/policyBindings/prod-cluster-binding". This
represents a Cloud resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.
- REQUIRED FLAGS
-
--enforcement-mode=ENFORCEMENT_MODE-
How the policy is enforced.
ENFORCEMENT_MODEmust be one of:enforcement-mode-deny- Actively block non-compliant operations.
enforcement-mode-dry-run- Log violations but do not block operations.
--resource-selectors=[matchPattern=MATCHPATTERN],[path=PATH]-
Required, Target resources this binding applies to.
matchPattern- Enforced match pattern type.
path- Full resource path string to match. Supported patterns must match one of the following API surfaces in MVP: 1. GKE Clusters: "//container.googleapis.com/projects/{project}/locations/{location}/clusters/{cluster}" 2. Cloud Run Services: "//run.googleapis.com/projects/{project}/locations/{location}/services/{service}" 3. Skill Registry: "//aiplatform.googleapis.com/projects/{project}/locations/{location}/skills/{skill}".
Shorthand Example:--resource-selectors=matchPattern=string,path=string --resource-selectors=matchPattern=string,path=string
JSON Example:--resource-selectors='[{"matchPattern": "string", "path": "string"}]'
File Example:--resource-selectors=path_to_file.(yaml|json)
- OPTIONAL FLAGS
-
--async- Return immediately, without waiting for the operation in progress to complete.
--location=LOCATION- For resources [policy, policy-revision, policy_binding], provides fallback value for resource location attribute. When the resource's full URI path is not provided, location will fallback to this flag value.
--policy=POLICY- For resources [policy, policy-revision], provides fallback value for resource policy attribute. When the resource's full URI path is not provided, policy will fallback to this flag value.
- Arguments for the policy reference.
-
Revision resource - Reference to a specific pinned PolicyRevision. Example:
"projects/my-project/locations/us-central1/policies/deny-critical-vulns/revisions/a1b2c3d4"
This represents a Cloud resource. (NOTE) Some attributes are not given arguments
in this group but can be set in other ways.
To set the
projectattribute:-
provide the argument
--policy-revisionon the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
To set the
locationattribute:-
provide the argument
--policy-revisionon the command line with a fully specified name; -
provide the argument
--locationon the command line.
To set the
policyattribute:-
provide the argument
--policy-revisionon the command line with a fully specified name; -
provide the argument
--policyon the command line.
-
provide the argument
--policy-revision=POLICY_REVISION-
ID of the revision or fully qualified identifier for the revision.
To set the
revisionattribute:-
provide the argument
--policy-revisionon the command line.
-
provide the argument
- GCLOUD WIDE FLAGS
-
These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$ gcloud helpfor details. - API REFERENCE
-
This command uses the
softwaredeliverytrust/v1alphaAPI. The full documentation for this API can be found at: https://cloud.google.com/ - NOTES
- This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.
gcloud alpha software-delivery-trust policy-bindings create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-09-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-09-01 UTC."],[],[]]