Skip to main content

automation_runs

Creates, updates, deletes, gets or lists an automation_runs resource.

Overview

Nameautomation_runs
TypeResource
Idgoogle.clouddeploy.automation_runs

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Name of the AutomationRun. Format is projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/automationRuns/{automation_run}.
advanceRolloutOperationobjectOutput only. Advances a rollout to the next phase. (id: AdvanceRolloutOperation)
automationIdstringOutput only. The ID of the automation that initiated the operation.
automationSnapshotobjectAn Automation resource in the Cloud Deploy API. An Automation enables the automation of manually driven actions for a Delivery Pipeline, which includes Release promotion among Targets, Rollout repair and Rollout deployment strategy advancement. The intention of Automation is to reduce manual intervention in the continuous delivery process. (id: Automation)
createTimestring (google-datetime)Output only. Time at which the AutomationRun was created.
etagstringOutput only. The weak etag of the AutomationRun resource. 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.
expireTimestring (google-datetime)Output only. Time the AutomationRun expires. An AutomationRun expires after 14 days from its creation date.
policyViolationobjectOutput only. Contains information about what policies prevented the AutomationRun from proceeding. (id: PolicyViolation)
promoteReleaseOperationobjectOutput only. Promotes a release to a specified 'Target'. (id: PromoteReleaseOperation)
repairRolloutOperationobjectOutput only. Repairs a failed 'Rollout'. (id: RepairRolloutOperation)
ruleIdstringOutput only. The ID of the automation rule that initiated the operation.
serviceAccountstringOutput only. Email address of the user-managed IAM service account that performs the operations against Cloud Deploy resources.
statestringOutput only. Current state of the AutomationRun.
stateDescriptionstringOutput only. Explains the current state of the AutomationRun. Present only when an explanation is needed.
targetIdstringOutput only. The ID of the source target that initiates the AutomationRun. The value of this field is the last segment of a target name.
timedPromoteReleaseOperationobjectOutput only. Promotes a release to a specified 'Target' as defined in a Timed Promote Release rule. (id: TimedPromoteReleaseOperation)
updateTimestring (google-datetime)Output only. Time at which the automationRun was updated.
waitUntilTimestring (google-datetime)Output only. Earliest time the AutomationRun will attempt to resume. Wait-time is configured by wait in automation rule.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deliveryPipelinesId, automationRunsIdGets details of a single AutomationRun.
listselectprojectsId, locationsId, deliveryPipelinesIdpageSize, pageToken, filter, orderByLists AutomationRuns in a given project and location.
cancelexecprojectsId, locationsId, deliveryPipelinesId, automationRunsIdCancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

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
automationRunsIdstring
deliveryPipelinesIdstring
locationsIdstring
projectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets details of a single AutomationRun.

SELECT
name,
advanceRolloutOperation,
automationId,
automationSnapshot,
createTime,
etag,
expireTime,
policyViolation,
promoteReleaseOperation,
repairRolloutOperation,
ruleId,
serviceAccount,
state,
stateDescription,
targetId,
timedPromoteReleaseOperation,
updateTime,
waitUntilTime
FROM google.clouddeploy.automation_runs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deliveryPipelinesId = '{{ deliveryPipelinesId }}' -- required
AND automationRunsId = '{{ automationRunsId }}' -- required;

Lifecycle Methods

Cancels an AutomationRun. The state of the AutomationRun after cancelling is CANCELLED. CancelAutomationRun can be called on AutomationRun in the state IN_PROGRESS and PENDING; AutomationRun in a different state returns an FAILED_PRECONDITION error.

EXEC google.clouddeploy.automation_runs.cancel 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@deliveryPipelinesId='{{ deliveryPipelinesId }}' --required,
@automationRunsId='{{ automationRunsId }}' --required;