Skip to main content

policy_orchestrators

Creates, updates, deletes, gets or lists a policy_orchestrators resource.

Overview

Namepolicy_orchestrators
TypeResource
Idgoogle.osconfig.policy_orchestrators

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringImmutable. 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}
actionstringRequired. 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
createTimestring (google-datetime)Output only. Timestamp when the policy orchestrator resource was created.
descriptionstringOptional. Freeform text describing the purpose of the resource.
etagstringOutput 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.
labelsobjectOptional. Labels as key value pairs
orchestratedResourceobjectRequired. Resource to be orchestrated by the policy orchestrator. (id: GoogleCloudOsconfigV2__OrchestratedResource)
orchestrationScopeobjectOptional. 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. (id: GoogleCloudOsconfigV2__OrchestrationScope)
orchestrationStateobjectOutput only. State of the orchestration. (id: GoogleCloudOsconfigV2_PolicyOrchestrator_OrchestrationState)
reconcilingbooleanOutput only. Set to true, if the there are ongoing changes being applied by the orchestrator.
statestringOptional. 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.
updateTimestring (google-datetime)Output only. Timestamp when the policy orchestrator resource was last modified.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectorganizationsId, policyOrchestratorsIdRetrieves an existing policy orchestrator, parented by an organization.
listselectorganizationsIdpageSize, pageToken, filter, orderByLists the policy orchestrators under the given parent organization resource.
createinsertorganizationsIdpolicyOrchestratorId, requestIdCreates 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).
patchupdateorganizationsId, policyOrchestratorsIdupdateMaskUpdates an existing policy orchestrator, parented by an organization.
deletedeleteorganizationsId, policyOrchestratorsIdrequestId, etagDeletes an existing policy orchestrator resource, parented by an organization.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
organizationsIdstring
policyOrchestratorsIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
policyOrchestratorIdstring
requestIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves an existing policy orchestrator, parented by an organization.

SELECT
name,
action,
createTime,
description,
etag,
labels,
orchestratedResource,
orchestrationScope,
orchestrationState,
reconciling,
state,
updateTime
FROM google.osconfig.policy_orchestrators
WHERE organizationsId = '{{ organizationsId }}' -- required
AND policyOrchestratorsId = '{{ policyOrchestratorsId }}' -- required;

INSERT examples

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).

INSERT INTO google.osconfig.policy_orchestrators (
data__name,
data__description,
data__state,
data__orchestrationScope,
data__action,
data__orchestratedResource,
data__labels,
organizationsId,
policyOrchestratorId,
requestId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ state }}',
'{{ orchestrationScope }}',
'{{ action }}',
'{{ orchestratedResource }}',
'{{ labels }}',
'{{ organizationsId }}',
'{{ policyOrchestratorId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates an existing policy orchestrator, parented by an organization.

UPDATE google.osconfig.policy_orchestrators
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__state = '{{ state }}',
data__orchestrationScope = '{{ orchestrationScope }}',
data__action = '{{ action }}',
data__orchestratedResource = '{{ orchestratedResource }}',
data__labels = '{{ labels }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND policyOrchestratorsId = '{{ policyOrchestratorsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes an existing policy orchestrator resource, parented by an organization.

DELETE FROM google.osconfig.policy_orchestrators
WHERE organizationsId = '{{ organizationsId }}' --required
AND policyOrchestratorsId = '{{ policyOrchestratorsId }}' --required
AND requestId = '{{ requestId }}'
AND etag = '{{ etag }}';