Skip to main content

rollouts

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

Overview

Namerollouts
TypeResource
Idgoogle.clouddeploy.rollouts

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the Rollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}. The rollout component must match [a-z]([a-z0-9-]{0,61}[a-z0-9])?
activeRepairAutomationRunstringOutput only. The AutomationRun actively repairing the rollout.
annotationsobjectOptional. User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
approvalStatestringOutput only. Approval state of the Rollout.
approveTimestring (google-datetime)Output only. Time at which the Rollout was approved.
controllerRolloutstringOutput only. Name of the ControllerRollout. Format is projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}.
createTimestring (google-datetime)Output only. Time at which the Rollout was created.
deployEndTimestring (google-datetime)Output only. Time at which the Rollout finished deploying.
deployFailureCausestringOutput only. The reason this rollout failed. This will always be unspecified while the rollout is in progress.
deployStartTimestring (google-datetime)Output only. Time at which the Rollout started deploying.
deployingBuildstringOutput only. The resource name of the Cloud Build Build object that is used to deploy the Rollout. Format is projects/{project}/locations/{location}/builds/{build}.
descriptionstringOptional. Description of the Rollout for user purposes. Max length is 255 characters.
enqueueTimestring (google-datetime)Output only. Time at which the Rollout was enqueued.
etagstringThis 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.
failureReasonstringOutput only. Additional information about the rollout failure, if available.
labelsobjectLabels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
metadataobjectOutput only. Metadata contains information about the rollout. (id: Metadata)
phasesarrayOutput only. The phases that represent the workflows of this Rollout.
rollbackOfRolloutstringOutput only. Name of the Rollout that is rolled back by this Rollout. Empty if this Rollout wasn't created as a rollback.
rolledBackByRolloutsarrayOutput only. Names of Rollouts that rolled back this Rollout.
statestringOutput only. Current state of the Rollout.
targetIdstringRequired. The ID of Target to which this Rollout is deploying.
uidstringOutput only. Unique identifier of the Rollout.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdGets details of a single Rollout.
listselectprojectsId, locationsId, deliveryPipelinesId, releasesIdpageSize, pageToken, filter, orderByLists Rollouts in a given project and location.
createinsertprojectsId, locationsId, deliveryPipelinesId, releasesIdrolloutId, requestId, validateOnly, overrideDeployPolicy, startingPhaseIdCreates a new Rollout in a given project and location.
approveexecprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdApproves a Rollout.
advanceexecprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdAdvances a Rollout in a given project and location.
cancelexecprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdCancels a Rollout in a given project and location.
ignore_jobexecprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdIgnores the specified Job in a Rollout.
retry_jobexecprojectsId, locationsId, deliveryPipelinesId, releasesId, rolloutsIdRetries the specified Job in a Rollout.

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
deliveryPipelinesIdstring
locationsIdstring
projectsIdstring
releasesIdstring
rolloutsIdstring
filterstring
orderBystring
overrideDeployPolicystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
rolloutIdstring
startingPhaseIdstring
validateOnlyboolean

SELECT examples

Gets details of a single Rollout.

SELECT
name,
activeRepairAutomationRun,
annotations,
approvalState,
approveTime,
controllerRollout,
createTime,
deployEndTime,
deployFailureCause,
deployStartTime,
deployingBuild,
description,
enqueueTime,
etag,
failureReason,
labels,
metadata,
phases,
rollbackOfRollout,
rolledBackByRollouts,
state,
targetId,
uid
FROM google.clouddeploy.rollouts
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND deliveryPipelinesId = '{{ deliveryPipelinesId }}' -- required
AND releasesId = '{{ releasesId }}' -- required
AND rolloutsId = '{{ rolloutsId }}' -- required;

INSERT examples

Creates a new Rollout in a given project and location.

INSERT INTO google.clouddeploy.rollouts (
data__name,
data__description,
data__annotations,
data__labels,
data__targetId,
data__etag,
projectsId,
locationsId,
deliveryPipelinesId,
releasesId,
rolloutId,
requestId,
validateOnly,
overrideDeployPolicy,
startingPhaseId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ annotations }}',
'{{ labels }}',
'{{ targetId }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ deliveryPipelinesId }}',
'{{ releasesId }}',
'{{ rolloutId }}',
'{{ requestId }}',
'{{ validateOnly }}',
'{{ overrideDeployPolicy }}',
'{{ startingPhaseId }}'
RETURNING
name,
done,
error,
metadata,
response
;

Lifecycle Methods

Approves a Rollout.

EXEC google.clouddeploy.rollouts.approve 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@deliveryPipelinesId='{{ deliveryPipelinesId }}' --required,
@releasesId='{{ releasesId }}' --required,
@rolloutsId='{{ rolloutsId }}' --required
@@json=
'{
"approved": {{ approved }},
"overrideDeployPolicy": "{{ overrideDeployPolicy }}"
}';