@@ -33,6 +33,10 @@ option (google.api.resource_definition) = {
3333 type : "cloudkms.googleapis.com/CryptoKey"
3434 pattern : "projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}"
3535};
36+ option (google.api.resource_definition ) = {
37+ type : "cloudkms.googleapis.com/CryptoKeyVersion"
38+ pattern : "projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}"
39+ };
3640
3741// Workflows is used to deploy and execute workflow programs.
3842// Workflows makes sure the program executes reliably, despite hardware and
@@ -107,6 +111,14 @@ service Workflows {
107111 metadata_type : "OperationMetadata"
108112 };
109113 }
114+
115+ // Lists revisions for a given workflow.
116+ rpc ListWorkflowRevisions (ListWorkflowRevisionsRequest )
117+ returns (ListWorkflowRevisionsResponse ) {
118+ option (google.api.http ) = {
119+ get : "/v1/{name=projects/*/locations/*/workflows/*}:listRevisions"
120+ };
121+ }
110122}
111123
112124// Workflow program to be executed by Workflows.
@@ -164,11 +176,13 @@ message Workflow {
164176 }
165177
166178 // The resource name of the workflow.
167- // Format: projects/{project}/locations/{location}/workflows/{workflow}
179+ // Format: projects/{project}/locations/{location}/workflows/{workflow}.
180+ // This is a workflow-wide field and is not tied to a specific revision.
168181 string name = 1 ;
169182
170183 // Description of the workflow provided by the user.
171- // Must be at most 1000 unicode characters long.
184+ // Must be at most 1000 Unicode characters long.
185+ // This is a workflow-wide field and is not tied to a specific revision.
172186 string description = 2 ;
173187
174188 // Output only. State of the workflow deployment.
@@ -188,10 +202,12 @@ message Workflow {
188202 string revision_id = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
189203
190204 // Output only. The timestamp for when the workflow was created.
205+ // This is a workflow-wide field and is not tied to a specific revision.
191206 google.protobuf.Timestamp create_time = 5
192207 [(google.api.field_behavior ) = OUTPUT_ONLY ];
193208
194209 // Output only. The timestamp for when the workflow was last updated.
210+ // This is a workflow-wide field and is not tied to a specific revision.
195211 google.protobuf.Timestamp update_time = 6
196212 [(google.api.field_behavior ) = OUTPUT_ONLY ];
197213
@@ -205,6 +221,7 @@ message Workflow {
205221 // than 63 characters and can only contain lowercase letters, numeric
206222 // characters, underscores, and dashes. Label keys must start with a letter.
207223 // International characters are allowed.
224+ // This is a workflow-wide field and is not tied to a specific revision.
208225 map <string , string > labels = 8 ;
209226
210227 // The service account associated with the latest workflow version.
@@ -260,10 +277,51 @@ message Workflow {
260277
261278 // Optional. User-defined environment variables associated with this workflow
262279 // revision. This map has a maximum length of 20. Each string can take up to
263- // 40KiB . Keys cannot be empty strings and cannot start with “ GOOGLE” or
264- // “ WORKFLOWS".
280+ // 4KiB . Keys cannot be empty strings and cannot start with " GOOGLE" or
281+ // " WORKFLOWS".
265282 map <string , string > user_env_vars = 14
266283 [(google.api.field_behavior ) = OPTIONAL ];
284+
285+ // Optional. Describes the execution history level to apply to this workflow.
286+ ExecutionHistoryLevel execution_history_level = 15
287+ [(google.api.field_behavior ) = OPTIONAL ];
288+
289+ // Output only. A list of all KMS crypto keys used to encrypt or decrypt the
290+ // data associated with the workflow.
291+ repeated string all_kms_keys = 16 [
292+ (google.api.field_behavior ) = OUTPUT_ONLY ,
293+ (google.api.resource_reference ) = {
294+ type : "cloudkms.googleapis.com/CryptoKey"
295+ }
296+ ];
297+
298+ // Output only. A list of all KMS crypto key versions used to encrypt or
299+ // decrypt the data associated with the workflow.
300+ repeated string all_kms_keys_versions = 17 [
301+ (google.api.field_behavior ) = OUTPUT_ONLY ,
302+ (google.api.resource_reference ) = {
303+ type : "cloudkms.googleapis.com/CryptoKeyVersion"
304+ }
305+ ];
306+
307+ // Output only. The resource name of a KMS crypto key version used to encrypt
308+ // or decrypt the data associated with the workflow.
309+ //
310+ // Format:
311+ // projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}
312+ string crypto_key_version = 18 [
313+ (google.api.field_behavior ) = OUTPUT_ONLY ,
314+ (google.api.resource_reference ) = {
315+ type : "cloudkms.googleapis.com/CryptoKeyVersion"
316+ }
317+ ];
318+
319+ // Optional. Input only. Immutable. Tags associated with this workflow.
320+ map <string , string > tags = 19 [
321+ (google.api.field_behavior ) = INPUT_ONLY ,
322+ (google.api.field_behavior ) = IMMUTABLE ,
323+ (google.api.field_behavior ) = OPTIONAL
324+ ];
267325}
268326
269327// Request for the
@@ -293,6 +351,16 @@ message ListWorkflowsRequest {
293351 string page_token = 3 ;
294352
295353 // Filter to restrict results to specific workflows.
354+ // For details, see <a href="https://google.aip.dev/160"
355+ // class="external">AIP-160</a>.
356+ //
357+ // For example, if you are using the Google APIs Explorer:
358+ //
359+ // `state="SUCCEEDED"`
360+ //
361+ // or
362+ //
363+ // `createTime>"2023-08-01" AND state="FAILED"`
296364 string filter = 4 ;
297365
298366 // Comma-separated list of fields that specify the order of the results.
@@ -407,3 +475,50 @@ message OperationMetadata {
407475 // API version used to start the operation.
408476 string api_version = 5 ;
409477}
478+
479+ // Request for the
480+ // [ListWorkflowRevisions][google.cloud.workflows.v1.Workflows.ListWorkflowRevisions]
481+ // method.
482+ message ListWorkflowRevisionsRequest {
483+ // Required. Workflow for which the revisions should be listed.
484+ // Format: projects/{project}/locations/{location}/workflows/{workflow}
485+ string name = 1 [
486+ (google.api.field_behavior ) = REQUIRED ,
487+ (google.api.resource_reference ) = {
488+ type : "workflows.googleapis.com/Workflow"
489+ }
490+ ];
491+
492+ // The maximum number of revisions to return per page. If a value is not
493+ // specified, a default value of 20 is used. The maximum permitted value is
494+ // 100. Values greater than 100 are coerced down to 100.
495+ int32 page_size = 2 ;
496+
497+ // The page token, received from a previous ListWorkflowRevisions call.
498+ // Provide this to retrieve the subsequent page.
499+ string page_token = 3 ;
500+ }
501+
502+ // Response for the
503+ // [ListWorkflowRevisions][google.cloud.workflows.v1.Workflows.ListWorkflowRevisions]
504+ // method.
505+ message ListWorkflowRevisionsResponse {
506+ // The revisions of the workflow, ordered in reverse chronological order.
507+ repeated Workflow workflows = 1 ;
508+
509+ // A token, which can be sent as `page_token` to retrieve the next page.
510+ // If this field is omitted, there are no subsequent pages.
511+ string next_page_token = 2 ;
512+ }
513+
514+ // Define possible options for enabling the execution history level.
515+ enum ExecutionHistoryLevel {
516+ // The default/unset value.
517+ EXECUTION_HISTORY_LEVEL_UNSPECIFIED = 0 ;
518+
519+ // Enable execution history basic feature.
520+ EXECUTION_HISTORY_BASIC = 1 ;
521+
522+ // Enable execution history detailed feature.
523+ EXECUTION_HISTORY_DETAILED = 2 ;
524+ }
0 commit comments