- Resource: DeployPolicy
- DeployPolicyResourceSelector
- DeliveryPipelineAttribute
- PolicyRule
- RolloutRestriction
- Invoker
- RolloutActions
- TimeWindows
- OneTimeWindow
- Date
- TimeOfDay
- WeeklyWindow
- DayOfWeek
- Methods
Resource: DeployPolicy
A DeployPolicy
resource in the Cloud Deploy API.
A DeployPolicy
inhibits manual or automation-driven actions within a Delivery Pipeline or Target.
JSON representation |
---|
{ "name": string, "uid": string, "description": string, "annotations": { string: string, ... }, "labels": { string: string, ... }, "createTime": string, "updateTime": string, "suspended": boolean, "selectors": [ { object ( |
Fields | |
---|---|
name |
Output only. Name of the |
uid |
Output only. Unique identifier of the |
description |
Description of the |
annotations |
User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. Annotations must meet the following constraints:
See https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set for more details. An object containing a list of |
labels |
Labels are attributes that can be set and used by both the user and by Cloud Deploy. Labels must meet the following constraints:
Both keys and values are additionally constrained to be <= 128 bytes. An object containing a list of |
create |
Output only. Time at which the deploy policy was created. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
update |
Output only. Most recent time at which the deploy policy was updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
suspended |
When suspended, the policy will not prevent actions from occurring, even if the action violates the policy. |
selectors[] |
Required. Selected resources to which the policy will be applied. At least one selector is required. If one selector matches the resource the policy applies. For example, if there are two selectors and the action being attempted matches one of them, the policy will apply to that action. |
rules[] |
Required. Rules to apply. At least one rule must be present. |
etag |
The weak etag of the |
DeployPolicyResourceSelector
Contains information on the resources to select for a deploy policy. Attributes provided must all match the resource in order for policy restrictions to apply. For example, if delivery pipelines attributes given are an id "prod" and labels "foo: bar", a delivery pipeline resource must match both that id and have that label in order to be subject to the policy.
JSON representation |
---|
{ "deliveryPipeline": { object ( |
Fields | |
---|---|
delivery |
Optional. Contains attributes about a delivery pipeline. |
target |
Optional. Contains attributes about a target. |
DeliveryPipelineAttribute
Contains criteria for selecting DeliveryPipelines.
JSON representation |
---|
{ "id": string, "labels": { string: string, ... } } |
Fields | |
---|---|
id |
ID of the
|
labels |
DeliveryPipeline labels. An object containing a list of |
PolicyRule
Deploy Policy rule.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
rollout |
Rollout restrictions. |
RolloutRestriction
Rollout restrictions.
JSON representation |
---|
{ "id": string, "invokers": [ enum ( |
Fields | |
---|---|
id |
Required. Restriction rule ID. Required and must be unique within a DeployPolicy. The format is |
invokers[] |
Optional. What invoked the action. If left empty, all invoker types will be restricted. |
actions[] |
Optional. Rollout actions to be restricted as part of the policy. If left empty, all actions will be restricted. |
time |
Required. Time window within which actions are restricted. |
Invoker
What invoked the action. Filters enforcing the policy depending on what invoked the action.
Enums | |
---|---|
INVOKER_UNSPECIFIED |
Unspecified. |
USER |
The action is user-driven. For example, creating a rollout manually via a gcloud create command. |
DEPLOY_AUTOMATION |
Automated action by Cloud Deploy. |
RolloutActions
Rollout actions to be restricted as part of the policy.
Enums | |
---|---|
ROLLOUT_ACTIONS_UNSPECIFIED |
Unspecified. |
ADVANCE |
Advance the rollout to the next phase. |
APPROVE |
Approve the rollout. |
CANCEL |
Cancel the rollout. |
CREATE |
Create a rollout. |
IGNORE_JOB |
Ignore a job result on the rollout. |
RETRY_JOB |
Retry a job for a rollout. |
ROLLBACK |
Rollback a rollout. |
TERMINATE_JOBRUN |
Terminate a jobrun. |
TimeWindows
Time windows within which actions are restricted. See the documentation for more information on how to configure dates/times.
JSON representation |
---|
{ "timeZone": string, "oneTimeWindows": [ { object ( |
Fields | |
---|---|
time |
Required. The time zone in IANA format IANA Time Zone Database (e.g. America/New_York). |
one |
Optional. One-time windows within which actions are restricted. |
weekly |
Optional. Recurring weekly windows within which actions are restricted. |
OneTimeWindow
One-time window within which actions are restricted. For example, blocking actions over New Year's Eve from December 31st at 5pm to January 1st at 9am.
JSON representation |
---|
{ "startDate": { object ( |
Fields | |
---|---|
start |
Required. Start date. |
start |
Required. Start time (inclusive). Use 00:00 for the beginning of the day. |
end |
Required. End date. |
end |
Required. End time (exclusive). You may use 24:00 for the end of the day. |
Date
Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:
- A full date, with non-zero year, month, and day values.
- A month and day, with a zero year (for example, an anniversary).
- A year on its own, with a zero month and a zero day.
- A year and month, with a zero day (for example, a credit card expiration date).
Related types:
google.type.TimeOfDay
google.type.DateTime
google.protobuf.Timestamp
JSON representation |
---|
{ "year": integer, "month": integer, "day": integer } |
Fields | |
---|---|
year |
Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. |
month |
Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. |
day |
Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. |
TimeOfDay
Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date
and google.protobuf.Timestamp
.
JSON representation |
---|
{ "hours": integer, "minutes": integer, "seconds": integer, "nanos": integer } |
Fields | |
---|---|
hours |
Hours of a day in 24 hour format. Must be greater than or equal to 0 and typically must be less than or equal to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time. |
minutes |
Minutes of an hour. Must be greater than or equal to 0 and less than or equal to 59. |
seconds |
Seconds of a minute. Must be greater than or equal to 0 and typically must be less than or equal to 59. An API may allow the value 60 if it allows leap-seconds. |
nanos |
Fractions of seconds, in nanoseconds. Must be greater than or equal to 0 and less than or equal to 999,999,999. |
WeeklyWindow
Weekly windows. For example, blocking actions every Saturday and Sunday. Another example would be blocking actions every weekday from 5pm to midnight.
JSON representation |
---|
{ "daysOfWeek": [ enum ( |
Fields | |
---|---|
days |
Optional. Days of week. If left empty, all days of the week will be included. |
start |
Optional. Start time (inclusive). Use 00:00 for the beginning of the day. If you specify startTime you must also specify endTime. If left empty, this will block for the entire day for the days specified in daysOfWeek. |
end |
Optional. End time (exclusive). Use 24:00 to indicate midnight. If you specify endTime you must also specify startTime. If left empty, this will block for the entire day for the days specified in daysOfWeek. |
DayOfWeek
Represents a day of the week.
Enums | |
---|---|
DAY_OF_WEEK_UNSPECIFIED |
The day of the week is unspecified. |
MONDAY |
Monday |
TUESDAY |
Tuesday |
WEDNESDAY |
Wednesday |
THURSDAY |
Thursday |
FRIDAY |
Friday |
SATURDAY |
Saturday |
SUNDAY |
Sunday |
Methods |
|
---|---|
|
Creates a new DeployPolicy in a given project and location. |
|
Deletes a single DeployPolicy. |
|
Gets details of a single DeployPolicy. |
|
Lists DeployPolicies in a given project and location. |
|
Updates the parameters of a single DeployPolicy. |