Close httplib2 connections.
create(parent, body=None, policyOrchestratorId=None, requestId=None, x__xgafv=None)
Creates a new policy orchestrator under the given organizations resource. `name` field of the given orchestrator are ignored and instead replaced by a product of `parent` and `policy_orchestrator_id`. Orchestrator state field might be only set to `ACTIVE`, `STOPPED` or omitted (in which case, the created resource will be in `ACTIVE` state anyway).
delete(name, etag=None, requestId=None, x__xgafv=None)
Deletes an existing policy orchestrator resource, parented by an organization.
Retrieves an existing policy orchestrator, parented by an organization.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists the policy orchestrators under the given parent organization resource.
Retrieves the next page of results.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an existing policy orchestrator, parented by an organization.
close()
Close httplib2 connections.
create(parent, body=None, policyOrchestratorId=None, requestId=None, x__xgafv=None)
Creates a new policy orchestrator under the given organizations resource. `name` field of the given orchestrator are ignored and instead replaced by a product of `parent` and `policy_orchestrator_id`. Orchestrator state field might be only set to `ACTIVE`, `STOPPED` or omitted (in which case, the created resource will be in `ACTIVE` state anyway). Args: parent: string, Required. The parent resource name in the form of: * `organizations/{organization_id}/locations/global` * `folders/{folder_id}/locations/global` * `projects/{project_id_or_number}/locations/global` (required) body: object, The request body. The object takes the form of: { # PolicyOrchestrator helps managing project+zone level policy resources (e.g. OS Policy Assignments), by providing tools to create, update and delete them across projects and locations, at scale. Policy orchestrator functions as an endless loop. Each iteration orchestrator computes a set of resources that should be affected, then progressively applies changes to them. If for some reason this set of resources changes over time (e.g. new projects are added), the future loop iterations will address that. Orchestrator can either upsert or delete policy resources. For more details, see the description of the `action`, and `orchestrated_resource` fields. Note that policy orchestrator do not "manage" the resources it creates. Every iteration is independent and only minimal history of past actions is retained (apart from Cloud Logging). If orchestrator gets deleted, it does not affect the resources it created in the past. Those will remain where they were. Same applies if projects are removed from the orchestrator's scope. "action": "A String", # Required. Action to be done by the orchestrator in `projects/{project_id}/zones/{zone_id}` locations defined by the `orchestration_scope`. Allowed values: - `UPSERT` - Orchestrator will create or update target resources. - `DELETE` - Orchestrator will delete target resources, if they exist "createTime": "A String", # Output only. Timestamp when the policy orchestrator resource was created. "description": "A String", # Optional. Freeform text describing the purpose of the resource. "etag": "A String", # Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. "labels": { # Optional. Labels as key value pairs "a_key": "A String", }, "name": "A String", # Immutable. Identifier. In form of * `organizations/{organization_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `folders/{folder_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `projects/{project_id_or_number}/locations/global/policyOrchestrators/{orchestrator_id}` "orchestratedResource": { # Represents a resource that is being orchestrated by the policy orchestrator. # Required. Resource to be orchestrated by the policy orchestrator. "id": "A String", # Optional. ID of the resource to be used while generating set of affected resources. For UPSERT action the value is auto-generated during PolicyOrchestrator creation when not set. When the value is set it should following next restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project. For DELETE action, ID must be specified explicitly during PolicyOrchestrator creation. "osPolicyAssignmentV1Payload": { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information about the OS policy resource definitions and examples, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). # Optional. OSPolicyAssignment resource to be created, updated or deleted. Name field is ignored and replace with a generated value. With this field set, orchestrator will perform actions on `project/{project}/locations/{zone}/osPolicyAssignments/{resource_id}` resources, where `project` and `zone` pairs come from the expanded scope, and `resource_id` comes from the `resource_id` field of orchestrator resource. "baseline": True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field. "deleted": True or False, # Output only. Indicates that this revision deletes the OS policy assignment. "description": "A String", # OS policy assignment description. Length of the description is limited to 1024 characters. "etag": "A String", # The etag for this OS policy assignment. If this is provided on update, it must match the server's etag. "instanceFilter": { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs. "all": True or False, # Target all VMs in the project. If true, no other criteria is permitted. "exclusionLabels": [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inclusionLabels": [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inventories": [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories. { # VM inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], }, "name": "A String", # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment. "osPolicies": [ # Required. List of OS policies to be applied to the VMs. { # An OS policy defines the desired state configuration for a VM. "allowNoResourceGroupMatch": True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce. "description": "A String", # Policy description. Length of the description is limited to 1024 characters. "id": "A String", # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment. "mode": "A String", # Required. Policy mode "resourceGroups": [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group. "inventoryFilters": [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. { # Filtering criteria to select VMs based on inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], "resources": [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here. { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state. "exec": { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource "enforce": { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates "success", any other exit code indicates a failure running enforce. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, "validate": { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates "in desired state", and exit code of 101 indicates "not in desired state". Any other exit code indicates a failure running validate. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, }, "file": { # A resource that manages the state of a file. # File resource "content": "A String", # A a file with this content. The size of the content is limited to 32KiB. "file": { # A remote or local file. # A remote or local source. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "path": "A String", # Required. The absolute path of the file within the VM. "permissions": "A String", # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4 "state": "A String", # Required. Desired state of the file. }, "id": "A String", # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy. "pkg": { # A resource that manages a system package. # Package resource "apt": { # A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` # A package managed by Apt. "name": "A String", # Required. Package name. }, "deb": { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `dpkg -i package` - install when true: `apt-get update && apt-get -y install package.deb` "source": { # A remote or local file. # Required. A deb package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "desiredState": "A String", # Required. The desired state the agent should maintain for this package. "googet": { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet. "name": "A String", # Required. Package name. }, "msi": { # An MSI package. MSI packages only support INSTALLED state. # An MSI package. "properties": [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`. "A String", ], "source": { # A remote or local file. # Required. The MSI package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "rpm": { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum -y install package.rpm` or `zypper -y install package.rpm` "source": { # A remote or local file. # Required. An rpm package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "yum": { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM. "name": "A String", # Required. Package name. }, "zypper": { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper. "name": "A String", # Required. Package name. }, }, "repository": { # A resource that manages a package repository. # Package repository resource "apt": { # Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. # An Apt Repository. "archiveType": "A String", # Required. Type of archive files in this repository. "components": [ # Required. List of components for this repository. Must contain at least one item. "A String", ], "distribution": "A String", # Required. Distribution of this repository. "gpgKey": "A String", # URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. "uri": "A String", # Required. URI for this repository. }, "goo": { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository. "name": "A String", # Required. The name of the repository. "url": "A String", # Required. The url of the repository. }, "yum": { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts. }, "zypper": { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts. }, }, }, ], }, ], }, ], "reconciling": True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created. "revisionId": "A String", # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment "rollout": { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted. "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment. "fixed": 42, # Specifies a fixed value. "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. }, "minWaitDuration": "A String", # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied. }, "rolloutState": "A String", # Output only. OS policy assignment rollout state "uid": "A String", # Output only. Server generated unique id for the OS policy assignment resource. }, }, "orchestrationScope": { # Defines a set of selectors which drive which resources are in scope of policy orchestration. # Optional. Defines scope for the orchestration, in context of the enclosing PolicyOrchestrator resource. Scope is expanded into a list of pairs, in which the rollout action will take place. Expansion starts with a Folder resource parenting the PolicyOrchestrator resource: - All the descendant projects are listed. - List of project is cross joined with a list of all available zones. - Resulting list of pairs is filtered according to the selectors. "selectors": [ # Optional. Selectors of the orchestration scope. There is a logical AND between each selector defined. When there is no explicit `ResourceHierarchySelector` selector specified, the scope is by default bounded to the parent of the policy orchestrator resource. { # Selector for the resources in scope of orchestration. "locationSelector": { # Selector containing locations in scope. # Selector for selecting locations. "includedLocations": [ # Optional. Names of the locations in scope. Format: `us-central1-a` "A String", ], }, "resourceHierarchySelector": { # Selector containing Cloud Resource Manager resource hierarchy nodes. # Selector for selecting resource hierarchy. "includedFolders": [ # Optional. Names of the folders in scope. Format: `folders/{folder_id}` "A String", ], "includedProjects": [ # Optional. Names of the projects in scope. Format: `projects/{project_number}` "A String", ], }, }, ], }, "orchestrationState": { # Describes the state of the orchestration process. # Output only. State of the orchestration. "currentIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Current Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, "previousIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Previous Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, }, "reconciling": True or False, # Output only. Set to true, if the there are ongoing changes being applied by the orchestrator. "state": "A String", # Optional. State of the orchestrator. Can be updated to change orchestrator behaviour. Allowed values: - `ACTIVE` - orchestrator is actively looking for actions to be taken. - `STOPPED` - orchestrator won't make any changes. Note: There might be more states added in the future. We use string here instead of an enum, to avoid the need of propagating new states to all the client code. "updateTime": "A String", # Output only. Timestamp when the policy orchestrator resource was last modified. } policyOrchestratorId: string, Required. The logical identifier of the policy orchestrator, with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the parent. requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # This resource represents a long-running operation that is the result of a network API call. "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. "a_key": "", # Properties of the object. Contains field @type with type URL. }, "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. "a_key": "", # Properties of the object. Contains field @type with type URL. }, }
delete(name, etag=None, requestId=None, x__xgafv=None)
Deletes an existing policy orchestrator resource, parented by an organization. Args: name: string, Required. Name of the resource to be deleted. (required) etag: string, Optional. The current etag of the policy orchestrator. If an etag is provided and does not match the current etag of the policy orchestrator, deletion will be blocked and an ABORTED error will be returned. requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # This resource represents a long-running operation that is the result of a network API call. "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. "a_key": "", # Properties of the object. Contains field @type with type URL. }, "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. "a_key": "", # Properties of the object. Contains field @type with type URL. }, }
get(name, x__xgafv=None)
Retrieves an existing policy orchestrator, parented by an organization. Args: name: string, Required. The resource name. (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # PolicyOrchestrator helps managing project+zone level policy resources (e.g. OS Policy Assignments), by providing tools to create, update and delete them across projects and locations, at scale. Policy orchestrator functions as an endless loop. Each iteration orchestrator computes a set of resources that should be affected, then progressively applies changes to them. If for some reason this set of resources changes over time (e.g. new projects are added), the future loop iterations will address that. Orchestrator can either upsert or delete policy resources. For more details, see the description of the `action`, and `orchestrated_resource` fields. Note that policy orchestrator do not "manage" the resources it creates. Every iteration is independent and only minimal history of past actions is retained (apart from Cloud Logging). If orchestrator gets deleted, it does not affect the resources it created in the past. Those will remain where they were. Same applies if projects are removed from the orchestrator's scope. "action": "A String", # Required. Action to be done by the orchestrator in `projects/{project_id}/zones/{zone_id}` locations defined by the `orchestration_scope`. Allowed values: - `UPSERT` - Orchestrator will create or update target resources. - `DELETE` - Orchestrator will delete target resources, if they exist "createTime": "A String", # Output only. Timestamp when the policy orchestrator resource was created. "description": "A String", # Optional. Freeform text describing the purpose of the resource. "etag": "A String", # Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. "labels": { # Optional. Labels as key value pairs "a_key": "A String", }, "name": "A String", # Immutable. Identifier. In form of * `organizations/{organization_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `folders/{folder_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `projects/{project_id_or_number}/locations/global/policyOrchestrators/{orchestrator_id}` "orchestratedResource": { # Represents a resource that is being orchestrated by the policy orchestrator. # Required. Resource to be orchestrated by the policy orchestrator. "id": "A String", # Optional. ID of the resource to be used while generating set of affected resources. For UPSERT action the value is auto-generated during PolicyOrchestrator creation when not set. When the value is set it should following next restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project. For DELETE action, ID must be specified explicitly during PolicyOrchestrator creation. "osPolicyAssignmentV1Payload": { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information about the OS policy resource definitions and examples, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). # Optional. OSPolicyAssignment resource to be created, updated or deleted. Name field is ignored and replace with a generated value. With this field set, orchestrator will perform actions on `project/{project}/locations/{zone}/osPolicyAssignments/{resource_id}` resources, where `project` and `zone` pairs come from the expanded scope, and `resource_id` comes from the `resource_id` field of orchestrator resource. "baseline": True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field. "deleted": True or False, # Output only. Indicates that this revision deletes the OS policy assignment. "description": "A String", # OS policy assignment description. Length of the description is limited to 1024 characters. "etag": "A String", # The etag for this OS policy assignment. If this is provided on update, it must match the server's etag. "instanceFilter": { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs. "all": True or False, # Target all VMs in the project. If true, no other criteria is permitted. "exclusionLabels": [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inclusionLabels": [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inventories": [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories. { # VM inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], }, "name": "A String", # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment. "osPolicies": [ # Required. List of OS policies to be applied to the VMs. { # An OS policy defines the desired state configuration for a VM. "allowNoResourceGroupMatch": True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce. "description": "A String", # Policy description. Length of the description is limited to 1024 characters. "id": "A String", # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment. "mode": "A String", # Required. Policy mode "resourceGroups": [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group. "inventoryFilters": [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. { # Filtering criteria to select VMs based on inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], "resources": [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here. { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state. "exec": { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource "enforce": { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates "success", any other exit code indicates a failure running enforce. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, "validate": { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates "in desired state", and exit code of 101 indicates "not in desired state". Any other exit code indicates a failure running validate. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, }, "file": { # A resource that manages the state of a file. # File resource "content": "A String", # A a file with this content. The size of the content is limited to 32KiB. "file": { # A remote or local file. # A remote or local source. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "path": "A String", # Required. The absolute path of the file within the VM. "permissions": "A String", # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4 "state": "A String", # Required. Desired state of the file. }, "id": "A String", # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy. "pkg": { # A resource that manages a system package. # Package resource "apt": { # A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` # A package managed by Apt. "name": "A String", # Required. Package name. }, "deb": { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `dpkg -i package` - install when true: `apt-get update && apt-get -y install package.deb` "source": { # A remote or local file. # Required. A deb package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "desiredState": "A String", # Required. The desired state the agent should maintain for this package. "googet": { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet. "name": "A String", # Required. Package name. }, "msi": { # An MSI package. MSI packages only support INSTALLED state. # An MSI package. "properties": [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`. "A String", ], "source": { # A remote or local file. # Required. The MSI package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "rpm": { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum -y install package.rpm` or `zypper -y install package.rpm` "source": { # A remote or local file. # Required. An rpm package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "yum": { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM. "name": "A String", # Required. Package name. }, "zypper": { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper. "name": "A String", # Required. Package name. }, }, "repository": { # A resource that manages a package repository. # Package repository resource "apt": { # Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. # An Apt Repository. "archiveType": "A String", # Required. Type of archive files in this repository. "components": [ # Required. List of components for this repository. Must contain at least one item. "A String", ], "distribution": "A String", # Required. Distribution of this repository. "gpgKey": "A String", # URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. "uri": "A String", # Required. URI for this repository. }, "goo": { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository. "name": "A String", # Required. The name of the repository. "url": "A String", # Required. The url of the repository. }, "yum": { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts. }, "zypper": { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts. }, }, }, ], }, ], }, ], "reconciling": True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created. "revisionId": "A String", # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment "rollout": { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted. "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment. "fixed": 42, # Specifies a fixed value. "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. }, "minWaitDuration": "A String", # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied. }, "rolloutState": "A String", # Output only. OS policy assignment rollout state "uid": "A String", # Output only. Server generated unique id for the OS policy assignment resource. }, }, "orchestrationScope": { # Defines a set of selectors which drive which resources are in scope of policy orchestration. # Optional. Defines scope for the orchestration, in context of the enclosing PolicyOrchestrator resource. Scope is expanded into a list of pairs, in which the rollout action will take place. Expansion starts with a Folder resource parenting the PolicyOrchestrator resource: - All the descendant projects are listed. - List of project is cross joined with a list of all available zones. - Resulting list of pairs is filtered according to the selectors. "selectors": [ # Optional. Selectors of the orchestration scope. There is a logical AND between each selector defined. When there is no explicit `ResourceHierarchySelector` selector specified, the scope is by default bounded to the parent of the policy orchestrator resource. { # Selector for the resources in scope of orchestration. "locationSelector": { # Selector containing locations in scope. # Selector for selecting locations. "includedLocations": [ # Optional. Names of the locations in scope. Format: `us-central1-a` "A String", ], }, "resourceHierarchySelector": { # Selector containing Cloud Resource Manager resource hierarchy nodes. # Selector for selecting resource hierarchy. "includedFolders": [ # Optional. Names of the folders in scope. Format: `folders/{folder_id}` "A String", ], "includedProjects": [ # Optional. Names of the projects in scope. Format: `projects/{project_number}` "A String", ], }, }, ], }, "orchestrationState": { # Describes the state of the orchestration process. # Output only. State of the orchestration. "currentIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Current Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, "previousIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Previous Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, }, "reconciling": True or False, # Output only. Set to true, if the there are ongoing changes being applied by the orchestrator. "state": "A String", # Optional. State of the orchestrator. Can be updated to change orchestrator behaviour. Allowed values: - `ACTIVE` - orchestrator is actively looking for actions to be taken. - `STOPPED` - orchestrator won't make any changes. Note: There might be more states added in the future. We use string here instead of an enum, to avoid the need of propagating new states to all the client code. "updateTime": "A String", # Output only. Timestamp when the policy orchestrator resource was last modified. }
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists the policy orchestrators under the given parent organization resource. Args: parent: string, Required. The parent resource name. (required) filter: string, Optional. Filtering results orderBy: string, Optional. Hint for how to order the results pageSize: integer, Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. pageToken: string, Optional. A token identifying a page of results the server should return. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response for the list policy orchestrator resources. "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. "policyOrchestrators": [ # The policy orchestrators for the specified parent resource. { # PolicyOrchestrator helps managing project+zone level policy resources (e.g. OS Policy Assignments), by providing tools to create, update and delete them across projects and locations, at scale. Policy orchestrator functions as an endless loop. Each iteration orchestrator computes a set of resources that should be affected, then progressively applies changes to them. If for some reason this set of resources changes over time (e.g. new projects are added), the future loop iterations will address that. Orchestrator can either upsert or delete policy resources. For more details, see the description of the `action`, and `orchestrated_resource` fields. Note that policy orchestrator do not "manage" the resources it creates. Every iteration is independent and only minimal history of past actions is retained (apart from Cloud Logging). If orchestrator gets deleted, it does not affect the resources it created in the past. Those will remain where they were. Same applies if projects are removed from the orchestrator's scope. "action": "A String", # Required. Action to be done by the orchestrator in `projects/{project_id}/zones/{zone_id}` locations defined by the `orchestration_scope`. Allowed values: - `UPSERT` - Orchestrator will create or update target resources. - `DELETE` - Orchestrator will delete target resources, if they exist "createTime": "A String", # Output only. Timestamp when the policy orchestrator resource was created. "description": "A String", # Optional. Freeform text describing the purpose of the resource. "etag": "A String", # Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. "labels": { # Optional. Labels as key value pairs "a_key": "A String", }, "name": "A String", # Immutable. Identifier. In form of * `organizations/{organization_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `folders/{folder_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `projects/{project_id_or_number}/locations/global/policyOrchestrators/{orchestrator_id}` "orchestratedResource": { # Represents a resource that is being orchestrated by the policy orchestrator. # Required. Resource to be orchestrated by the policy orchestrator. "id": "A String", # Optional. ID of the resource to be used while generating set of affected resources. For UPSERT action the value is auto-generated during PolicyOrchestrator creation when not set. When the value is set it should following next restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project. For DELETE action, ID must be specified explicitly during PolicyOrchestrator creation. "osPolicyAssignmentV1Payload": { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information about the OS policy resource definitions and examples, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). # Optional. OSPolicyAssignment resource to be created, updated or deleted. Name field is ignored and replace with a generated value. With this field set, orchestrator will perform actions on `project/{project}/locations/{zone}/osPolicyAssignments/{resource_id}` resources, where `project` and `zone` pairs come from the expanded scope, and `resource_id` comes from the `resource_id` field of orchestrator resource. "baseline": True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field. "deleted": True or False, # Output only. Indicates that this revision deletes the OS policy assignment. "description": "A String", # OS policy assignment description. Length of the description is limited to 1024 characters. "etag": "A String", # The etag for this OS policy assignment. If this is provided on update, it must match the server's etag. "instanceFilter": { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs. "all": True or False, # Target all VMs in the project. If true, no other criteria is permitted. "exclusionLabels": [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inclusionLabels": [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inventories": [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories. { # VM inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], }, "name": "A String", # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment. "osPolicies": [ # Required. List of OS policies to be applied to the VMs. { # An OS policy defines the desired state configuration for a VM. "allowNoResourceGroupMatch": True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce. "description": "A String", # Policy description. Length of the description is limited to 1024 characters. "id": "A String", # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment. "mode": "A String", # Required. Policy mode "resourceGroups": [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group. "inventoryFilters": [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. { # Filtering criteria to select VMs based on inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], "resources": [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here. { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state. "exec": { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource "enforce": { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates "success", any other exit code indicates a failure running enforce. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, "validate": { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates "in desired state", and exit code of 101 indicates "not in desired state". Any other exit code indicates a failure running validate. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, }, "file": { # A resource that manages the state of a file. # File resource "content": "A String", # A a file with this content. The size of the content is limited to 32KiB. "file": { # A remote or local file. # A remote or local source. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "path": "A String", # Required. The absolute path of the file within the VM. "permissions": "A String", # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4 "state": "A String", # Required. Desired state of the file. }, "id": "A String", # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy. "pkg": { # A resource that manages a system package. # Package resource "apt": { # A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` # A package managed by Apt. "name": "A String", # Required. Package name. }, "deb": { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `dpkg -i package` - install when true: `apt-get update && apt-get -y install package.deb` "source": { # A remote or local file. # Required. A deb package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "desiredState": "A String", # Required. The desired state the agent should maintain for this package. "googet": { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet. "name": "A String", # Required. Package name. }, "msi": { # An MSI package. MSI packages only support INSTALLED state. # An MSI package. "properties": [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`. "A String", ], "source": { # A remote or local file. # Required. The MSI package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "rpm": { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum -y install package.rpm` or `zypper -y install package.rpm` "source": { # A remote or local file. # Required. An rpm package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "yum": { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM. "name": "A String", # Required. Package name. }, "zypper": { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper. "name": "A String", # Required. Package name. }, }, "repository": { # A resource that manages a package repository. # Package repository resource "apt": { # Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. # An Apt Repository. "archiveType": "A String", # Required. Type of archive files in this repository. "components": [ # Required. List of components for this repository. Must contain at least one item. "A String", ], "distribution": "A String", # Required. Distribution of this repository. "gpgKey": "A String", # URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. "uri": "A String", # Required. URI for this repository. }, "goo": { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository. "name": "A String", # Required. The name of the repository. "url": "A String", # Required. The url of the repository. }, "yum": { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts. }, "zypper": { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts. }, }, }, ], }, ], }, ], "reconciling": True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created. "revisionId": "A String", # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment "rollout": { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted. "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment. "fixed": 42, # Specifies a fixed value. "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. }, "minWaitDuration": "A String", # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied. }, "rolloutState": "A String", # Output only. OS policy assignment rollout state "uid": "A String", # Output only. Server generated unique id for the OS policy assignment resource. }, }, "orchestrationScope": { # Defines a set of selectors which drive which resources are in scope of policy orchestration. # Optional. Defines scope for the orchestration, in context of the enclosing PolicyOrchestrator resource. Scope is expanded into a list of pairs, in which the rollout action will take place. Expansion starts with a Folder resource parenting the PolicyOrchestrator resource: - All the descendant projects are listed. - List of project is cross joined with a list of all available zones. - Resulting list of pairs is filtered according to the selectors. "selectors": [ # Optional. Selectors of the orchestration scope. There is a logical AND between each selector defined. When there is no explicit `ResourceHierarchySelector` selector specified, the scope is by default bounded to the parent of the policy orchestrator resource. { # Selector for the resources in scope of orchestration. "locationSelector": { # Selector containing locations in scope. # Selector for selecting locations. "includedLocations": [ # Optional. Names of the locations in scope. Format: `us-central1-a` "A String", ], }, "resourceHierarchySelector": { # Selector containing Cloud Resource Manager resource hierarchy nodes. # Selector for selecting resource hierarchy. "includedFolders": [ # Optional. Names of the folders in scope. Format: `folders/{folder_id}` "A String", ], "includedProjects": [ # Optional. Names of the projects in scope. Format: `projects/{project_number}` "A String", ], }, }, ], }, "orchestrationState": { # Describes the state of the orchestration process. # Output only. State of the orchestration. "currentIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Current Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, "previousIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Previous Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, }, "reconciling": True or False, # Output only. Set to true, if the there are ongoing changes being applied by the orchestrator. "state": "A String", # Optional. State of the orchestrator. Can be updated to change orchestrator behaviour. Allowed values: - `ACTIVE` - orchestrator is actively looking for actions to be taken. - `STOPPED` - orchestrator won't make any changes. Note: There might be more states added in the future. We use string here instead of an enum, to avoid the need of propagating new states to all the client code. "updateTime": "A String", # Output only. Timestamp when the policy orchestrator resource was last modified. }, ], "unreachable": [ # Locations that could not be reached. "A String", ], }
list_next()
Retrieves the next page of results. Args: previous_request: The request for the previous page. (required) previous_response: The response from the request for the previous page. (required) Returns: A request object that you can call 'execute()' on to request the next page. Returns None if there are no more items in the collection.
patch(name, body=None, updateMask=None, x__xgafv=None)
Updates an existing policy orchestrator, parented by an organization. Args: name: string, Immutable. Identifier. In form of * `organizations/{organization_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `folders/{folder_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `projects/{project_id_or_number}/locations/global/policyOrchestrators/{orchestrator_id}` (required) body: object, The request body. The object takes the form of: { # PolicyOrchestrator helps managing project+zone level policy resources (e.g. OS Policy Assignments), by providing tools to create, update and delete them across projects and locations, at scale. Policy orchestrator functions as an endless loop. Each iteration orchestrator computes a set of resources that should be affected, then progressively applies changes to them. If for some reason this set of resources changes over time (e.g. new projects are added), the future loop iterations will address that. Orchestrator can either upsert or delete policy resources. For more details, see the description of the `action`, and `orchestrated_resource` fields. Note that policy orchestrator do not "manage" the resources it creates. Every iteration is independent and only minimal history of past actions is retained (apart from Cloud Logging). If orchestrator gets deleted, it does not affect the resources it created in the past. Those will remain where they were. Same applies if projects are removed from the orchestrator's scope. "action": "A String", # Required. Action to be done by the orchestrator in `projects/{project_id}/zones/{zone_id}` locations defined by the `orchestration_scope`. Allowed values: - `UPSERT` - Orchestrator will create or update target resources. - `DELETE` - Orchestrator will delete target resources, if they exist "createTime": "A String", # Output only. Timestamp when the policy orchestrator resource was created. "description": "A String", # Optional. Freeform text describing the purpose of the resource. "etag": "A String", # Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. "labels": { # Optional. Labels as key value pairs "a_key": "A String", }, "name": "A String", # Immutable. Identifier. In form of * `organizations/{organization_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `folders/{folder_id}/locations/global/policyOrchestrators/{orchestrator_id}` * `projects/{project_id_or_number}/locations/global/policyOrchestrators/{orchestrator_id}` "orchestratedResource": { # Represents a resource that is being orchestrated by the policy orchestrator. # Required. Resource to be orchestrated by the policy orchestrator. "id": "A String", # Optional. ID of the resource to be used while generating set of affected resources. For UPSERT action the value is auto-generated during PolicyOrchestrator creation when not set. When the value is set it should following next restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project. For DELETE action, ID must be specified explicitly during PolicyOrchestrator creation. "osPolicyAssignmentV1Payload": { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information about the OS policy resource definitions and examples, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies). # Optional. OSPolicyAssignment resource to be created, updated or deleted. Name field is ignored and replace with a generated value. With this field set, orchestrator will perform actions on `project/{project}/locations/{zone}/osPolicyAssignments/{resource_id}` resources, where `project` and `zone` pairs come from the expanded scope, and `resource_id` comes from the `resource_id` field of orchestrator resource. "baseline": True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field. "deleted": True or False, # Output only. Indicates that this revision deletes the OS policy assignment. "description": "A String", # OS policy assignment description. Length of the description is limited to 1024 characters. "etag": "A String", # The etag for this OS policy assignment. If this is provided on update, it must match the server's etag. "instanceFilter": { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs. "all": True or False, # Target all VMs in the project. If true, no other criteria is permitted. "exclusionLabels": [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inclusionLabels": [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM. { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present. "labels": { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected. "a_key": "A String", }, }, ], "inventories": [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories. { # VM inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], }, "name": "A String", # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment. "osPolicies": [ # Required. List of OS policies to be applied to the VMs. { # An OS policy defines the desired state configuration for a VM. "allowNoResourceGroupMatch": True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce. "description": "A String", # Policy description. Length of the description is limited to 1024 characters. "id": "A String", # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment. "mode": "A String", # Required. Policy mode "resourceGroups": [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match` { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group. "inventoryFilters": [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally. { # Filtering criteria to select VMs based on inventory details. "osShortName": "A String", # Required. The OS short name "osVersion": "A String", # The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions. }, ], "resources": [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here. { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state. "exec": { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource "enforce": { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates "success", any other exit code indicates a failure running enforce. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, "validate": { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates "in desired state", and exit code of 101 indicates "not in desired state". Any other exit code indicates a failure running validate. "args": [ # Optional arguments to pass to the source during execution. "A String", ], "file": { # A remote or local file. # A remote or local file. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "interpreter": "A String", # Required. The script interpreter to use. "outputFilePath": "A String", # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 500K bytes. "script": "A String", # An inline script. The size of the script is limited to 32KiB. }, }, "file": { # A resource that manages the state of a file. # File resource "content": "A String", # A a file with this content. The size of the content is limited to 32KiB. "file": { # A remote or local file. # A remote or local source. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, "path": "A String", # Required. The absolute path of the file within the VM. "permissions": "A String", # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4 "state": "A String", # Required. Desired state of the file. }, "id": "A String", # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy. "pkg": { # A resource that manages a system package. # Package resource "apt": { # A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]` # A package managed by Apt. "name": "A String", # Required. Package name. }, "deb": { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `dpkg -i package` - install when true: `apt-get update && apt-get -y install package.deb` "source": { # A remote or local file. # Required. A deb package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "desiredState": "A String", # Required. The desired state the agent should maintain for this package. "googet": { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet. "name": "A String", # Required. Package name. }, "msi": { # An MSI package. MSI packages only support INSTALLED state. # An MSI package. "properties": [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`. "A String", ], "source": { # A remote or local file. # Required. The MSI package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "rpm": { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file. "pullDeps": True or False, # Whether dependencies should also be installed. - install when false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum -y install package.rpm` or `zypper -y install package.rpm` "source": { # A remote or local file. # Required. An rpm package. "allowInsecure": True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified. "gcs": { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object. "bucket": "A String", # Required. Bucket of the Cloud Storage object. "generation": "A String", # Generation number of the Cloud Storage object. "object": "A String", # Required. Name of the Cloud Storage object. }, "localPath": "A String", # A local path within the VM to use. "remote": { # Specifies a file available via some URI. # A generic remote file. "sha256Checksum": "A String", # SHA256 checksum of the remote file. "uri": "A String", # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`. }, }, }, "yum": { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM. "name": "A String", # Required. Package name. }, "zypper": { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper. "name": "A String", # Required. Package name. }, }, "repository": { # A resource that manages a package repository. # Package repository resource "apt": { # Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`. # An Apt Repository. "archiveType": "A String", # Required. Type of archive files in this repository. "components": [ # Required. List of components for this repository. Must contain at least one item. "A String", ], "distribution": "A String", # Required. Distribution of this repository. "gpgKey": "A String", # URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. "uri": "A String", # Required. URI for this repository. }, "goo": { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository. "name": "A String", # Required. The name of the repository. "url": "A String", # Required. The url of the repository. }, "yum": { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts. }, "zypper": { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository. "baseUrl": "A String", # Required. The location of the repository directory. "displayName": "A String", # The display name of the repository. "gpgKeys": [ # URIs of GPG keys. "A String", ], "id": "A String", # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts. }, }, }, ], }, ], }, ], "reconciling": True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING "revisionCreateTime": "A String", # Output only. The timestamp that the revision was created. "revisionId": "A String", # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment "rollout": { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted. "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment. "fixed": 42, # Specifies a fixed value. "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. }, "minWaitDuration": "A String", # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied. }, "rolloutState": "A String", # Output only. OS policy assignment rollout state "uid": "A String", # Output only. Server generated unique id for the OS policy assignment resource. }, }, "orchestrationScope": { # Defines a set of selectors which drive which resources are in scope of policy orchestration. # Optional. Defines scope for the orchestration, in context of the enclosing PolicyOrchestrator resource. Scope is expanded into a list of pairs, in which the rollout action will take place. Expansion starts with a Folder resource parenting the PolicyOrchestrator resource: - All the descendant projects are listed. - List of project is cross joined with a list of all available zones. - Resulting list of pairs is filtered according to the selectors. "selectors": [ # Optional. Selectors of the orchestration scope. There is a logical AND between each selector defined. When there is no explicit `ResourceHierarchySelector` selector specified, the scope is by default bounded to the parent of the policy orchestrator resource. { # Selector for the resources in scope of orchestration. "locationSelector": { # Selector containing locations in scope. # Selector for selecting locations. "includedLocations": [ # Optional. Names of the locations in scope. Format: `us-central1-a` "A String", ], }, "resourceHierarchySelector": { # Selector containing Cloud Resource Manager resource hierarchy nodes. # Selector for selecting resource hierarchy. "includedFolders": [ # Optional. Names of the folders in scope. Format: `folders/{folder_id}` "A String", ], "includedProjects": [ # Optional. Names of the projects in scope. Format: `projects/{project_number}` "A String", ], }, }, ], }, "orchestrationState": { # Describes the state of the orchestration process. # Output only. State of the orchestration. "currentIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Current Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, "previousIterationState": { # Describes the state of a single iteration of the orchestrator. # Output only. Previous Wave iteration state. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error thrown in the wave iteration. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "failedActions": "A String", # Output only. Number of orchestration actions which failed so far. For more details, query the Cloud Logs. "finishTime": "A String", # Output only. Finish time of the wave iteration. "performedActions": "A String", # Output only. Overall number of actions done by the orchestrator so far. "progress": 3.14, # Output only. An estimated percentage of the progress. Number between 0 and 100. "rolloutResource": "A String", # Output only. Handle to the Progressive Rollouts API rollout resource, which contains detailed information about a particular orchestration iteration. "startTime": "A String", # Output only. Start time of the wave iteration. "state": "A String", # Output only. State of the iteration. }, }, "reconciling": True or False, # Output only. Set to true, if the there are ongoing changes being applied by the orchestrator. "state": "A String", # Optional. State of the orchestrator. Can be updated to change orchestrator behaviour. Allowed values: - `ACTIVE` - orchestrator is actively looking for actions to be taken. - `STOPPED` - orchestrator won't make any changes. Note: There might be more states added in the future. We use string here instead of an enum, to avoid the need of propagating new states to all the client code. "updateTime": "A String", # Output only. Timestamp when the policy orchestrator resource was last modified. } updateMask: string, Optional. The list of fields to update. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # This resource represents a long-running operation that is the result of a network API call. "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. "code": 42, # The status code, which should be an enum value of google.rpc.Code. "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. { "a_key": "", # Properties of the object. Contains field @type with type URL. }, ], "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. }, "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. "a_key": "", # Properties of the object. Contains field @type with type URL. }, "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. "a_key": "", # Properties of the object. Contains field @type with type URL. }, }