gcloud compute os-config policy-orchestrators create

NAME
gcloud compute os-config policy-orchestrators create - create a policy orchestrator
SYNOPSIS
gcloud compute os-config policy-orchestrators create(POLICY_ORCHESTRATOR :--folder=FOLDER--organization=ORGANIZATION)--policy-type=POLICY_TYPE[--action=ACTION; default="upsert"][--async][--include-folders=INCLUDE_FOLDERS][--include-locations=INCLUDE_LOCATIONS][--include-projects=INCLUDE_PROJECTS][--policy-file=POLICY_FILE][--policy-id=POLICY_ID][--state=STATE; default="ACTIVE"][GCLOUD_WIDE_FLAG]
DESCRIPTION
Create a policy orchestrator.
EXAMPLES

To create a policy orchestratormy-orchestrator in folder123456 for OS policy assignment with config file/path/to/file/config.yaml, run:

gcloudcomputeos-configpolicy-orchestratorscreatemy-orchestrator--folder=123456--policy-typeos_policy_assignment_v1--policy-file=/path/to/file/config.yaml

To create a policy orchestratormy-orchestrator in folder123456 that deletes OS Policy assignments with idmy-policy, run:

gcloudcomputeos-configpolicy-orchestratorscreatemy-orchestrator--folder=123456--policy-typeos_policy_assignment_v1--actiondelete--policy-idmy-policy
POSITIONAL ARGUMENTS
Policy orchestrator resource - Policy orchestrator to create. The arguments inthis group can be used to specify the attributes of this resource. (NOTE) Someattributes are not given arguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentpolicy_orchestrator on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project. This resource can be one of thefollowing types: [policy_orchestrator_project, policy_orchestrator_folder,policy_orchestrator_organization].

This must be specified.

POLICY_ORCHESTRATOR
ID of the policy_orchestrator or fully qualified identifier for thepolicy_orchestrator.

To set thepolicy_orchestrator attribute:

  • provide the argumentpolicy_orchestrator on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--folder=FOLDER
Folder of the policy_orchestrator.To set thefolder attribute:
  • provide the argumentpolicy_orchestrator on the command line with afully specified name;
  • provide the argument--folder on the command line. Must bespecified for resource of type [policy_orchestrator_folder].
--organization=ORGANIZATION
Organization of the policy_orchestrator.To set theorganization attribute:
  • provide the argumentpolicy_orchestrator on the command line with afully specified name;
  • provide the argument--organization on the command line. Must bespecified for resource of type [policy_orchestrator_organization].
REQUIRED FLAGS
--policy-type=POLICY_TYPE
Policy type to use.POLICY_TYPE must be (only one valueis supported):
os_policy_assignment_v1
OS policy assignment v1.
OPTIONAL FLAGS
--action=ACTION; default="upsert"
Action to be taken on policy.ACTION must be one of:
delete
Delete a policy with a given name.policy-id must be specified.
upsert
Create or update a policy.policy-file must be specified.
--async
Return immediately, without waiting for the operation in progress to complete.
--include-folders=INCLUDE_FOLDERS
Applies policy to selected folders. Comma-separated list of folder numbers. Canbeused together with--include-projects.
--include-locations=INCLUDE_LOCATIONS
Applies policy to selected locations, e.g.us-central1-a.
--include-projects=INCLUDE_PROJECTS
Applies policy to selected projects. Comma-separated list of project numbers.Can be used together with--include-folders.
--policy-file=POLICY_FILE
Absolute path to the OS policy assignment file on your local client. File mustbe in either JSON or YAML format. This file defines the OS policies that youwant to apply to your VMs, the target VMs that you want to apply the policiesto, and the rollout rate at which to apply the OS policies on a zonal level. Formore information about this resource and sample OS policy assignment files, seehttps://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies#os-policy-assignment.
--policy-id=POLICY_ID
Policy id. Must be specified forDELETE action.
--state=STATE; default="ACTIVE"
State of the policy orchestrator.STATE must be one of:
active
Creates a policy orchestrator inACTIVE state.
stopped
Creates a policy orchestrator inSTOPPED state.
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 theosconfig/v2 API. The full documentation forthis API can be found at:https://cloud.google.com/compute/docs/osconfig/rest
NOTES
These variants are also available:
gcloudalphacomputeos-configpolicy-orchestratorscreate
gcloudbetacomputeos-configpolicy-orchestratorscreate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-07 UTC.