gcloud container binauthz policy import - import a Binary Authorization policy to the current project
gcloud container binauthz policy import POLICY_FILE [--strict-validation] [GCLOUD_WIDE_FLAG ...]
This command accepts a description of the desired policy in the form of a YAML-formatted file. A representation of the current policy can be retrieved using the $ gcloud container binauthz policy export command. One method of modifying the policy is to run $ gcloud container binauthz policy export, dump the contents to a file, modify the policy file to reflect the desired new policy, and provide this modified file to $ gcloud container binauthz policy import.
To update the current project's policy:
$ gcloud container binauthz policy export > my_policy.yaml
$ edit my_policy.yaml
$ gcloud container binauthz policy import my_policy.yaml
- POLICY_FILE
The file containing the YAML-formatted policy description.
- --strict-validation
Whether to perform additional checks on the validity of policy contents.
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.
These variants are also available:
$ gcloud alpha container binauthz policy import
$ gcloud beta container binauthz policy import