cloud_deploy.proto 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.deploy.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/longrunning/operations.proto";
  21. import "google/protobuf/duration.proto";
  22. import "google/protobuf/field_mask.proto";
  23. import "google/protobuf/timestamp.proto";
  24. import "google/type/date.proto";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/deploy/v1;deploy";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "CloudDeployProto";
  28. option java_package = "com.google.cloud.deploy.v1";
  29. option (google.api.resource_definition) = {
  30. type: "cloudbuild.googleapis.com/Build"
  31. pattern: "projects/{project}/locations/{location}/builds/{build}"
  32. };
  33. option (google.api.resource_definition) = {
  34. type: "container.googleapis.com/Cluster"
  35. pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
  36. };
  37. option (google.api.resource_definition) = {
  38. type: "clouddeploy.googleapis.com/Operation"
  39. pattern: "projects/{project}/locations/{location}/operations/{operation}"
  40. };
  41. option (google.api.resource_definition) = {
  42. type: "cloudbuild.googleapis.com/WorkerPool"
  43. pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}"
  44. };
  45. option (google.api.resource_definition) = {
  46. type: "gkehub.googleapis.com/Membership"
  47. pattern: "projects/{project}/locations/{location}/memberships/{membership}"
  48. };
  49. // CloudDeploy service creates and manages Continuous Delivery operations
  50. // on Google Cloud Platform via Skaffold (https://skaffold.dev).
  51. service CloudDeploy {
  52. option (google.api.default_host) = "clouddeploy.googleapis.com";
  53. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  54. // Lists DeliveryPipelines in a given project and location.
  55. rpc ListDeliveryPipelines(ListDeliveryPipelinesRequest) returns (ListDeliveryPipelinesResponse) {
  56. option (google.api.http) = {
  57. get: "/v1/{parent=projects/*/locations/*}/deliveryPipelines"
  58. };
  59. option (google.api.method_signature) = "parent";
  60. }
  61. // Gets details of a single DeliveryPipeline.
  62. rpc GetDeliveryPipeline(GetDeliveryPipelineRequest) returns (DeliveryPipeline) {
  63. option (google.api.http) = {
  64. get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}"
  65. };
  66. option (google.api.method_signature) = "name";
  67. }
  68. // Creates a new DeliveryPipeline in a given project and location.
  69. rpc CreateDeliveryPipeline(CreateDeliveryPipelineRequest) returns (google.longrunning.Operation) {
  70. option (google.api.http) = {
  71. post: "/v1/{parent=projects/*/locations/*}/deliveryPipelines"
  72. body: "delivery_pipeline"
  73. };
  74. option (google.api.method_signature) = "parent,delivery_pipeline,delivery_pipeline_id";
  75. option (google.longrunning.operation_info) = {
  76. response_type: "DeliveryPipeline"
  77. metadata_type: "OperationMetadata"
  78. };
  79. }
  80. // Updates the parameters of a single DeliveryPipeline.
  81. rpc UpdateDeliveryPipeline(UpdateDeliveryPipelineRequest) returns (google.longrunning.Operation) {
  82. option (google.api.http) = {
  83. patch: "/v1/{delivery_pipeline.name=projects/*/locations/*/deliveryPipelines/*}"
  84. body: "delivery_pipeline"
  85. };
  86. option (google.api.method_signature) = "delivery_pipeline,update_mask";
  87. option (google.longrunning.operation_info) = {
  88. response_type: "DeliveryPipeline"
  89. metadata_type: "OperationMetadata"
  90. };
  91. }
  92. // Deletes a single DeliveryPipeline.
  93. rpc DeleteDeliveryPipeline(DeleteDeliveryPipelineRequest) returns (google.longrunning.Operation) {
  94. option (google.api.http) = {
  95. delete: "/v1/{name=projects/*/locations/*/deliveryPipelines/*}"
  96. };
  97. option (google.api.method_signature) = "name";
  98. option (google.longrunning.operation_info) = {
  99. response_type: "google.protobuf.Empty"
  100. metadata_type: "OperationMetadata"
  101. };
  102. }
  103. // Lists Targets in a given project and location.
  104. rpc ListTargets(ListTargetsRequest) returns (ListTargetsResponse) {
  105. option (google.api.http) = {
  106. get: "/v1/{parent=projects/*/locations/*}/targets"
  107. };
  108. option (google.api.method_signature) = "parent";
  109. }
  110. // Gets details of a single Target.
  111. rpc GetTarget(GetTargetRequest) returns (Target) {
  112. option (google.api.http) = {
  113. get: "/v1/{name=projects/*/locations/*/targets/*}"
  114. };
  115. option (google.api.method_signature) = "name";
  116. }
  117. // Creates a new Target in a given project and location.
  118. rpc CreateTarget(CreateTargetRequest) returns (google.longrunning.Operation) {
  119. option (google.api.http) = {
  120. post: "/v1/{parent=projects/*/locations/*}/targets"
  121. body: "target"
  122. };
  123. option (google.api.method_signature) = "parent,target,target_id";
  124. option (google.longrunning.operation_info) = {
  125. response_type: "Target"
  126. metadata_type: "OperationMetadata"
  127. };
  128. }
  129. // Updates the parameters of a single Target.
  130. rpc UpdateTarget(UpdateTargetRequest) returns (google.longrunning.Operation) {
  131. option (google.api.http) = {
  132. patch: "/v1/{target.name=projects/*/locations/*/targets/*}"
  133. body: "target"
  134. };
  135. option (google.api.method_signature) = "target,update_mask";
  136. option (google.longrunning.operation_info) = {
  137. response_type: "Target"
  138. metadata_type: "OperationMetadata"
  139. };
  140. }
  141. // Deletes a single Target.
  142. rpc DeleteTarget(DeleteTargetRequest) returns (google.longrunning.Operation) {
  143. option (google.api.http) = {
  144. delete: "/v1/{name=projects/*/locations/*/targets/*}"
  145. };
  146. option (google.api.method_signature) = "name";
  147. option (google.longrunning.operation_info) = {
  148. response_type: "google.protobuf.Empty"
  149. metadata_type: "OperationMetadata"
  150. };
  151. }
  152. // Lists Releases in a given project and location.
  153. rpc ListReleases(ListReleasesRequest) returns (ListReleasesResponse) {
  154. option (google.api.http) = {
  155. get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases"
  156. };
  157. option (google.api.method_signature) = "parent";
  158. }
  159. // Gets details of a single Release.
  160. rpc GetRelease(GetReleaseRequest) returns (Release) {
  161. option (google.api.http) = {
  162. get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}"
  163. };
  164. option (google.api.method_signature) = "name";
  165. }
  166. // Creates a new Release in a given project and location.
  167. rpc CreateRelease(CreateReleaseRequest) returns (google.longrunning.Operation) {
  168. option (google.api.http) = {
  169. post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*}/releases"
  170. body: "release"
  171. };
  172. option (google.api.method_signature) = "parent,release,release_id";
  173. option (google.longrunning.operation_info) = {
  174. response_type: "Release"
  175. metadata_type: "OperationMetadata"
  176. };
  177. }
  178. // Abandons a Release in the Delivery Pipeline.
  179. rpc AbandonRelease(AbandonReleaseRequest) returns (AbandonReleaseResponse) {
  180. option (google.api.http) = {
  181. post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*}:abandon"
  182. body: "*"
  183. };
  184. option (google.api.method_signature) = "name";
  185. }
  186. // Approves a Rollout.
  187. rpc ApproveRollout(ApproveRolloutRequest) returns (ApproveRolloutResponse) {
  188. option (google.api.http) = {
  189. post: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:approve"
  190. body: "*"
  191. };
  192. option (google.api.method_signature) = "name";
  193. }
  194. // Lists Rollouts in a given project and location.
  195. rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) {
  196. option (google.api.http) = {
  197. get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts"
  198. };
  199. option (google.api.method_signature) = "parent";
  200. }
  201. // Gets details of a single Rollout.
  202. rpc GetRollout(GetRolloutRequest) returns (Rollout) {
  203. option (google.api.http) = {
  204. get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}"
  205. };
  206. option (google.api.method_signature) = "name";
  207. }
  208. // Creates a new Rollout in a given project and location.
  209. rpc CreateRollout(CreateRolloutRequest) returns (google.longrunning.Operation) {
  210. option (google.api.http) = {
  211. post: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*}/rollouts"
  212. body: "rollout"
  213. };
  214. option (google.api.method_signature) = "parent,rollout,rollout_id";
  215. option (google.longrunning.operation_info) = {
  216. response_type: "Rollout"
  217. metadata_type: "OperationMetadata"
  218. };
  219. }
  220. // Retries the specified Job in a Rollout.
  221. rpc RetryJob(RetryJobRequest) returns (RetryJobResponse) {
  222. option (google.api.http) = {
  223. post: "/v1/{rollout=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}:retryJob"
  224. body: "*"
  225. };
  226. option (google.api.method_signature) = "rollout,phase_id,job_id";
  227. }
  228. // Lists JobRuns in a given project and location.
  229. rpc ListJobRuns(ListJobRunsRequest) returns (ListJobRunsResponse) {
  230. option (google.api.http) = {
  231. get: "/v1/{parent=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*}/jobRuns"
  232. };
  233. option (google.api.method_signature) = "parent";
  234. }
  235. // Gets details of a single JobRun.
  236. rpc GetJobRun(GetJobRunRequest) returns (JobRun) {
  237. option (google.api.http) = {
  238. get: "/v1/{name=projects/*/locations/*/deliveryPipelines/*/releases/*/rollouts/*/jobRuns/*}"
  239. };
  240. option (google.api.method_signature) = "name";
  241. }
  242. // Gets the configuration for a location.
  243. rpc GetConfig(GetConfigRequest) returns (Config) {
  244. option (google.api.http) = {
  245. get: "/v1/{name=projects/*/locations/*/config}"
  246. };
  247. option (google.api.method_signature) = "name";
  248. }
  249. }
  250. // A `DeliveryPipeline` resource in the Google Cloud Deploy API.
  251. //
  252. // A `DeliveryPipeline` defines a pipeline through which a Skaffold
  253. // configuration can progress.
  254. message DeliveryPipeline {
  255. option (google.api.resource) = {
  256. type: "clouddeploy.googleapis.com/DeliveryPipeline"
  257. pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}"
  258. };
  259. // Optional. Name of the `DeliveryPipeline`. Format is projects/{project}/
  260. // locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}.
  261. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  262. // Output only. Unique identifier of the `DeliveryPipeline`.
  263. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  264. // Description of the `DeliveryPipeline`. Max length is 255 characters.
  265. string description = 3;
  266. // User annotations. These attributes can only be set and used by the
  267. // user, and not by Google Cloud Deploy.
  268. map<string, string> annotations = 4;
  269. // Labels are attributes that can be set and used by both the
  270. // user and by Google Cloud Deploy. Labels must meet the following
  271. // constraints:
  272. //
  273. // * Keys and values can contain only lowercase letters, numeric characters,
  274. // underscores, and dashes.
  275. // * All characters must use UTF-8 encoding, and international characters are
  276. // allowed.
  277. // * Keys must start with a lowercase letter or international character.
  278. // * Each resource is limited to a maximum of 64 labels.
  279. //
  280. // Both keys and values are additionally constrained to be <= 128 bytes.
  281. map<string, string> labels = 5;
  282. // Output only. Time at which the pipeline was created.
  283. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  284. // Output only. Most recent time at which the pipeline was updated.
  285. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  286. // The ordering configuration of the `DeliveryPipeline`.
  287. oneof pipeline {
  288. // SerialPipeline defines a sequential set of stages for a
  289. // `DeliveryPipeline`.
  290. SerialPipeline serial_pipeline = 8;
  291. }
  292. // Output only. Information around the state of the Delivery Pipeline.
  293. PipelineCondition condition = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  294. // This checksum is computed by the server based on the value of other
  295. // fields, and may be sent on update and delete requests to ensure the
  296. // client has an up-to-date value before proceeding.
  297. string etag = 10;
  298. // When suspended, no new releases or rollouts can be created,
  299. // but in-progress ones will complete.
  300. bool suspended = 12;
  301. }
  302. // SerialPipeline defines a sequential set of stages for a `DeliveryPipeline`.
  303. message SerialPipeline {
  304. // Each stage specifies configuration for a `Target`. The ordering
  305. // of this list defines the promotion flow.
  306. repeated Stage stages = 1;
  307. }
  308. // Stage specifies a location to which to deploy.
  309. message Stage {
  310. // The target_id to which this stage points. This field refers exclusively to
  311. // the last segment of a target name. For example, this field would just be
  312. // `my-target` (rather than
  313. // `projects/project/locations/location/targets/my-target`). The location of
  314. // the `Target` is inferred to be the same as the location of the
  315. // `DeliveryPipeline` that contains this `Stage`.
  316. string target_id = 1;
  317. // Skaffold profiles to use when rendering the manifest for this stage's
  318. // `Target`.
  319. repeated string profiles = 2;
  320. // Optional. The strategy to use for a `Rollout` to this stage.
  321. Strategy strategy = 5 [(google.api.field_behavior) = OPTIONAL];
  322. }
  323. // Strategy contains deployment strategy information.
  324. message Strategy {
  325. // Deployment strategy details.
  326. oneof deployment_strategy {
  327. // Standard deployment strategy executes a single deploy and allows
  328. // verifying the deployment.
  329. Standard standard = 1;
  330. }
  331. }
  332. // Standard represents the standard deployment strategy.
  333. message Standard {
  334. // Whether to verify a deployment.
  335. bool verify = 1;
  336. }
  337. // PipelineReadyCondition contains information around the status of the
  338. // Pipeline.
  339. message PipelineReadyCondition {
  340. // True if the Pipeline is in a valid state. Otherwise at least one condition
  341. // in `PipelineCondition` is in an invalid state. Iterate over those
  342. // conditions and see which condition(s) has status = false to find out what
  343. // is wrong with the Pipeline.
  344. bool status = 3;
  345. // Last time the condition was updated.
  346. google.protobuf.Timestamp update_time = 4;
  347. }
  348. // TargetsPresentCondition contains information on any Targets defined in
  349. // the Delivery Pipeline that do not actually exist.
  350. message TargetsPresentCondition {
  351. // True if there aren't any missing Targets.
  352. bool status = 1;
  353. // The list of Target names that are missing. For example,
  354. // projects/{project_id}/locations/{location_name}/targets/{target_name}.
  355. repeated string missing_targets = 2 [(google.api.resource_reference) = {
  356. type: "clouddeploy.googleapis.com/Target"
  357. }];
  358. // Last time the condition was updated.
  359. google.protobuf.Timestamp update_time = 4;
  360. }
  361. // PipelineCondition contains all conditions relevant to a Delivery Pipeline.
  362. message PipelineCondition {
  363. // Details around the Pipeline's overall status.
  364. PipelineReadyCondition pipeline_ready_condition = 1;
  365. // Detalis around targets enumerated in the pipeline.
  366. TargetsPresentCondition targets_present_condition = 3;
  367. }
  368. // The request object for `ListDeliveryPipelines`.
  369. message ListDeliveryPipelinesRequest {
  370. // Required. The parent, which owns this collection of pipelines. Format must be
  371. // projects/{project_id}/locations/{location_name}.
  372. string parent = 1 [
  373. (google.api.field_behavior) = REQUIRED,
  374. (google.api.resource_reference) = {
  375. child_type: "clouddeploy.googleapis.com/DeliveryPipeline"
  376. }
  377. ];
  378. // The maximum number of pipelines to return. The service may return
  379. // fewer than this value. If unspecified, at most 50 pipelines will
  380. // be returned. The maximum value is 1000; values above 1000 will be set
  381. // to 1000.
  382. int32 page_size = 2;
  383. // A page token, received from a previous `ListDeliveryPipelines` call.
  384. // Provide this to retrieve the subsequent page.
  385. //
  386. // When paginating, all other provided parameters match
  387. // the call that provided the page token.
  388. string page_token = 3;
  389. // Filter pipelines to be returned. See https://google.aip.dev/160 for more
  390. // details.
  391. string filter = 4;
  392. // Field to sort by. See https://google.aip.dev/132#ordering for more details.
  393. string order_by = 5;
  394. }
  395. // The response object from `ListDeliveryPipelines`.
  396. message ListDeliveryPipelinesResponse {
  397. // The `DeliveryPipeline` objects.
  398. repeated DeliveryPipeline delivery_pipelines = 1;
  399. // A token, which can be sent as `page_token` to retrieve the next page.
  400. // If this field is omitted, there are no subsequent pages.
  401. string next_page_token = 2;
  402. // Locations that could not be reached.
  403. repeated string unreachable = 3;
  404. }
  405. // The request object for `GetDeliveryPipeline`
  406. message GetDeliveryPipelineRequest {
  407. // Required. Name of the `DeliveryPipeline`. Format must be
  408. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
  409. string name = 1 [
  410. (google.api.field_behavior) = REQUIRED,
  411. (google.api.resource_reference) = {
  412. type: "clouddeploy.googleapis.com/DeliveryPipeline"
  413. }
  414. ];
  415. }
  416. // The request object for `CreateDeliveryPipeline`.
  417. message CreateDeliveryPipelineRequest {
  418. // Required. The parent collection in which the `DeliveryPipeline` should be created.
  419. // Format should be projects/{project_id}/locations/{location_name}.
  420. string parent = 1 [
  421. (google.api.field_behavior) = REQUIRED,
  422. (google.api.resource_reference) = {
  423. child_type: "clouddeploy.googleapis.com/DeliveryPipeline"
  424. }
  425. ];
  426. // Required. ID of the `DeliveryPipeline`.
  427. string delivery_pipeline_id = 2 [(google.api.field_behavior) = REQUIRED];
  428. // Required. The `DeliveryPipeline` to create.
  429. DeliveryPipeline delivery_pipeline = 3 [(google.api.field_behavior) = REQUIRED];
  430. // Optional. A request ID to identify requests. Specify a unique request ID
  431. // so that if you must retry your request, the server will know to ignore
  432. // the request if it has already been completed. The server will guarantee
  433. // that for at least 60 minutes since the first request.
  434. //
  435. // For example, consider a situation where you make an initial request and the
  436. // request times out. If you make the request again with the same request ID,
  437. // the server can check if original operation with the same request ID was
  438. // received, and if so, will ignore the second request. This prevents clients
  439. // from accidentally creating duplicate commitments.
  440. //
  441. // The request ID must be a valid UUID with the exception that zero UUID is
  442. // not supported (00000000-0000-0000-0000-000000000000).
  443. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  444. // Optional. If set to true, the request is validated and the user is provided with
  445. // an expected result, but no actual change is made.
  446. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
  447. }
  448. // The request object for `UpdateDeliveryPipeline`.
  449. message UpdateDeliveryPipelineRequest {
  450. // Required. Field mask is used to specify the fields to be overwritten in the
  451. // `DeliveryPipeline` resource by the update.
  452. // The fields specified in the update_mask are relative to the resource, not
  453. // the full request. A field will be overwritten if it is in the mask. If the
  454. // user does not provide a mask then all fields will be overwritten.
  455. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  456. // Required. The `DeliveryPipeline` to update.
  457. DeliveryPipeline delivery_pipeline = 2 [(google.api.field_behavior) = REQUIRED];
  458. // Optional. A request ID to identify requests. Specify a unique request ID
  459. // so that if you must retry your request, the server will know to ignore
  460. // the request if it has already been completed. The server will guarantee
  461. // that for at least 60 minutes since the first request.
  462. //
  463. // For example, consider a situation where you make an initial request and the
  464. // request times out. If you make the request again with the same request ID,
  465. // the server can check if original operation with the same request ID was
  466. // received, and if so, will ignore the second request. This prevents clients
  467. // from accidentally creating duplicate commitments.
  468. //
  469. // The request ID must be a valid UUID with the exception that zero UUID is
  470. // not supported (00000000-0000-0000-0000-000000000000).
  471. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  472. // Optional. If set to true, updating a `DeliveryPipeline` that does not exist will
  473. // result in the creation of a new `DeliveryPipeline`.
  474. bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
  475. // Optional. If set to true, the request is validated and the user is provided with
  476. // an expected result, but no actual change is made.
  477. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
  478. }
  479. // The request object for `DeleteDeliveryPipeline`.
  480. message DeleteDeliveryPipelineRequest {
  481. // Required. The name of the `DeliveryPipeline` to delete. Format should be
  482. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
  483. string name = 1 [
  484. (google.api.field_behavior) = REQUIRED,
  485. (google.api.resource_reference) = {
  486. type: "clouddeploy.googleapis.com/DeliveryPipeline"
  487. }
  488. ];
  489. // Optional. A request ID to identify requests. Specify a unique request ID
  490. // so that if you must retry your request, the server will know to ignore
  491. // the request if it has already been completed. The server will guarantee
  492. // that for at least 60 minutes after the first request.
  493. //
  494. // For example, consider a situation where you make an initial request and the
  495. // request times out. If you make the request again with the same request ID,
  496. // the server can check if original operation with the same request ID was
  497. // received, and if so, will ignore the second request. This prevents clients
  498. // from accidentally creating duplicate commitments.
  499. //
  500. // The request ID must be a valid UUID with the exception that zero UUID is
  501. // not supported (00000000-0000-0000-0000-000000000000).
  502. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  503. // Optional. If set to true, then deleting an already deleted or non-existing
  504. // `DeliveryPipeline` will succeed.
  505. bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];
  506. // Optional. If set, validate the request and preview the review, but do not actually
  507. // post it.
  508. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
  509. // Optional. If set to true, all child resources under this pipeline will also be
  510. // deleted. Otherwise, the request will only work if the pipeline has
  511. // no child resources.
  512. bool force = 6 [(google.api.field_behavior) = OPTIONAL];
  513. // Optional. This checksum is computed by the server based on the value of other
  514. // fields, and may be sent on update and delete requests to ensure the
  515. // client has an up-to-date value before proceeding.
  516. string etag = 5 [(google.api.field_behavior) = OPTIONAL];
  517. }
  518. // A `Target` resource in the Google Cloud Deploy API.
  519. //
  520. // A `Target` defines a location to which a Skaffold configuration
  521. // can be deployed.
  522. message Target {
  523. option (google.api.resource) = {
  524. type: "clouddeploy.googleapis.com/Target"
  525. pattern: "projects/{project}/locations/{location}/targets/{target}"
  526. };
  527. // Optional. Name of the `Target`. Format is
  528. // projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}.
  529. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  530. // Output only. Resource id of the `Target`.
  531. string target_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  532. // Output only. Unique identifier of the `Target`.
  533. string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  534. // Optional. Description of the `Target`. Max length is 255 characters.
  535. string description = 4 [(google.api.field_behavior) = OPTIONAL];
  536. // Optional. User annotations. These attributes can only be set and used by the
  537. // user, and not by Google Cloud Deploy. See
  538. // https://google.aip.dev/128#annotations for more details such as format and
  539. // size limitations.
  540. map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL];
  541. // Optional. Labels are attributes that can be set and used by both the
  542. // user and by Google Cloud Deploy. Labels must meet the following
  543. // constraints:
  544. //
  545. // * Keys and values can contain only lowercase letters, numeric characters,
  546. // underscores, and dashes.
  547. // * All characters must use UTF-8 encoding, and international characters are
  548. // allowed.
  549. // * Keys must start with a lowercase letter or international character.
  550. // * Each resource is limited to a maximum of 64 labels.
  551. //
  552. // Both keys and values are additionally constrained to be <= 128 bytes.
  553. map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
  554. // Optional. Whether or not the `Target` requires approval.
  555. bool require_approval = 13 [(google.api.field_behavior) = OPTIONAL];
  556. // Output only. Time at which the `Target` was created.
  557. google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  558. // Output only. Most recent time at which the `Target` was updated.
  559. google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  560. // Destination to which the Skaffold configuration is applied during a
  561. // rollout.
  562. oneof deployment_target {
  563. // Information specifying a GKE Cluster.
  564. GkeCluster gke = 15;
  565. // Information specifying an Anthos Cluster.
  566. AnthosCluster anthos_cluster = 17;
  567. // Information specifying a Cloud Run deployment target.
  568. CloudRunLocation run = 18;
  569. }
  570. // Optional. This checksum is computed by the server based on the value of other
  571. // fields, and may be sent on update and delete requests to ensure the
  572. // client has an up-to-date value before proceeding.
  573. string etag = 12 [(google.api.field_behavior) = OPTIONAL];
  574. // Configurations for all execution that relates to this `Target`.
  575. // Each `ExecutionEnvironmentUsage` value may only be used in a single
  576. // configuration; using the same value multiple times is an error.
  577. // When one or more configurations are specified, they must include the
  578. // `RENDER` and `DEPLOY` `ExecutionEnvironmentUsage` values.
  579. // When no configurations are specified, execution will use the default
  580. // specified in `DefaultPool`.
  581. repeated ExecutionConfig execution_configs = 16;
  582. }
  583. // Configuration of the environment to use when calling Skaffold.
  584. message ExecutionConfig {
  585. // Possible usages of this configuration.
  586. enum ExecutionEnvironmentUsage {
  587. // Default value. This value is unused.
  588. EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0;
  589. // Use for rendering.
  590. RENDER = 1;
  591. // Use for deploying and deployment hooks.
  592. DEPLOY = 2;
  593. // Use for deployment verification.
  594. VERIFY = 3;
  595. }
  596. // Required. Usages when this configuration should be applied.
  597. repeated ExecutionEnvironmentUsage usages = 1 [(google.api.field_behavior) = REQUIRED];
  598. // Details of the environment.
  599. oneof execution_environment {
  600. // Optional. Use default Cloud Build pool.
  601. DefaultPool default_pool = 2 [(google.api.field_behavior) = OPTIONAL];
  602. // Optional. Use private Cloud Build pool.
  603. PrivatePool private_pool = 3 [(google.api.field_behavior) = OPTIONAL];
  604. }
  605. // Optional. The resource name of the `WorkerPool`, with the format
  606. // `projects/{project}/locations/{location}/workerPools/{worker_pool}`.
  607. // If this optional field is unspecified, the default Cloud Build pool will be
  608. // used.
  609. string worker_pool = 4 [
  610. (google.api.field_behavior) = OPTIONAL,
  611. (google.api.resource_reference) = {
  612. type: "cloudbuild.googleapis.com/WorkerPool"
  613. }
  614. ];
  615. // Optional. Google service account to use for execution. If unspecified,
  616. // the project execution service account
  617. // (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) is used.
  618. string service_account = 5 [(google.api.field_behavior) = OPTIONAL];
  619. // Optional. Cloud Storage location in which to store execution outputs. This can
  620. // either be a bucket ("gs://my-bucket") or a path within a bucket
  621. // ("gs://my-bucket/my-dir").
  622. // If unspecified, a default bucket located in the same region will be used.
  623. string artifact_storage = 6 [(google.api.field_behavior) = OPTIONAL];
  624. // Optional. Execution timeout for a Cloud Build Execution. This must be between 10m and
  625. // 24h in seconds format.
  626. // If unspecified, a default timeout of 1h is used.
  627. google.protobuf.Duration execution_timeout = 7 [(google.api.field_behavior) = OPTIONAL];
  628. }
  629. // Execution using the default Cloud Build pool.
  630. message DefaultPool {
  631. // Optional. Google service account to use for execution. If unspecified,
  632. // the project execution service account
  633. // (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
  634. string service_account = 1 [(google.api.field_behavior) = OPTIONAL];
  635. // Optional. Cloud Storage location where execution outputs should be stored. This can
  636. // either be a bucket ("gs://my-bucket") or a path within a bucket
  637. // ("gs://my-bucket/my-dir").
  638. // If unspecified, a default bucket located in the same region will be used.
  639. string artifact_storage = 2 [(google.api.field_behavior) = OPTIONAL];
  640. }
  641. // Execution using a private Cloud Build pool.
  642. message PrivatePool {
  643. // Required. Resource name of the Cloud Build worker pool to use. The format is
  644. // `projects/{project}/locations/{location}/workerPools/{pool}`.
  645. string worker_pool = 1 [
  646. (google.api.field_behavior) = REQUIRED,
  647. (google.api.resource_reference) = {
  648. type: "cloudbuild.googleapis.com/WorkerPool"
  649. }
  650. ];
  651. // Optional. Google service account to use for execution. If unspecified,
  652. // the project execution service account
  653. // (<PROJECT_NUMBER>-compute@developer.gserviceaccount.com) will be used.
  654. string service_account = 2 [(google.api.field_behavior) = OPTIONAL];
  655. // Optional. Cloud Storage location where execution outputs should be stored. This can
  656. // either be a bucket ("gs://my-bucket") or a path within a bucket
  657. // ("gs://my-bucket/my-dir").
  658. // If unspecified, a default bucket located in the same region will be used.
  659. string artifact_storage = 3 [(google.api.field_behavior) = OPTIONAL];
  660. }
  661. // Information specifying a GKE Cluster.
  662. message GkeCluster {
  663. // Information specifying a GKE Cluster. Format is
  664. // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}.
  665. string cluster = 1 [(google.api.resource_reference) = {
  666. type: "container.googleapis.com/Cluster"
  667. }];
  668. // Optional. If true, `cluster` is accessed using the private IP address of the control
  669. // plane endpoint. Otherwise, the default IP address of the control plane
  670. // endpoint is used. The default IP address is the private IP address for
  671. // clusters with private control-plane endpoints and the public IP address
  672. // otherwise.
  673. //
  674. // Only specify this option when `cluster` is a [private GKE
  675. // cluster](https://cloud.google.com/kubernetes-engine/docs/concepts/private-cluster-concept).
  676. bool internal_ip = 2 [(google.api.field_behavior) = OPTIONAL];
  677. }
  678. // Information specifying an Anthos Cluster.
  679. message AnthosCluster {
  680. // Membership of the GKE Hub-registered cluster to which to apply the Skaffold
  681. // configuration. Format is
  682. // `projects/{project}/locations/{location}/memberships/{membership_name}`.
  683. string membership = 1 [(google.api.resource_reference) = {
  684. type: "gkehub.googleapis.com/Membership"
  685. }];
  686. }
  687. // Information specifying where to deploy a Cloud Run Service.
  688. message CloudRunLocation {
  689. // Required. The location for the Cloud Run Service. Format must be
  690. // `projects/{project}/locations/{location}`.
  691. string location = 1 [
  692. (google.api.field_behavior) = REQUIRED,
  693. (google.api.resource_reference) = {
  694. type: "locations.googleapis.com/Location"
  695. }
  696. ];
  697. }
  698. // The request object for `ListTargets`.
  699. message ListTargetsRequest {
  700. // Required. The parent, which owns this collection of targets. Format must be
  701. // projects/{project_id}/locations/{location_name}.
  702. string parent = 1 [
  703. (google.api.field_behavior) = REQUIRED,
  704. (google.api.resource_reference) = {
  705. child_type: "clouddeploy.googleapis.com/Target"
  706. }
  707. ];
  708. // Optional. The maximum number of `Target` objects to return. The service may return
  709. // fewer than this value. If unspecified, at most 50 `Target` objects will be
  710. // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  711. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  712. // Optional. A page token, received from a previous `ListTargets` call.
  713. // Provide this to retrieve the subsequent page.
  714. //
  715. // When paginating, all other provided parameters match
  716. // the call that provided the page token.
  717. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  718. // Optional. Filter targets to be returned. See https://google.aip.dev/160 for more
  719. // details.
  720. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  721. // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  722. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  723. }
  724. // The response object from `ListTargets`.
  725. message ListTargetsResponse {
  726. // The `Target` objects.
  727. repeated Target targets = 1;
  728. // A token, which can be sent as `page_token` to retrieve the next page.
  729. // If this field is omitted, there are no subsequent pages.
  730. string next_page_token = 2;
  731. // Locations that could not be reached.
  732. repeated string unreachable = 3;
  733. }
  734. // The request object for `GetTarget`.
  735. message GetTargetRequest {
  736. // Required. Name of the `Target`. Format must be
  737. // projects/{project_id}/locations/{location_name}/targets/{target_name}.
  738. string name = 1 [
  739. (google.api.field_behavior) = REQUIRED,
  740. (google.api.resource_reference) = {
  741. type: "clouddeploy.googleapis.com/Target"
  742. }
  743. ];
  744. }
  745. // The request object for `CreateTarget`.
  746. message CreateTargetRequest {
  747. // Required. The parent collection in which the `Target` should be created.
  748. // Format should be
  749. // projects/{project_id}/locations/{location_name}.
  750. string parent = 1 [
  751. (google.api.field_behavior) = REQUIRED,
  752. (google.api.resource_reference) = {
  753. child_type: "clouddeploy.googleapis.com/Target"
  754. }
  755. ];
  756. // Required. ID of the `Target`.
  757. string target_id = 2 [(google.api.field_behavior) = REQUIRED];
  758. // Required. The `Target` to create.
  759. Target target = 3 [(google.api.field_behavior) = REQUIRED];
  760. // Optional. A request ID to identify requests. Specify a unique request ID
  761. // so that if you must retry your request, the server will know to ignore
  762. // the request if it has already been completed. The server will guarantee
  763. // that for at least 60 minutes since the first request.
  764. //
  765. // For example, consider a situation where you make an initial request and the
  766. // request times out. If you make the request again with the same request ID,
  767. // the server can check if original operation with the same request ID was
  768. // received, and if so, will ignore the second request. This prevents clients
  769. // from accidentally creating duplicate commitments.
  770. //
  771. // The request ID must be a valid UUID with the exception that zero UUID is
  772. // not supported (00000000-0000-0000-0000-000000000000).
  773. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  774. // Optional. If set to true, the request is validated and the user is provided with
  775. // an expected result, but no actual change is made.
  776. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
  777. }
  778. // The request object for `UpdateTarget`.
  779. message UpdateTargetRequest {
  780. // Required. Field mask is used to specify the fields to be overwritten in the
  781. // Target resource by the update.
  782. // The fields specified in the update_mask are relative to the resource, not
  783. // the full request. A field will be overwritten if it is in the mask. If the
  784. // user does not provide a mask then all fields will be overwritten.
  785. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  786. // Required. The `Target` to update.
  787. Target target = 2 [(google.api.field_behavior) = REQUIRED];
  788. // Optional. A request ID to identify requests. Specify a unique request ID
  789. // so that if you must retry your request, the server will know to ignore
  790. // the request if it has already been completed. The server will guarantee
  791. // that for at least 60 minutes since the first request.
  792. //
  793. // For example, consider a situation where you make an initial request and the
  794. // request times out. If you make the request again with the same request ID,
  795. // the server can check if original operation with the same request ID was
  796. // received, and if so, will ignore the second request. This prevents clients
  797. // from accidentally creating duplicate commitments.
  798. //
  799. // The request ID must be a valid UUID with the exception that zero UUID is
  800. // not supported (00000000-0000-0000-0000-000000000000).
  801. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  802. // Optional. If set to true, updating a `Target` that does not exist will
  803. // result in the creation of a new `Target`.
  804. bool allow_missing = 4 [(google.api.field_behavior) = OPTIONAL];
  805. // Optional. If set to true, the request is validated and the user is provided with
  806. // an expected result, but no actual change is made.
  807. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
  808. }
  809. // The request object for `DeleteTarget`.
  810. message DeleteTargetRequest {
  811. // Required. The name of the `Target` to delete. Format should be
  812. // projects/{project_id}/locations/{location_name}/targets/{target_name}.
  813. string name = 1 [
  814. (google.api.field_behavior) = REQUIRED,
  815. (google.api.resource_reference) = {
  816. type: "clouddeploy.googleapis.com/Target"
  817. }
  818. ];
  819. // Optional. A request ID to identify requests. Specify a unique request ID
  820. // so that if you must retry your request, the server will know to ignore
  821. // the request if it has already been completed. The server will guarantee
  822. // that for at least 60 minutes after the first request.
  823. //
  824. // For example, consider a situation where you make an initial request and the
  825. // request times out. If you make the request again with the same request ID,
  826. // the server can check if original operation with the same request ID was
  827. // received, and if so, will ignore the second request. This prevents clients
  828. // from accidentally creating duplicate commitments.
  829. //
  830. // The request ID must be a valid UUID with the exception that zero UUID is
  831. // not supported (00000000-0000-0000-0000-000000000000).
  832. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  833. // Optional. If set to true, then deleting an already deleted or non-existing
  834. // DeliveryPipeline will succeed.
  835. bool allow_missing = 3 [(google.api.field_behavior) = OPTIONAL];
  836. // Optional. If set, validate the request and preview the review, but do not actually
  837. // post it.
  838. bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
  839. // Optional. This checksum is computed by the server based on the value of other
  840. // fields, and may be sent on update and delete requests to ensure the
  841. // client has an up-to-date value before proceeding.
  842. string etag = 5 [(google.api.field_behavior) = OPTIONAL];
  843. }
  844. // A `Release` resource in the Google Cloud Deploy API.
  845. //
  846. // A `Release` defines a specific Skaffold configuration instance
  847. // that can be deployed.
  848. message Release {
  849. option (google.api.resource) = {
  850. type: "clouddeploy.googleapis.com/Release"
  851. pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}"
  852. };
  853. // Valid states of the render operation.
  854. enum RenderState {
  855. // The render state is unspecified.
  856. RENDER_STATE_UNSPECIFIED = 0;
  857. // All rendering operations have completed successfully.
  858. SUCCEEDED = 1;
  859. // All rendering operations have completed, and one or more have failed.
  860. FAILED = 2;
  861. // Rendering has started and is not complete.
  862. IN_PROGRESS = 3;
  863. }
  864. // Details of rendering for a single target.
  865. message TargetRender {
  866. // Valid states of the render operation.
  867. enum TargetRenderState {
  868. // The render operation state is unspecified.
  869. TARGET_RENDER_STATE_UNSPECIFIED = 0;
  870. // The render operation has completed successfully.
  871. SUCCEEDED = 1;
  872. // The render operation has failed.
  873. FAILED = 2;
  874. // The render operation is in progress.
  875. IN_PROGRESS = 3;
  876. }
  877. // Well-known rendering failures.
  878. enum FailureCause {
  879. // No reason for failure is specified.
  880. FAILURE_CAUSE_UNSPECIFIED = 0;
  881. // Cloud Build is not available, either because it is not enabled or
  882. // because Google Cloud Deploy has insufficient permissions. See [required
  883. // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
  884. CLOUD_BUILD_UNAVAILABLE = 1;
  885. // The render operation did not complete successfully; check Cloud Build
  886. // logs.
  887. EXECUTION_FAILED = 2;
  888. }
  889. // Output only. The resource name of the Cloud Build `Build` object that is used to
  890. // render the manifest for this target. Format is
  891. // `projects/{project}/locations/{location}/builds/{build}`.
  892. string rendering_build = 1 [
  893. (google.api.field_behavior) = OUTPUT_ONLY,
  894. (google.api.resource_reference) = {
  895. type: "cloudbuild.googleapis.com/Build"
  896. }
  897. ];
  898. // Output only. Current state of the render operation for this Target.
  899. TargetRenderState rendering_state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  900. // Output only. Reason this render failed. This will always be unspecified while the
  901. // render in progress.
  902. FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  903. // Output only. Additional information about the render failure, if available.
  904. string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  905. }
  906. // Optional. Name of the `Release`. Format is projects/{project}/
  907. // locations/{location}/deliveryPipelines/{deliveryPipeline}/
  908. // releases/[a-z][a-z0-9\-]{0,62}.
  909. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  910. // Output only. Unique identifier of the `Release`.
  911. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  912. // Description of the `Release`. Max length is 255 characters.
  913. string description = 3;
  914. // User annotations. These attributes can only be set and used by the
  915. // user, and not by Google Cloud Deploy. See
  916. // https://google.aip.dev/128#annotations for more details such as format and
  917. // size limitations.
  918. map<string, string> annotations = 4;
  919. // Labels are attributes that can be set and used by both the
  920. // user and by Google Cloud Deploy. Labels must meet the following
  921. // constraints:
  922. //
  923. // * Keys and values can contain only lowercase letters, numeric characters,
  924. // underscores, and dashes.
  925. // * All characters must use UTF-8 encoding, and international characters are
  926. // allowed.
  927. // * Keys must start with a lowercase letter or international character.
  928. // * Each resource is limited to a maximum of 64 labels.
  929. //
  930. // Both keys and values are additionally constrained to be <= 128 bytes.
  931. map<string, string> labels = 5;
  932. // Output only. Indicates whether this is an abandoned release.
  933. bool abandoned = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
  934. // Output only. Time at which the `Release` was created.
  935. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  936. // Output only. Time at which the render began.
  937. google.protobuf.Timestamp render_start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  938. // Output only. Time at which the render completed.
  939. google.protobuf.Timestamp render_end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  940. // Cloud Storage URI of tar.gz archive containing Skaffold configuration.
  941. string skaffold_config_uri = 17;
  942. // Filepath of the Skaffold config inside of the config URI.
  943. string skaffold_config_path = 9;
  944. // List of artifacts to pass through to Skaffold command.
  945. repeated BuildArtifact build_artifacts = 10;
  946. // Output only. Snapshot of the parent pipeline taken at release creation time.
  947. DeliveryPipeline delivery_pipeline_snapshot = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  948. // Output only. Snapshot of the targets taken at release creation time.
  949. repeated Target target_snapshots = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  950. // Output only. Current state of the render operation.
  951. RenderState render_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  952. // This checksum is computed by the server based on the value of other
  953. // fields, and may be sent on update and delete requests to ensure the
  954. // client has an up-to-date value before proceeding.
  955. string etag = 16;
  956. // The Skaffold version to use when operating on this release, such as
  957. // "1.20.0". Not all versions are valid; Google Cloud Deploy supports a
  958. // specific set of versions.
  959. //
  960. // If unset, the most recent supported Skaffold version will be used.
  961. string skaffold_version = 19;
  962. // Output only. Map from target ID to the target artifacts created
  963. // during the render operation.
  964. map<string, TargetArtifact> target_artifacts = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
  965. // Output only. Map from target ID to details of the render operation for that target.
  966. map<string, TargetRender> target_renders = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
  967. }
  968. // Description of an a image to use during Skaffold rendering.
  969. message BuildArtifact {
  970. // Image name in Skaffold configuration.
  971. string image = 3;
  972. // Image tag to use. This will generally be the full path to an image, such
  973. // as "gcr.io/my-project/busybox:1.2.3" or
  974. // "gcr.io/my-project/busybox@sha256:abc123".
  975. string tag = 2;
  976. }
  977. // The artifacts produced by a target render operation.
  978. message TargetArtifact {
  979. oneof uri {
  980. // Output only. URI of a directory containing the artifacts. This contains
  981. // deployment configuration used by Skaffold during a rollout, and all
  982. // paths are relative to this location.
  983. string artifact_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  984. }
  985. // Output only. File path of the resolved Skaffold configuration relative to the URI.
  986. string skaffold_config_path = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  987. // Output only. File path of the rendered manifest relative to the URI.
  988. string manifest_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  989. }
  990. // The request object for `ListReleases`.
  991. message ListReleasesRequest {
  992. // Required. The `DeliveryPipeline` which owns this collection of `Release` objects.
  993. string parent = 1 [
  994. (google.api.field_behavior) = REQUIRED,
  995. (google.api.resource_reference) = {
  996. type: "clouddeploy.googleapis.com/DeliveryPipeline"
  997. }
  998. ];
  999. // Optional. The maximum number of `Release` objects to return. The service may return
  1000. // fewer than this value. If unspecified, at most 50 `Release` objects will be
  1001. // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  1002. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1003. // Optional. A page token, received from a previous `ListReleases` call.
  1004. // Provide this to retrieve the subsequent page.
  1005. //
  1006. // When paginating, all other provided parameters match
  1007. // the call that provided the page token.
  1008. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1009. // Optional. Filter releases to be returned. See https://google.aip.dev/160 for more
  1010. // details.
  1011. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  1012. // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  1013. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  1014. }
  1015. // The response object from `ListReleases`.
  1016. message ListReleasesResponse {
  1017. // The `Release` objects.
  1018. repeated Release releases = 1;
  1019. // A token, which can be sent as `page_token` to retrieve the next page.
  1020. // If this field is omitted, there are no subsequent pages.
  1021. string next_page_token = 2;
  1022. // Locations that could not be reached.
  1023. repeated string unreachable = 3;
  1024. }
  1025. // The request object for `GetRelease`.
  1026. message GetReleaseRequest {
  1027. // Required. Name of the `Release`. Format must be
  1028. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
  1029. string name = 1 [
  1030. (google.api.field_behavior) = REQUIRED,
  1031. (google.api.resource_reference) = {
  1032. type: "clouddeploy.googleapis.com/Release"
  1033. }
  1034. ];
  1035. }
  1036. // The request object for `CreateRelease`,
  1037. message CreateReleaseRequest {
  1038. // Required. The parent collection in which the `Release` should be created.
  1039. // Format should be
  1040. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}.
  1041. string parent = 1 [
  1042. (google.api.field_behavior) = REQUIRED,
  1043. (google.api.resource_reference) = {
  1044. type: "clouddeploy.googleapis.com/DeliveryPipeline"
  1045. }
  1046. ];
  1047. // Required. ID of the `Release`.
  1048. string release_id = 2 [(google.api.field_behavior) = REQUIRED];
  1049. // Required. The `Release` to create.
  1050. Release release = 3 [(google.api.field_behavior) = REQUIRED];
  1051. // Optional. A request ID to identify requests. Specify a unique request ID
  1052. // so that if you must retry your request, the server will know to ignore
  1053. // the request if it has already been completed. The server will guarantee
  1054. // that for at least 60 minutes since the first request.
  1055. //
  1056. // For example, consider a situation where you make an initial request and the
  1057. // request times out. If you make the request again with the same request ID,
  1058. // the server can check if original operation with the same request ID was
  1059. // received, and if so, will ignore the second request. This prevents clients
  1060. // from accidentally creating duplicate commitments.
  1061. //
  1062. // The request ID must be a valid UUID with the exception that zero UUID is
  1063. // not supported (00000000-0000-0000-0000-000000000000).
  1064. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  1065. // Optional. If set to true, the request is validated and the user is provided with
  1066. // an expected result, but no actual change is made.
  1067. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
  1068. }
  1069. // A `Rollout` resource in the Google Cloud Deploy API.
  1070. //
  1071. // A `Rollout` contains information around a specific deployment to a `Target`.
  1072. message Rollout {
  1073. option (google.api.resource) = {
  1074. type: "clouddeploy.googleapis.com/Rollout"
  1075. pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}"
  1076. };
  1077. // Valid approval states of a `Rollout`.
  1078. enum ApprovalState {
  1079. // The `Rollout` has an unspecified approval state.
  1080. APPROVAL_STATE_UNSPECIFIED = 0;
  1081. // The `Rollout` requires approval.
  1082. NEEDS_APPROVAL = 1;
  1083. // The `Rollout` does not require approval.
  1084. DOES_NOT_NEED_APPROVAL = 2;
  1085. // The `Rollout` has been approved.
  1086. APPROVED = 3;
  1087. // The `Rollout` has been rejected.
  1088. REJECTED = 4;
  1089. }
  1090. // Valid states of a `Rollout`.
  1091. enum State {
  1092. // The `Rollout` has an unspecified state.
  1093. STATE_UNSPECIFIED = 0;
  1094. // The `Rollout` has completed successfully.
  1095. SUCCEEDED = 1;
  1096. // The `Rollout` has failed.
  1097. FAILED = 2;
  1098. // The `Rollout` is being deployed.
  1099. IN_PROGRESS = 3;
  1100. // The `Rollout` needs approval.
  1101. PENDING_APPROVAL = 4;
  1102. // An approver rejected the `Rollout`.
  1103. APPROVAL_REJECTED = 5;
  1104. // The `Rollout` is waiting for an earlier Rollout(s) to complete on this
  1105. // `Target`.
  1106. PENDING = 6;
  1107. // The `Rollout` is waiting for the `Release` to be fully rendered.
  1108. PENDING_RELEASE = 7;
  1109. }
  1110. // Well-known rollout failures.
  1111. enum FailureCause {
  1112. // No reason for failure is specified.
  1113. FAILURE_CAUSE_UNSPECIFIED = 0;
  1114. // Cloud Build is not available, either because it is not enabled or because
  1115. // Cloud Deploy has insufficient permissions. See [required
  1116. // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
  1117. CLOUD_BUILD_UNAVAILABLE = 1;
  1118. // The deploy operation did not complete successfully; check Cloud Build
  1119. // logs.
  1120. EXECUTION_FAILED = 2;
  1121. // Deployment did not complete within the alloted time.
  1122. DEADLINE_EXCEEDED = 3;
  1123. // Release is in a failed state.
  1124. RELEASE_FAILED = 4;
  1125. // Release is abandoned.
  1126. RELEASE_ABANDONED = 5;
  1127. // No skaffold verify configuration was found.
  1128. VERIFICATION_CONFIG_NOT_FOUND = 6;
  1129. }
  1130. // Optional. Name of the `Rollout`. Format is projects/{project}/
  1131. // locations/{location}/deliveryPipelines/{deliveryPipeline}/
  1132. // releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}.
  1133. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  1134. // Output only. Unique identifier of the `Rollout`.
  1135. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1136. // Description of the `Rollout` for user purposes. Max length is 255
  1137. // characters.
  1138. string description = 3;
  1139. // User annotations. These attributes can only be set and used by the
  1140. // user, and not by Google Cloud Deploy. See
  1141. // https://google.aip.dev/128#annotations for more details such as format and
  1142. // size limitations.
  1143. map<string, string> annotations = 4;
  1144. // Labels are attributes that can be set and used by both the
  1145. // user and by Google Cloud Deploy. Labels must meet the following
  1146. // constraints:
  1147. //
  1148. // * Keys and values can contain only lowercase letters, numeric characters,
  1149. // underscores, and dashes.
  1150. // * All characters must use UTF-8 encoding, and international characters are
  1151. // allowed.
  1152. // * Keys must start with a lowercase letter or international character.
  1153. // * Each resource is limited to a maximum of 64 labels.
  1154. //
  1155. // Both keys and values are additionally constrained to be <= 128 bytes.
  1156. map<string, string> labels = 5;
  1157. // Output only. Time at which the `Rollout` was created.
  1158. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1159. // Output only. Time at which the `Rollout` was approved.
  1160. google.protobuf.Timestamp approve_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  1161. // Output only. Time at which the `Rollout` was enqueued.
  1162. google.protobuf.Timestamp enqueue_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  1163. // Output only. Time at which the `Rollout` started deploying.
  1164. google.protobuf.Timestamp deploy_start_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  1165. // Output only. Time at which the `Rollout` finished deploying.
  1166. google.protobuf.Timestamp deploy_end_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  1167. // Required. The ID of Target to which this `Rollout` is deploying.
  1168. string target_id = 18 [(google.api.field_behavior) = REQUIRED];
  1169. // Output only. Approval state of the `Rollout`.
  1170. ApprovalState approval_state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  1171. // Output only. Current state of the `Rollout`.
  1172. State state = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  1173. // Output only. Additional information about the rollout failure, if available.
  1174. string failure_reason = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  1175. // Output only. The resource name of the Cloud Build `Build` object that is used to deploy
  1176. // the Rollout. Format is
  1177. // `projects/{project}/locations/{location}/builds/{build}`.
  1178. string deploying_build = 17 [
  1179. (google.api.field_behavior) = OUTPUT_ONLY,
  1180. (google.api.resource_reference) = {
  1181. type: "cloudbuild.googleapis.com/Build"
  1182. }
  1183. ];
  1184. // This checksum is computed by the server based on the value of other
  1185. // fields, and may be sent on update and delete requests to ensure the
  1186. // client has an up-to-date value before proceeding.
  1187. string etag = 16;
  1188. // Output only. The reason this rollout failed. This will always be unspecified while the
  1189. // rollout is in progress.
  1190. FailureCause deploy_failure_cause = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
  1191. // Output only. The phases that represent the workflows of this `Rollout`.
  1192. repeated Phase phases = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
  1193. // Output only. Metadata contains information about the rollout.
  1194. Metadata metadata = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
  1195. }
  1196. // Metadata includes information associated with a `Rollout`.
  1197. message Metadata {
  1198. // Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
  1199. CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1200. }
  1201. // DeployJobRunMetadata surfaces information associated with a `DeployJobRun` to
  1202. // the user.
  1203. message DeployJobRunMetadata {
  1204. // Output only. The name of the Cloud Run Service that is associated with a `DeployJobRun`.
  1205. CloudRunMetadata cloud_run = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1206. }
  1207. // CloudRunMetadata contains information from a Cloud Run deployment.
  1208. message CloudRunMetadata {
  1209. // Output only. The name of the Cloud Run Service that is associated with a `Rollout`.
  1210. // Format is projects/{project}/locations/{location}/services/{service}.
  1211. string service = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1212. // Output only. The Cloud Run Service urls that are associated with a `Rollout`.
  1213. repeated string service_urls = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1214. // Output only. The Cloud Run Revision id associated with a `Rollout`.
  1215. string revision = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1216. }
  1217. // Phase represents a collection of jobs that are logically grouped together
  1218. // for a `Rollout`.
  1219. message Phase {
  1220. // Valid states of a Phase.
  1221. enum State {
  1222. // The Phase has an unspecified state.
  1223. STATE_UNSPECIFIED = 0;
  1224. // The Phase is waiting for an earlier Phase(s) to complete.
  1225. PENDING = 1;
  1226. // The Phase is in progress.
  1227. IN_PROGRESS = 2;
  1228. // The Phase has succeeded.
  1229. SUCCEEDED = 3;
  1230. // The Phase has failed.
  1231. FAILED = 4;
  1232. // The Phase was aborted.
  1233. ABORTED = 5;
  1234. }
  1235. // Output only. The ID of the Phase.
  1236. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1237. // Output only. Current state of the Phase.
  1238. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1239. // The job composition of this Phase.
  1240. oneof jobs {
  1241. // Output only. Deployment job composition.
  1242. DeploymentJobs deployment_jobs = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1243. }
  1244. }
  1245. // Deployment job composition.
  1246. message DeploymentJobs {
  1247. // Output only. The deploy Job. This is the first job run in the phase.
  1248. Job deploy_job = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1249. // Output only. The verify Job. Runs after a deploy if the deploy succeeds.
  1250. Job verify_job = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1251. }
  1252. // Job represents an operation for a `Rollout`.
  1253. message Job {
  1254. // Valid states of a Job.
  1255. enum State {
  1256. // The Job has an unspecified state.
  1257. STATE_UNSPECIFIED = 0;
  1258. // The Job is waiting for an earlier Phase(s) or Job(s) to complete.
  1259. PENDING = 1;
  1260. // The Job is disabled.
  1261. DISABLED = 2;
  1262. // The Job is in progress.
  1263. IN_PROGRESS = 3;
  1264. // The Job succeeded.
  1265. SUCCEEDED = 4;
  1266. // The Job failed.
  1267. FAILED = 5;
  1268. // The Job was aborted.
  1269. ABORTED = 6;
  1270. }
  1271. // Output only. The ID of the Job.
  1272. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1273. // Output only. The current state of the Job.
  1274. State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1275. // Output only. The name of the `JobRun` responsible for the most recent invocation of this
  1276. // Job.
  1277. string job_run = 3 [
  1278. (google.api.field_behavior) = OUTPUT_ONLY,
  1279. (google.api.resource_reference) = {
  1280. type: "clouddeploy.googleapis.com/JobRun"
  1281. }
  1282. ];
  1283. // The type of Job.
  1284. oneof job_type {
  1285. // Output only. A deploy Job.
  1286. DeployJob deploy_job = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1287. // Output only. A verify Job.
  1288. VerifyJob verify_job = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1289. }
  1290. }
  1291. // A deploy Job.
  1292. message DeployJob {
  1293. }
  1294. // A verify Job.
  1295. message VerifyJob {
  1296. }
  1297. // ListRolloutsRequest is the request object used by `ListRollouts`.
  1298. message ListRolloutsRequest {
  1299. // Required. The `Release` which owns this collection of `Rollout` objects.
  1300. string parent = 1 [
  1301. (google.api.field_behavior) = REQUIRED,
  1302. (google.api.resource_reference) = {
  1303. type: "clouddeploy.googleapis.com/Release"
  1304. }
  1305. ];
  1306. // Optional. The maximum number of `Rollout` objects to return. The service may return
  1307. // fewer than this value. If unspecified, at most 50 `Rollout` objects will be
  1308. // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  1309. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1310. // Optional. A page token, received from a previous `ListRollouts` call.
  1311. // Provide this to retrieve the subsequent page.
  1312. //
  1313. // When paginating, all other provided parameters match
  1314. // the call that provided the page token.
  1315. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1316. // Optional. Filter rollouts to be returned. See https://google.aip.dev/160 for more
  1317. // details.
  1318. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  1319. // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  1320. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  1321. }
  1322. // ListRolloutsResponse is the response object reutrned by `ListRollouts`.
  1323. message ListRolloutsResponse {
  1324. // The `Rollout` objects.
  1325. repeated Rollout rollouts = 1;
  1326. // A token, which can be sent as `page_token` to retrieve the next page.
  1327. // If this field is omitted, there are no subsequent pages.
  1328. string next_page_token = 2;
  1329. // Locations that could not be reached.
  1330. repeated string unreachable = 3;
  1331. }
  1332. // GetRolloutRequest is the request object used by `GetRollout`.
  1333. message GetRolloutRequest {
  1334. // Required. Name of the `Rollout`. Format must be
  1335. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}.
  1336. string name = 1 [
  1337. (google.api.field_behavior) = REQUIRED,
  1338. (google.api.resource_reference) = {
  1339. type: "clouddeploy.googleapis.com/Rollout"
  1340. }
  1341. ];
  1342. }
  1343. // CreateRolloutRequest is the request object used by `CreateRollout`.
  1344. message CreateRolloutRequest {
  1345. // Required. The parent collection in which the `Rollout` should be created.
  1346. // Format should be
  1347. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}.
  1348. string parent = 1 [
  1349. (google.api.field_behavior) = REQUIRED,
  1350. (google.api.resource_reference) = {
  1351. type: "clouddeploy.googleapis.com/Release"
  1352. }
  1353. ];
  1354. // Required. ID of the `Rollout`.
  1355. string rollout_id = 2 [(google.api.field_behavior) = REQUIRED];
  1356. // Required. The `Rollout` to create.
  1357. Rollout rollout = 3 [(google.api.field_behavior) = REQUIRED];
  1358. // Optional. A request ID to identify requests. Specify a unique request ID
  1359. // so that if you must retry your request, the server will know to ignore
  1360. // the request if it has already been completed. The server will guarantee
  1361. // that for at least 60 minutes since the first request.
  1362. //
  1363. // For example, consider a situation where you make an initial request and the
  1364. // request times out. If you make the request again with the same request ID,
  1365. // the server can check if original operation with the same request ID was
  1366. // received, and if so, will ignore the second request. This prevents clients
  1367. // from accidentally creating duplicate commitments.
  1368. //
  1369. // The request ID must be a valid UUID with the exception that zero UUID is
  1370. // not supported (00000000-0000-0000-0000-000000000000).
  1371. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  1372. // Optional. If set to true, the request is validated and the user is provided with
  1373. // an expected result, but no actual change is made.
  1374. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL];
  1375. }
  1376. // Represents the metadata of the long-running operation.
  1377. message OperationMetadata {
  1378. // Output only. The time the operation was created.
  1379. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1380. // Output only. The time the operation finished running.
  1381. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1382. // Output only. Server-defined resource path for the target of the operation.
  1383. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1384. // Output only. Name of the verb executed by the operation.
  1385. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1386. // Output only. Human-readable status of the operation, if any.
  1387. string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1388. // Output only. Identifies whether the user has requested cancellation
  1389. // of the operation. Operations that have successfully been cancelled
  1390. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  1391. // corresponding to `Code.CANCELLED`.
  1392. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1393. // Output only. API version used to start the operation.
  1394. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  1395. }
  1396. // The request object used by `ApproveRollout`.
  1397. message ApproveRolloutRequest {
  1398. // Required. Name of the Rollout. Format is
  1399. // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
  1400. // releases/{release}/rollouts/{rollout}.
  1401. string name = 1 [
  1402. (google.api.field_behavior) = REQUIRED,
  1403. (google.api.resource_reference) = {
  1404. type: "clouddeploy.googleapis.com/Rollout"
  1405. }
  1406. ];
  1407. // Required. True = approve; false = reject
  1408. bool approved = 2 [(google.api.field_behavior) = REQUIRED];
  1409. }
  1410. // The response object from `ApproveRollout`.
  1411. message ApproveRolloutResponse {
  1412. }
  1413. // RetryJobRequest is the request object used by `RetryJob`.
  1414. message RetryJobRequest {
  1415. // Required. Name of the Rollout. Format is
  1416. // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
  1417. // releases/{release}/rollouts/{rollout}.
  1418. string rollout = 1 [
  1419. (google.api.field_behavior) = REQUIRED,
  1420. (google.api.resource_reference) = {
  1421. type: "clouddeploy.googleapis.com/Rollout"
  1422. }
  1423. ];
  1424. // Required. The phase ID the Job to retry belongs to.
  1425. string phase_id = 2 [(google.api.field_behavior) = REQUIRED];
  1426. // Required. The job ID for the Job to retry.
  1427. string job_id = 3 [(google.api.field_behavior) = REQUIRED];
  1428. }
  1429. // The response object from 'RetryJob'.
  1430. message RetryJobResponse {
  1431. }
  1432. // The request object used by `AbandonRelease`.
  1433. message AbandonReleaseRequest {
  1434. // Required. Name of the Release. Format is
  1435. // projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/
  1436. // releases/{release}.
  1437. string name = 1 [
  1438. (google.api.field_behavior) = REQUIRED,
  1439. (google.api.resource_reference) = {
  1440. type: "clouddeploy.googleapis.com/Release"
  1441. }
  1442. ];
  1443. }
  1444. // The response object for `AbandonRelease`.
  1445. message AbandonReleaseResponse {
  1446. }
  1447. // A `JobRun` resource in the Google Cloud Deploy API.
  1448. //
  1449. // A `JobRun` contains information of a single `Rollout` job evaluation.
  1450. message JobRun {
  1451. option (google.api.resource) = {
  1452. type: "clouddeploy.googleapis.com/JobRun"
  1453. pattern: "projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}/jobRuns/{job_run}"
  1454. };
  1455. // Valid states of a `JobRun`.
  1456. enum State {
  1457. // The `JobRun` has an unspecified state.
  1458. STATE_UNSPECIFIED = 0;
  1459. // The `JobRun` is in progress.
  1460. IN_PROGRESS = 1;
  1461. // The `JobRun` has succeeded.
  1462. SUCCEEDED = 2;
  1463. // The `JobRun` has failed.
  1464. FAILED = 3;
  1465. }
  1466. // Optional. Name of the `JobRun`. Format is projects/{project}/locations/{location}/
  1467. // deliveryPipelines/{deliveryPipeline}/releases/{releases}/rollouts/
  1468. // {rollouts}/jobRuns/{uuid}.
  1469. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  1470. // Output only. Unique identifier of the `JobRun`.
  1471. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1472. // Output only. ID of the `Rollout` phase this `JobRun` belongs in.
  1473. string phase_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1474. // Output only. ID of the `Rollout` job this `JobRun` corresponds to.
  1475. string job_id = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1476. // Output only. Time at which the `JobRun` was created.
  1477. google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1478. // Output only. Time at which the `JobRun` was started.
  1479. google.protobuf.Timestamp start_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1480. // Output only. Time at which the `JobRun` ended.
  1481. google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  1482. // Output only. The current state of the `JobRun`.
  1483. State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  1484. // The `JobRun` type and the information for that type.
  1485. oneof job_run {
  1486. // Output only. Information specific to a deploy `JobRun`.
  1487. DeployJobRun deploy_job_run = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  1488. // Output only. Information specific to a verify `JobRun`.
  1489. VerifyJobRun verify_job_run = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  1490. }
  1491. // Output only. This checksum is computed by the server based on the value of other
  1492. // fields, and may be sent on update and delete requests to ensure the
  1493. // client has an up-to-date value before proceeding.
  1494. string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  1495. }
  1496. // DeployJobRun contains information specific to a deploy `JobRun`.
  1497. message DeployJobRun {
  1498. // Well-known deploy failures.
  1499. enum FailureCause {
  1500. // No reason for failure is specified.
  1501. FAILURE_CAUSE_UNSPECIFIED = 0;
  1502. // Cloud Build is not available, either because it is not enabled or because
  1503. // Google Cloud Deploy has insufficient permissions. See [Required
  1504. // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
  1505. CLOUD_BUILD_UNAVAILABLE = 1;
  1506. // The deploy operation did not complete successfully; check Cloud Build
  1507. // logs.
  1508. EXECUTION_FAILED = 2;
  1509. // The deploy build did not complete within the alloted time.
  1510. DEADLINE_EXCEEDED = 3;
  1511. }
  1512. // Output only. The resource name of the Cloud Build `Build` object that is used to deploy.
  1513. // Format is projects/{project}/locations/{location}/builds/{build}.
  1514. string build = 1 [
  1515. (google.api.field_behavior) = OUTPUT_ONLY,
  1516. (google.api.resource_reference) = {
  1517. type: "cloudbuild.googleapis.com/Build"
  1518. }
  1519. ];
  1520. // Output only. The reason the deploy failed. This will always be unspecified while the
  1521. // deploy is in progress or if it succeeded.
  1522. FailureCause failure_cause = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1523. // Output only. Additional information about the deploy failure, if available.
  1524. string failure_message = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1525. // Output only. Metadata containing information about the deploy job run.
  1526. DeployJobRunMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1527. }
  1528. // VerifyJobRun contains information specific to a verify `JobRun`.
  1529. message VerifyJobRun {
  1530. // Well-known verify failures.
  1531. enum FailureCause {
  1532. // No reason for failure is specified.
  1533. FAILURE_CAUSE_UNSPECIFIED = 0;
  1534. // Cloud Build is not available, either because it is not enabled or because
  1535. // Google Cloud Deploy has insufficient permissions. See [required
  1536. // permission](/deploy/docs/cloud-deploy-service-account#required_permissions).
  1537. CLOUD_BUILD_UNAVAILABLE = 1;
  1538. // The verify operation did not complete successfully; check Cloud Build
  1539. // logs.
  1540. EXECUTION_FAILED = 2;
  1541. // The verify build did not complete within the alloted time.
  1542. DEADLINE_EXCEEDED = 3;
  1543. // No Skaffold verify configuration was found.
  1544. VERIFICATION_CONFIG_NOT_FOUND = 4;
  1545. }
  1546. // Output only. The resource name of the Cloud Build `Build` object that is used to verify.
  1547. // Format is projects/{project}/locations/{location}/builds/{build}.
  1548. string build = 1 [
  1549. (google.api.field_behavior) = OUTPUT_ONLY,
  1550. (google.api.resource_reference) = {
  1551. type: "cloudbuild.googleapis.com/Build"
  1552. }
  1553. ];
  1554. // Output only. URI of a directory containing the verify artifacts. This contains the
  1555. // Skaffold event log.
  1556. string artifact_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1557. // Output only. File path of the Skaffold event log relative to the artifact URI.
  1558. string event_log_path = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1559. // Output only. The reason the verify failed. This will always be unspecified while the
  1560. // verify is in progress or if it succeeded.
  1561. FailureCause failure_cause = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1562. // Output only. Additional information about the verify failure, if available.
  1563. string failure_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1564. }
  1565. // ListJobRunsRequest is the request object used by `ListJobRuns`.
  1566. message ListJobRunsRequest {
  1567. // Required. The `Rollout` which owns this collection of `JobRun` objects.
  1568. string parent = 1 [
  1569. (google.api.field_behavior) = REQUIRED,
  1570. (google.api.resource_reference) = {
  1571. type: "clouddeploy.googleapis.com/Rollout"
  1572. }
  1573. ];
  1574. // Optional. The maximum number of `JobRun` objects to return. The service may return
  1575. // fewer than this value. If unspecified, at most 50 `JobRun` objects will be
  1576. // returned. The maximum value is 1000; values above 1000 will be set to 1000.
  1577. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  1578. // Optional. A page token, received from a previous `ListJobRuns` call. Provide this
  1579. // to retrieve the subsequent page.
  1580. //
  1581. // When paginating, all other provided parameters match the call that provided
  1582. // the page token.
  1583. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  1584. // Optional. Filter results to be returned. See https://google.aip.dev/160 for more
  1585. // details.
  1586. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  1587. // Optional. Field to sort by. See https://google.aip.dev/132#ordering for more details.
  1588. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  1589. }
  1590. // ListJobRunsResponse is the response object returned by `ListJobRuns`.
  1591. message ListJobRunsResponse {
  1592. // The `JobRun` objects.
  1593. repeated JobRun job_runs = 1;
  1594. // A token, which can be sent as `page_token` to retrieve the next page. If
  1595. // this field is omitted, there are no subsequent pages.
  1596. string next_page_token = 2;
  1597. // Locations that could not be reached
  1598. repeated string unreachable = 3;
  1599. }
  1600. // GetJobRunRequest is the request object used by `GetJobRun`.
  1601. message GetJobRunRequest {
  1602. // Required. Name of the `JobRun`. Format must be
  1603. // projects/{project_id}/locations/{location_name}/deliveryPipelines/{pipeline_name}/releases/{release_name}/rollouts/{rollout_name}/jobRuns/{job_run_name}.
  1604. string name = 1 [
  1605. (google.api.field_behavior) = REQUIRED,
  1606. (google.api.resource_reference) = {
  1607. type: "clouddeploy.googleapis.com/JobRun"
  1608. }
  1609. ];
  1610. }
  1611. // Service-wide configuration.
  1612. message Config {
  1613. option (google.api.resource) = {
  1614. type: "clouddeploy.googleapis.com/Config"
  1615. pattern: "projects/{project}/locations/{location}/config"
  1616. };
  1617. // Name of the configuration.
  1618. string name = 1;
  1619. // Output only. All supported versions of Skaffold.
  1620. repeated SkaffoldVersion supported_versions = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1621. // Output only. Default Skaffold version that is assigned when a Release is created without
  1622. // specifying a Skaffold version.
  1623. string default_skaffold_version = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1624. }
  1625. // Details of a supported Skaffold version.
  1626. message SkaffoldVersion {
  1627. // Release version number. For example, "1.20.3".
  1628. string version = 1;
  1629. // Date when this version is expected to no longer be supported.
  1630. google.type.Date support_end_date = 2;
  1631. }
  1632. // Request to get a configuration.
  1633. message GetConfigRequest {
  1634. // Required. Name of requested configuration.
  1635. string name = 1 [
  1636. (google.api.field_behavior) = REQUIRED,
  1637. (google.api.resource_reference) = {
  1638. type: "clouddeploy.googleapis.com/Config"
  1639. }
  1640. ];
  1641. }