gcloud alpha software-delivery-trust policy-bindings create

INFORMATION
gcloud alpha software-delivery-trust policy-bindings create is not available in universe domain universe.
NAME
gcloud alpha software-delivery-trust policy-bindings create - create a Software Delivery Trust policy binding
SYNOPSIS
gcloud alpha software-delivery-trust policy-bindings create POLICY_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 project attribute:

  • provide the argument policy_binding on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

To set the location attribute:

  • provide the argument policy_binding on the command line with a fully specified name;
  • provide the argument --location on the command line.

This must be specified.

POLICY_BINDING
ID of the policyBinding or fully qualified identifier for the policyBinding.

To set the policy_binding attribute:

  • provide the argument policy_binding on the command line.
REQUIRED FLAGS
--enforcement-mode=ENFORCEMENT_MODE
How the policy is enforced. ENFORCEMENT_MODE must 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 project attribute:

  • provide the argument --policy-revision on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

To set the location attribute:

  • provide the argument --policy-revision on the command line with a fully specified name;
  • provide the argument --location on the command line.

To set the policy attribute:

  • provide the argument --policy-revision on the command line with a fully specified name;
  • provide the argument --policy on the command line.
--policy-revision=POLICY_REVISION
ID of the revision or fully qualified identifier for the revision.

To set the revision attribute:

  • provide the argument --policy-revision on the command line.
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 help for details.

API REFERENCE
This command uses the softwaredeliverytrust/v1alpha API. 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.