From 4693692a0271966bb29e94c6c7659fd89cbe7b33 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 24 Jan 2023 11:37:56 -0800 Subject: [PATCH] feat: Adding support for encryption_key_revocation_action and encryption_key_shutdown_duration for RevisionTemplate and ExecutionTemplate (#3874) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Adding support for encryption_key_revocation_action and encryption_key_shutdown_duration for RevisionTemplate and ExecutionTemplate docs: Documentation improvements, including clarification that v1 labels/annotations are rejected in v2 API PiperOrigin-RevId: 503293343 Source-Link: https://github.com/googleapis/googleapis/commit/e3d3d63275d13364cc986e100faff16b2cf510f5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f401f99dd0e2bfe7fbe6b190d3381ba648f21227 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJ1bi8uT3dsQm90LnlhbWwiLCJoIjoiZjQwMWY5OWRkMGUyYmZlN2ZiZTZiMTkwZDMzODFiYTY0OGYyMTIyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../google/cloud/run/v2/condition.proto | 4 + .../google/cloud/run/v2/execution.proto | 89 ++++---- .../cloud/run/v2/execution_template.proto | 13 +- .../protos/google/cloud/run/v2/job.proto | 108 +++++----- .../protos/google/cloud/run/v2/k8s.min.proto | 25 ++- .../protos/google/cloud/run/v2/revision.proto | 69 ++++--- .../cloud/run/v2/revision_template.proto | 20 +- .../protos/google/cloud/run/v2/service.proto | 133 ++++++------ .../protos/google/cloud/run/v2/task.proto | 82 ++++---- .../google/cloud/run/v2/task_template.proto | 4 +- .../google/cloud/run/v2/traffic_target.proto | 12 +- .../google/cloud/run/v2/vendor_settings.proto | 16 +- packages/google-cloud-run/protos/protos.d.ts | 46 ++++- packages/google-cloud-run/protos/protos.js | 190 ++++++++++++++++++ packages/google-cloud-run/protos/protos.json | 46 ++++- .../generated/v2/services.list_services.js | 6 +- .../src/v2/executions_client.ts | 5 + .../google-cloud-run/src/v2/jobs_client.ts | 5 + .../src/v2/revisions_client.ts | 5 + .../src/v2/services_client.ts | 23 ++- 20 files changed, 645 insertions(+), 256 deletions(-) diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto index bfc65364739..bf23a68e92f 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/condition.proto @@ -149,6 +149,10 @@ message Condition { // A revision's container has no port specified since the revision is of a // manually scaled service with 0 instance count HEALTH_CHECK_SKIPPED = 11; + + // A revision with min_instance_count > 0 was created and is waiting for + // enough instances to begin a traffic migration. + MIN_INSTANCES_WARMING = 12; } // Reasons specific to Execution resource. diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto index 04644caea61..0d9bde3a641 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/execution.proto @@ -34,7 +34,8 @@ option java_package = "com.google.cloud.run.v2"; // Cloud Run Execution Control Plane API. service Executions { option (google.api.default_host) = "run.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Gets information about an Execution. rpc GetExecution(GetExecutionRequest) returns (Execution) { @@ -53,7 +54,8 @@ service Executions { } // Deletes an Execution. - rpc DeleteExecution(DeleteExecutionRequest) returns (google.longrunning.Operation) { + rpc DeleteExecution(DeleteExecutionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v2/{name=projects/*/locations/*/jobs/*/executions/*}" }; @@ -73,9 +75,7 @@ message GetExecutionRequest { // where {project} can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Execution" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Execution" } ]; } @@ -121,9 +121,7 @@ message DeleteExecutionRequest { // where {project} can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Execution" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Execution" } ]; // Indicates that the request should be validated without actually @@ -148,8 +146,9 @@ message Execution { // Output only. The unique name of this Execution. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Server assigned unique identifier for the Execution. The value is a UUID4 - // string and guaranteed to remain unchanged until the resource is deleted. + // Output only. Server assigned unique identifier for the Execution. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A number that monotonically increases every time the user @@ -162,39 +161,42 @@ message Execution { // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - // Cloud Run will populate some labels with 'run.googleapis.com' or - // 'serving.knative.dev' namespaces. Those labels are read-only, and user - // changes will not be preserved. map labels = 4; // KRM-style annotations for the resource. map annotations = 5; - // Output only. Represents time when the execution was acknowledged by the execution - // controller. It is not guaranteed to be set in happens-before order across - // separate operations. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Represents time when the execution was acknowledged by the + // execution controller. It is not guaranteed to be set in happens-before + // order across separate operations. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Represents time when the execution started to run. // It is not guaranteed to be set in happens-before order across separate // operations. - google.protobuf.Timestamp start_time = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Represents time when the execution was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - google.protobuf.Timestamp completion_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Represents time when the execution was completed. It is not + // guaranteed to be set in happens-before order across separate operations. + google.protobuf.Timestamp completion_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the deletion time. It is only // populated as a response to a Delete request. - google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the time after which it will be // permamently deleted. It is only populated as a response to a Delete // request. - google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Set the launch stage to a preview stage on write to allow use of preview // features in that stage. On read, describes whether the resource uses @@ -205,21 +207,19 @@ message Execution { // Output only. The name of the parent Job. string job = 12 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } ]; - // Output only. Specifies the maximum desired number of tasks the execution should - // run at any given time. Must be <= task_count. The actual number of + // Output only. Specifies the maximum desired number of tasks the execution + // should run at any given time. Must be <= task_count. The actual number of // tasks running in steady state will be less than this number when // ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when // the work left to do is less than max parallelism. More info: // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ int32 parallelism = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Specifies the desired number of tasks the execution should run. - // Setting to 1 means that parallelism is limited to 1 and the success of + // Output only. Specifies the desired number of tasks the execution should + // run. Setting to 1 means that parallelism is limited to 1 and the success of // that task signals the success of the execution. // More info: // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ @@ -228,17 +228,20 @@ message Execution { // Output only. The template used to create tasks for this execution. TaskTemplate template = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Indicates whether the resource's reconciliation is still in progress. - // See comments in `Job.reconciling` for additional information on + // Output only. Indicates whether the resource's reconciliation is still in + // progress. See comments in `Job.reconciling` for additional information on // reconciliation process in Cloud Run. bool reconciling = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Condition of this Execution, containing its readiness status, and - // detailed error information in case it did not reach the desired state. - repeated Condition conditions = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The Condition of this Execution, containing its readiness + // status, and detailed error information in case it did not reach the desired + // state. + repeated Condition conditions = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The generation of this Execution. See comments in `reconciling` for - // additional information on reconciliation process in Cloud Run. + // Output only. The generation of this Execution. See comments in + // `reconciling` for additional information on reconciliation process in Cloud + // Run. int64 observed_generation = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The number of actively running tasks. @@ -250,6 +253,16 @@ message Execution { // Output only. The number of tasks which reached phase Failed. int32 failed_count = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The number of tasks which reached phase Cancelled. + int32 cancelled_count = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number of tasks which have retried at least once. + int32 retried_count = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. URI where logs for this execution can be found in Cloud + // Console. + string log_uri = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. A system-generated fingerprint for this version of the // resource. May be used to detect modification conflict during updates. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto index e0657f6cb7a..f8fe9c4204f 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/execution_template.proto @@ -28,9 +28,19 @@ option java_package = "com.google.cloud.run.v2"; // from a template. message ExecutionTemplate { // KRM-style labels for the resource. + // + //

Cloud Run API v2 does not support labels with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system labels in v1 now have a + // corresponding field in v2 ExecutionTemplate. map labels = 1; // KRM-style annotations for the resource. + // + //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system annotations in v1 now + // have a corresponding field in v2 ExecutionTemplate. map annotations = 2; // Specifies the maximum desired number of tasks the execution should run at @@ -49,6 +59,7 @@ message ExecutionTemplate { // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ int32 task_count = 4; - // Required. Describes the task(s) that will be created when executing an execution. + // Required. Describes the task(s) that will be created when executing an + // execution. TaskTemplate template = 5 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto index b5331f08b73..349973099b9 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/job.proto @@ -16,6 +16,8 @@ syntax = "proto3"; package google.cloud.run.v2; +import public "google/cloud/run/v2/execution.proto"; + import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; @@ -37,7 +39,8 @@ option java_package = "com.google.cloud.run.v2"; // Cloud Run Job Control Plane API. service Jobs { option (google.api.default_host) = "run.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates a Job. rpc CreateJob(CreateJobRequest) returns (google.longrunning.Operation) { @@ -108,7 +111,8 @@ service Jobs { // Gets the IAM Access Control policy currently in effect for the given Job. // This result does not include any inherited policies. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { get: "/v2/{resource=projects/*/locations/*/jobs/*}:getIamPolicy" }; @@ -116,7 +120,8 @@ service Jobs { // Sets the IAM Access control policy for the specified Job. Overwrites // any existing policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/jobs/*}:setIamPolicy" body: "*" @@ -126,7 +131,8 @@ service Jobs { // Returns permissions that a caller has on the specified Project. // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/jobs/*}:testIamPermissions" body: "*" @@ -141,9 +147,7 @@ message CreateJobRequest { // project id or number. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { child_type: "run.googleapis.com/Job" } ]; // Required. The Job instance to create. @@ -165,9 +169,7 @@ message GetJobRequest { // can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } ]; } @@ -193,9 +195,7 @@ message ListJobsRequest { // project id or number. string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { child_type: "run.googleapis.com/Job" } ]; // Maximum number of Jobs to return in this call. @@ -226,9 +226,7 @@ message DeleteJobRequest { // can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } ]; // Indicates that the request should be validated without actually @@ -247,9 +245,7 @@ message RunJobRequest { // can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } ]; // Indicates that the request should be validated without actually @@ -261,8 +257,8 @@ message RunJobRequest { string etag = 3; } -// Job represents the configuration of a single job. A job an immutable resource -// that references a container image which is run to completion. +// Job represents the configuration of a single job, which references a +// container image that is run to completion. message Job { option (google.api.resource) = { type: "run.googleapis.com/Job" @@ -276,8 +272,9 @@ message Job { // projects/{project}/locations/{location}/jobs/{job} string name = 1; - // Output only. Server assigned unique identifier for the Execution. The value is a UUID4 - // string and guaranteed to remain unchanged until the resource is deleted. + // Output only. Server assigned unique identifier for the Execution. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A number that monotonically increases every time the user @@ -290,32 +287,43 @@ message Job { // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - // Cloud Run will populate some labels with 'run.googleapis.com' or - // 'serving.knative.dev' namespaces. Those labels are read-only, and user - // changes will not be preserved. + // + //

Cloud Run API v2 does not support labels with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system labels in v1 now have a + // corresponding field in v2 Job. map labels = 4; // KRM-style annotations for the resource. Unstructured key value map that may // be set by external tools to store and arbitrary metadata. // They are not queryable and should be preserved - // when modifying objects. Cloud Run will populate some annotations using - // 'run.googleapis.com' or 'serving.knative.dev' namespaces. This field - // follows Kubernetes annotations' namespacing, limits, and rules. More info: - // https://kubernetes.io/docs/user-guide/annotations + // when modifying objects. + // + //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system annotations in v1 now + // have a corresponding field in v2 Job. + // + //

This field follows Kubernetes annotations' namespacing, limits, and + // rules. More info: https://kubernetes.io/docs/user-guide/annotations map annotations = 5; // Output only. The creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The deletion time. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the time after which it will be // permamently deleted. - google.protobuf.Timestamp expire_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Email address of the authenticated creator. string creator = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -341,28 +349,30 @@ message Job { // Required. The template used to create executions for this Job. ExecutionTemplate template = 16 [(google.api.field_behavior) = REQUIRED]; - // Output only. The generation of this Job. See comments in `reconciling` for additional - // information on reconciliation process in Cloud Run. + // Output only. The generation of this Job. See comments in `reconciling` for + // additional information on reconciliation process in Cloud Run. int64 observed_generation = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Condition of this Job, containing its readiness status, and - // detailed error information in case it did not reach the desired state. + // Output only. The Condition of this Job, containing its readiness status, + // and detailed error information in case it did not reach the desired state. Condition terminal_condition = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Conditions of all other associated sub-resources. They contain - // additional diagnostics information in case the Job does not reach its - // desired state. See comments in `reconciling` for additional information on - // reconciliation process in Cloud Run. - repeated Condition conditions = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The Conditions of all other associated sub-resources. They + // contain additional diagnostics information in case the Job does not reach + // its desired state. See comments in `reconciling` for additional information + // on reconciliation process in Cloud Run. + repeated Condition conditions = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Number of executions created for this job. int32 execution_count = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Name of the last created execution. - ExecutionReference latest_created_execution = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + ExecutionReference latest_created_execution = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Returns true if the Job is currently being acted upon by the system to - // bring it into the desired state. + // Output only. Returns true if the Job is currently being acted upon by the + // system to bring it into the desired state. // // When a new Job is created, or an existing one is updated, Cloud Run // will asynchronously perform all necessary steps to bring the Job to the @@ -393,9 +403,9 @@ message Job { // to get full execution including the latest status. message ExecutionReference { // Name of the execution. - string name = 1 [(google.api.resource_reference) = { - type: "run.googleapis.com/Execution" - }]; + string name = 1 [ + (google.api.resource_reference) = { type: "run.googleapis.com/Execution" } + ]; // Creation timestamp of the execution. google.protobuf.Timestamp create_time = 2; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto index 31c81bea1bb..f09c96bc81c 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/k8s.min.proto @@ -46,11 +46,13 @@ option (google.api.resource_definition) = { // Note that additional arguments may be supplied by the system to the container // at runtime. message Container { - // Name of the container specified as a DNS_LABEL. + // Name of the container specified as a DNS_LABEL (RFC 1123). string name = 1; - // Required. URL of the Container image in Google Container Registry or Google Artifact - // Registry. More info: https://kubernetes.io/docs/concepts/containers/images + // Required. Name of the container image in Dockerhub, Google Artifact + // Registry, or Google Container Registry. If the host is not provided, + // Dockerhub is assumed. More info: + // https://kubernetes.io/docs/concepts/containers/images string image = 2 [(google.api.field_behavior) = REQUIRED]; // Entrypoint array. Not executed within a shell. @@ -129,8 +131,8 @@ message ResourceRequirements { // EnvVar represents an environment variable present in a Container. message EnvVar { - // Required. Name of the environment variable. Must be a C_IDENTIFIER, and mnay not - // exceed 32768 characters. + // Required. Name of the environment variable. Must be a C_IDENTIFIER, and + // mnay not exceed 32768 characters. string name = 1 [(google.api.field_behavior) = REQUIRED]; oneof values { @@ -172,8 +174,8 @@ message SecretKeySelector { // Can be 'latest' for the latest version, an integer for a specific version, // or a version alias. string version = 2 [(google.api.resource_reference) = { - type: "secretmanager.googleapis.com/SecretVersion" - }]; + type: "secretmanager.googleapis.com/SecretVersion" + }]; } // ContainerPort represents a network port in a single container. @@ -192,8 +194,8 @@ message VolumeMount { // Required. This must match the Name of a Volume. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Path within the container at which the volume should be mounted. Must - // not contain ':'. For Cloud SQL volumes, it can be left empty, or must + // Required. Path within the container at which the volume should be mounted. + // Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must // otherwise be `/cloudsql`. All instances defined in the Volume will be // available as `/cloudsql/[instance]`. For more information on Cloud SQL // volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run @@ -284,7 +286,10 @@ message VersionToPath { int32 mode = 3; } -// Represents a specific Cloud SQL instance. +// Represents a set of Cloud SQL instances. Each one will be available under +// /cloudsql/[instance]. Visit +// https://cloud.google.com/sql/docs/mysql/connect-run for more information on +// how to connect Cloud SQL and Cloud Run. message CloudSqlInstance { // The Cloud SQL instance connection names, as can be found in // https://console.cloud.google.com/sql/instances. Visit diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto index bf5b4e90458..117f4f11886 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/revision.proto @@ -37,7 +37,8 @@ option java_package = "com.google.cloud.run.v2"; // Cloud Run Revision Control Plane API. service Revisions { option (google.api.default_host) = "run.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Gets information about a Revision. rpc GetRevision(GetRevisionRequest) returns (Revision) { @@ -68,7 +69,8 @@ service Revisions { } // Deletes a Revision. - rpc DeleteRevision(DeleteRevisionRequest) returns (google.longrunning.Operation) { + rpc DeleteRevision(DeleteRevisionRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v2/{name=projects/*/locations/*/services/*/revisions/*}" }; @@ -93,9 +95,7 @@ message GetRevisionRequest { // projects/{project}/locations/{location}/services/{service}/revisions/{revision} string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } ]; } @@ -142,9 +142,7 @@ message DeleteRevisionRequest { // projects/{project}/locations/{location}/services/{service}/revisions/{revision} string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } ]; // Indicates that the request should be validated without actually @@ -169,8 +167,9 @@ message Revision { // Output only. The unique name of this Revision. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Server assigned unique identifier for the Revision. The value is a UUID4 - // string and guaranteed to remain unchanged until the resource is deleted. + // Output only. Server assigned unique identifier for the Revision. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A number that monotonically increases every time the user @@ -183,28 +182,29 @@ message Revision { // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - // Cloud Run will populate some labels with 'run.googleapis.com' or - // 'serving.knative.dev' namespaces. Those labels are read-only, and user - // changes will not be preserved. map labels = 4; // KRM-style annotations for the resource. map annotations = 5; // Output only. The creation time. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the deletion time. It is only // populated as a response to a Delete request. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the time after which it will be // permamently deleted. It is only populated as a response to a Delete // request. - google.protobuf.Timestamp expire_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Set the launch stage to a preview stage on write to allow use of preview // features in that stage. On read, describes whether the resource uses @@ -215,9 +215,7 @@ message Revision { // Output only. The name of the parent service. string service = 11 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "run.googleapis.com/Service" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Service" } ]; // Scaling settings for this revision. @@ -252,21 +250,30 @@ message Revision { // this container image. For more information, go to // https://cloud.google.com/run/docs/securing/using-cmek string encryption_key = 21 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + type: "cloudkms.googleapis.com/CryptoKey" + }]; + + // The action to take if the encryption key is revoked. + EncryptionKeyRevocationAction encryption_key_revocation_action = 23; + + // If encryption_key_revocation_action is SHUTDOWN, the duration before + // shutting down all instances. The minimum increment is 1 hour. + google.protobuf.Duration encryption_key_shutdown_duration = 24; - // Output only. Indicates whether the resource's reconciliation is still in progress. - // See comments in `Service.reconciling` for additional information on - // reconciliation process in Cloud Run. + // Output only. Indicates whether the resource's reconciliation is still in + // progress. See comments in `Service.reconciling` for additional information + // on reconciliation process in Cloud Run. bool reconciling = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Condition of this Revision, containing its readiness status, and - // detailed error information in case it did not reach a serving state. - repeated Condition conditions = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The Condition of this Revision, containing its readiness + // status, and detailed error information in case it did not reach a serving + // state. + repeated Condition conditions = 31 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The generation of this Revision currently serving traffic. See comments in - // `reconciling` for additional information on reconciliation process in Cloud - // Run. + // Output only. The generation of this Revision currently serving traffic. See + // comments in `reconciling` for additional information on reconciliation + // process in Cloud Run. int64 observed_generation = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The Google Console URI to obtain logs for the Revision. diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto index f20fb5eb68a..2abd4d9eecb 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/revision_template.proto @@ -31,14 +31,24 @@ option java_package = "com.google.cloud.run.v2"; message RevisionTemplate { // The unique name for the revision. If this field is omitted, it will be // automatically generated based on the Service name. - string revision = 1 [(google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - }]; + string revision = 1 [ + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } + ]; // KRM-style labels for the resource. + // + //

Cloud Run API v2 does not support labels with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system labels in v1 now have a + // corresponding field in v2 RevisionTemplate. map labels = 2; // KRM-style annotations for the resource. + // + //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system annotations in v1 now + // have a corresponding field in v2 RevisionTemplate. map annotations = 3; // Scaling settings for this Revision. @@ -71,8 +81,8 @@ message RevisionTemplate { // this container image. For more information, go to // https://cloud.google.com/run/docs/securing/using-cmek string encryption_key = 14 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + type: "cloudkms.googleapis.com/CryptoKey" + }]; // Sets the maximum number of requests that each serving instance can receive. int32 max_instance_request_concurrency = 15; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto index 2357a35b92c..a2eb4039a33 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/service.proto @@ -39,10 +39,12 @@ option java_package = "com.google.cloud.run.v2"; // Cloud Run Service Control Plane API service Services { option (google.api.default_host) = "run.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Creates a new Service in a given project and location. - rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { + rpc CreateService(CreateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/locations/*}/services" body: "service" @@ -89,7 +91,8 @@ service Services { } // Updates a Service. - rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) { + rpc UpdateService(UpdateServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v2/{service.name=projects/*/locations/*/services/*}" body: "service" @@ -110,7 +113,8 @@ service Services { // Deletes a Service. // This will cause the Service to stop serving traffic and will delete all // revisions. - rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + rpc DeleteService(DeleteServiceRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v2/{name=projects/*/locations/*/services/*}" }; @@ -129,7 +133,8 @@ service Services { // Gets the IAM Access Control policy currently in effect for the given // Cloud Run Service. This result does not include any inherited policies. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { get: "/v2/{resource=projects/*/locations/*/services/*}:getIamPolicy" }; @@ -137,7 +142,8 @@ service Services { // Sets the IAM Access control policy for the specified Service. Overwrites // any existing policy. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/services/*}:setIamPolicy" body: "*" @@ -147,7 +153,8 @@ service Services { // Returns permissions that a caller has on the specified Project. // // There are no permissions required for making this API call. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v2/{resource=projects/*/locations/*/services/*}:testIamPermissions" body: "*" @@ -198,9 +205,9 @@ message UpdateServiceRequest { // Request message for retrieving a list of Services. message ListServicesRequest { // Required. The location and project to list resources on. - // Location must be a valid GCP region, and cannot be the "-" wildcard. - // Format: projects/{project}/locations/{location}, where {project} can be - // project id or number. + // Location must be a valid Google Cloud region, and cannot be the "-" + // wildcard. Format: projects/{project}/locations/{location}, where {project} + // can be project id or number. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -236,9 +243,7 @@ message GetServiceRequest { // {project} can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Service" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Service" } ]; } @@ -249,9 +254,7 @@ message DeleteServiceRequest { // {project} can be project id or number. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Service" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Service" } ]; // Indicates that the request should be validated without actually @@ -287,8 +290,9 @@ message Service { // 512-character limit. string description = 2; - // Output only. Server assigned unique identifier for the trigger. The value is a UUID4 - // string and guaranteed to remain unchanged until the resource is deleted. + // Output only. Server assigned unique identifier for the trigger. The value + // is a UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A number that monotonically increases every time the user @@ -304,31 +308,43 @@ message Service { // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - // Cloud Run will populate some labels with 'run.googleapis.com' or - // 'serving.knative.dev' namespaces. Those labels are read-only, and user - // changes will not be preserved. + // + //

Cloud Run API v2 does not support labels with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system labels in v1 now have a + // corresponding field in v2 Service. map labels = 5; // Unstructured key value map that may be set by external tools to store and // arbitrary metadata. They are not queryable and should be preserved - // when modifying objects. Cloud Run will populate some annotations using - // 'run.googleapis.com' or 'serving.knative.dev' namespaces. This field - // follows Kubernetes annotations' namespacing, limits, and rules. More info: + // when modifying objects. + // + //

Cloud Run API v2 does not support annotations with `run.googleapis.com`, + // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` + // namespaces, and they will be rejected. All system annotations in v1 now + // have a corresponding field in v2 Service. + // + //

This field follows Kubernetes + // annotations' namespacing, limits, and rules. More info: // https://kubernetes.io/docs/user-guide/annotations map annotations = 6; // Output only. The creation time. - google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The deletion time. - google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the time after which it will be // permamently deleted. - google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Email address of the authenticated creator. string creator = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -364,54 +380,53 @@ message Service { // 100% traffic to the latest `Ready` Revision. repeated TrafficTarget traffic = 19; - // Output only. The generation of this Service currently serving traffic. See comments in - // `reconciling` for additional information on reconciliation process in Cloud - // Run. - // Please note that unlike v1, this is an int64 value. As with most Google - // APIs, its JSON representation will be a `string` instead of an `integer`. + // Output only. The generation of this Service currently serving traffic. See + // comments in `reconciling` for additional information on reconciliation + // process in Cloud Run. Please note that unlike v1, this is an int64 value. + // As with most Google APIs, its JSON representation will be a `string` + // instead of an `integer`. int64 observed_generation = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Condition of this Service, containing its readiness status, and - // detailed error information in case it did not reach a serving state. See - // comments in `reconciling` for additional information on reconciliation - // process in Cloud Run. + // Output only. The Condition of this Service, containing its readiness + // status, and detailed error information in case it did not reach a serving + // state. See comments in `reconciling` for additional information on + // reconciliation process in Cloud Run. Condition terminal_condition = 31 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Conditions of all other associated sub-resources. They contain - // additional diagnostics information in case the Service does not reach its - // Serving state. See comments in `reconciling` for additional information on - // reconciliation process in Cloud Run. - repeated Condition conditions = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The Conditions of all other associated sub-resources. They + // contain additional diagnostics information in case the Service does not + // reach its Serving state. See comments in `reconciling` for additional + // information on reconciliation process in Cloud Run. + repeated Condition conditions = 32 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Name of the latest revision that is serving traffic. See comments in - // `reconciling` for additional information on reconciliation process in Cloud - // Run. + // Output only. Name of the latest revision that is serving traffic. See + // comments in `reconciling` for additional information on reconciliation + // process in Cloud Run. string latest_ready_revision = 33 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } ]; - // Output only. Name of the last created revision. See comments in `reconciling` for - // additional information on reconciliation process in Cloud Run. + // Output only. Name of the last created revision. See comments in + // `reconciling` for additional information on reconciliation process in Cloud + // Run. string latest_created_revision = 34 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } ]; - // Output only. Detailed status information for corresponding traffic targets. See comments - // in `reconciling` for additional information on reconciliation process in - // Cloud Run. - repeated TrafficTargetStatus traffic_statuses = 35 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Detailed status information for corresponding traffic targets. + // See comments in `reconciling` for additional information on reconciliation + // process in Cloud Run. + repeated TrafficTargetStatus traffic_statuses = 35 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The main URI in which this Service is serving traffic. string uri = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Returns true if the Service is currently being acted upon by the system to - // bring it into the desired state. + // Output only. Returns true if the Service is currently being acted upon by + // the system to bring it into the desired state. // // When a new Service is created, or an existing one is updated, Cloud Run // will asynchronously perform all necessary steps to bring the Service to the diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto index 0fa6b03b9d8..0b73bb38dd7 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/task.proto @@ -35,7 +35,8 @@ option java_package = "com.google.cloud.run.v2"; // Cloud Run Task Control Plane API. service Tasks { option (google.api.default_host) = "run.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Gets information about a Task. rpc GetTask(GetTaskRequest) returns (Task) { @@ -61,9 +62,7 @@ message GetTaskRequest { // projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task} string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "run.googleapis.com/Task" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Task" } ]; } @@ -75,9 +74,7 @@ message ListTasksRequest { // projects/{project}/locations/{location}/jobs/{job}/executions/{execution} string parent = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "run.googleapis.com/Task" - } + (google.api.resource_reference) = { child_type: "run.googleapis.com/Task" } ]; // Maximum number of Tasks to return in this call. @@ -112,8 +109,9 @@ message Task { // Output only. The unique name of this Task. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Server assigned unique identifier for the Task. The value is a UUID4 - // string and guaranteed to remain unchanged until the resource is deleted. + // Output only. Server assigned unique identifier for the Task. The value is a + // UUID4 string and guaranteed to remain unchanged until the resource is + // deleted. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. A number that monotonically increases every time the user @@ -126,54 +124,53 @@ message Task { // environment, state, etc. For more information, visit // https://cloud.google.com/resource-manager/docs/creating-managing-labels or // https://cloud.google.com/run/docs/configuring/labels - // Cloud Run will populate some labels with 'run.googleapis.com' or - // 'serving.knative.dev' namespaces. Those labels are read-only, and user - // changes will not be preserved. map labels = 4; // KRM-style annotations for the resource. map annotations = 5; - // Output only. Represents time when the task was created by the job controller. - // It is not guaranteed to be set in happens-before order across separate - // operations. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Represents time when the task was created by the job + // controller. It is not guaranteed to be set in happens-before order across + // separate operations. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Represents time when the task started to run. // It is not guaranteed to be set in happens-before order across separate // operations. - google.protobuf.Timestamp start_time = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp start_time = 27 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Represents time when the Task was completed. It is not guaranteed to - // be set in happens-before order across separate operations. - google.protobuf.Timestamp completion_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Represents time when the Task was completed. It is not + // guaranteed to be set in happens-before order across separate operations. + google.protobuf.Timestamp completion_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The last-modified time. - google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the deletion time. It is only // populated as a response to a Delete request. - google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. For a deleted resource, the time after which it will be // permamently deleted. It is only populated as a response to a Delete // request. - google.protobuf.Timestamp expire_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp expire_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the parent Job. string job = 12 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "run.googleapis.com/Job" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Job" } ]; // Output only. The name of the parent Execution. string execution = 13 [ (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "run.googleapis.com/Execution" - } + (google.api.resource_reference) = { type: "run.googleapis.com/Execution" } ]; // Holds the single container that defines the unit of execution for this @@ -200,14 +197,15 @@ message Task { // The execution environment being used to host this Task. ExecutionEnvironment execution_environment = 20; - // Output only. Indicates whether the resource's reconciliation is still in progress. - // See comments in `Job.reconciling` for additional information on + // Output only. Indicates whether the resource's reconciliation is still in + // progress. See comments in `Job.reconciling` for additional information on // reconciliation process in Cloud Run. bool reconciling = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The Condition of this Task, containing its readiness status, and - // detailed error information in case it did not reach the desired state. - repeated Condition conditions = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The Condition of this Task, containing its readiness status, + // and detailed error information in case it did not reach the desired state. + repeated Condition conditions = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The generation of this Task. See comments in `Job.reconciling` // for additional information on reconciliation process in Cloud Run. @@ -221,10 +219,11 @@ message Task { int32 retried = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Result of the last attempt of this Task. - TaskAttemptResult last_attempt_result = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; + TaskAttemptResult last_attempt_result = 26 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. A reference to a customer managed encryption key (CMEK) to use to encrypt - // this container image. For more information, go to + // Output only. A reference to a customer managed encryption key (CMEK) to use + // to encrypt this container image. For more information, go to // https://cloud.google.com/run/docs/securing/using-cmek string encryption_key = 28 [ (google.api.field_behavior) = OUTPUT_ONLY, @@ -233,10 +232,15 @@ message Task { } ]; - // Output only. VPC Access configuration to use for this Task. For more information, - // visit https://cloud.google.com/run/docs/configuring/connecting-vpc. + // Output only. VPC Access configuration to use for this Task. For more + // information, visit + // https://cloud.google.com/run/docs/configuring/connecting-vpc. VpcAccess vpc_access = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. URI where logs for this execution can be found in Cloud + // Console. + string log_uri = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. A system-generated fingerprint for this version of the // resource. May be used to detect modification conflict during updates. string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto index b5b43fba24a..5507bfd8f2c 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/task_template.proto @@ -59,8 +59,8 @@ message TaskTemplate { // this container image. For more information, go to // https://cloud.google.com/run/docs/securing/using-cmek string encryption_key = 7 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + type: "cloudkms.googleapis.com/CryptoKey" + }]; // VPC Access configuration to use for this Task. For more information, // visit https://cloud.google.com/run/docs/configuring/connecting-vpc. diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto index 18a8c7d99f6..f0f1fc0a4fc 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/traffic_target.proto @@ -31,9 +31,9 @@ message TrafficTarget { // Revision to which to send this portion of traffic, if traffic allocation is // by revision. - string revision = 2 [(google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - }]; + string revision = 2 [ + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } + ]; // Specifies percent of the traffic to this Revision. // This defaults to zero if unspecified. @@ -50,9 +50,9 @@ message TrafficTargetStatus { TrafficTargetAllocationType type = 1; // Revision to which this traffic is sent. - string revision = 2 [(google.api.resource_reference) = { - type: "run.googleapis.com/Revision" - }]; + string revision = 2 [ + (google.api.resource_reference) = { type: "run.googleapis.com/Revision" } + ]; // Specifies percent of the traffic to this Revision. int32 percent = 3; diff --git a/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto b/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto index 0ee74eafa86..8e70538995f 100644 --- a/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto +++ b/packages/google-cloud-run/protos/google/cloud/run/v2/vendor_settings.proto @@ -44,8 +44,8 @@ message VpcAccess { // Format: projects/{project}/locations/{location}/connectors/{connector}, // where {project} can be project id or number. string connector = 1 [(google.api.resource_reference) = { - type: "vpcaccess.googleapis.com/Connector" - }]; + type: "vpcaccess.googleapis.com/Connector" + }]; // Traffic VPC egress settings. VpcEgress egress = 2; @@ -101,3 +101,15 @@ enum ExecutionEnvironment { // Uses Second Generation environment. EXECUTION_ENVIRONMENT_GEN2 = 2; } + +// Specifies behavior if an encryption key used by a resource is revoked. +enum EncryptionKeyRevocationAction { + // Unspecified + ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED = 0; + + // Prevents the creation of new instances. + PREVENT_NEW = 1; + + // Shuts down existing instances, and prevents creation of new ones. + SHUTDOWN = 2; +} diff --git a/packages/google-cloud-run/protos/protos.d.ts b/packages/google-cloud-run/protos/protos.d.ts index 1f48b3de2cf..434fec60a93 100644 --- a/packages/google-cloud-run/protos/protos.d.ts +++ b/packages/google-cloud-run/protos/protos.d.ts @@ -4069,7 +4069,8 @@ export namespace google { MIN_INSTANCES_NOT_PROVISIONED = 8, ACTIVE_REVISION_LIMIT_REACHED = 9, NO_DEPLOYMENT = 10, - HEALTH_CHECK_SKIPPED = 11 + HEALTH_CHECK_SKIPPED = 11, + MIN_INSTANCES_WARMING = 12 } /** ExecutionReason enum. */ @@ -4661,6 +4662,15 @@ export namespace google { /** Execution failedCount */ failedCount?: (number|null); + /** Execution cancelledCount */ + cancelledCount?: (number|null); + + /** Execution retriedCount */ + retriedCount?: (number|null); + + /** Execution logUri */ + logUri?: (string|null); + /** Execution etag */ etag?: (string|null); } @@ -4740,6 +4750,15 @@ export namespace google { /** Execution failedCount. */ public failedCount: number; + /** Execution cancelledCount. */ + public cancelledCount: number; + + /** Execution retriedCount. */ + public retriedCount: number; + + /** Execution logUri. */ + public logUri: string; + /** Execution etag. */ public etag: string; @@ -7047,6 +7066,13 @@ export namespace google { EXECUTION_ENVIRONMENT_GEN2 = 2 } + /** EncryptionKeyRevocationAction enum. */ + enum EncryptionKeyRevocationAction { + ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED = 0, + PREVENT_NEW = 1, + SHUTDOWN = 2 + } + /** Properties of an ExecutionTemplate. */ interface IExecutionTemplate { @@ -9050,6 +9076,12 @@ export namespace google { /** Revision encryptionKey */ encryptionKey?: (string|null); + /** Revision encryptionKeyRevocationAction */ + encryptionKeyRevocationAction?: (google.cloud.run.v2.EncryptionKeyRevocationAction|keyof typeof google.cloud.run.v2.EncryptionKeyRevocationAction|null); + + /** Revision encryptionKeyShutdownDuration */ + encryptionKeyShutdownDuration?: (google.protobuf.IDuration|null); + /** Revision reconciling */ reconciling?: (boolean|null); @@ -9135,6 +9167,12 @@ export namespace google { /** Revision encryptionKey. */ public encryptionKey: string; + /** Revision encryptionKeyRevocationAction. */ + public encryptionKeyRevocationAction: (google.cloud.run.v2.EncryptionKeyRevocationAction|keyof typeof google.cloud.run.v2.EncryptionKeyRevocationAction); + + /** Revision encryptionKeyShutdownDuration. */ + public encryptionKeyShutdownDuration?: (google.protobuf.IDuration|null); + /** Revision reconciling. */ public reconciling: boolean; @@ -11198,6 +11236,9 @@ export namespace google { /** Task vpcAccess */ vpcAccess?: (google.cloud.run.v2.IVpcAccess|null); + /** Task logUri */ + logUri?: (string|null); + /** Task etag */ etag?: (string|null); } @@ -11292,6 +11333,9 @@ export namespace google { /** Task vpcAccess. */ public vpcAccess?: (google.cloud.run.v2.IVpcAccess|null); + /** Task logUri. */ + public logUri: string; + /** Task etag. */ public etag: string; diff --git a/packages/google-cloud-run/protos/protos.js b/packages/google-cloud-run/protos/protos.js index cdf8059bec5..3c1afed78a4 100644 --- a/packages/google-cloud-run/protos/protos.js +++ b/packages/google-cloud-run/protos/protos.js @@ -10943,6 +10943,7 @@ case 9: case 10: case 11: + case 12: break; } } @@ -11159,6 +11160,10 @@ case 11: message.revisionReason = 11; break; + case "MIN_INSTANCES_WARMING": + case 12: + message.revisionReason = 12; + break; } switch (object.executionReason) { default: @@ -11355,6 +11360,7 @@ * @property {number} ACTIVE_REVISION_LIMIT_REACHED=9 ACTIVE_REVISION_LIMIT_REACHED value * @property {number} NO_DEPLOYMENT=10 NO_DEPLOYMENT value * @property {number} HEALTH_CHECK_SKIPPED=11 HEALTH_CHECK_SKIPPED value + * @property {number} MIN_INSTANCES_WARMING=12 MIN_INSTANCES_WARMING value */ Condition.RevisionReason = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -11370,6 +11376,7 @@ values[valuesById[9] = "ACTIVE_REVISION_LIMIT_REACHED"] = 9; values[valuesById[10] = "NO_DEPLOYMENT"] = 10; values[valuesById[11] = "HEALTH_CHECK_SKIPPED"] = 11; + values[valuesById[12] = "MIN_INSTANCES_WARMING"] = 12; return values; })(); @@ -12530,6 +12537,9 @@ * @property {number|null} [runningCount] Execution runningCount * @property {number|null} [succeededCount] Execution succeededCount * @property {number|null} [failedCount] Execution failedCount + * @property {number|null} [cancelledCount] Execution cancelledCount + * @property {number|null} [retriedCount] Execution retriedCount + * @property {string|null} [logUri] Execution logUri * @property {string|null} [etag] Execution etag */ @@ -12727,6 +12737,30 @@ */ Execution.prototype.failedCount = 0; + /** + * Execution cancelledCount. + * @member {number} cancelledCount + * @memberof google.cloud.run.v2.Execution + * @instance + */ + Execution.prototype.cancelledCount = 0; + + /** + * Execution retriedCount. + * @member {number} retriedCount + * @memberof google.cloud.run.v2.Execution + * @instance + */ + Execution.prototype.retriedCount = 0; + + /** + * Execution logUri. + * @member {string} logUri + * @memberof google.cloud.run.v2.Execution + * @instance + */ + Execution.prototype.logUri = ""; + /** * Execution etag. * @member {string} etag @@ -12806,6 +12840,12 @@ writer.uint32(/* id 21, wireType 0 =*/168).int32(message.failedCount); if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.cancelledCount != null && Object.hasOwnProperty.call(message, "cancelledCount")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.cancelledCount); + if (message.retriedCount != null && Object.hasOwnProperty.call(message, "retriedCount")) + writer.uint32(/* id 25, wireType 0 =*/200).int32(message.retriedCount); + if (message.logUri != null && Object.hasOwnProperty.call(message, "logUri")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.logUri); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; @@ -12970,6 +13010,18 @@ message.failedCount = reader.int32(); break; } + case 24: { + message.cancelledCount = reader.int32(); + break; + } + case 25: { + message.retriedCount = reader.int32(); + break; + } + case 26: { + message.logUri = reader.string(); + break; + } case 99: { message.etag = reader.string(); break; @@ -13116,6 +13168,15 @@ if (message.failedCount != null && message.hasOwnProperty("failedCount")) if (!$util.isInteger(message.failedCount)) return "failedCount: integer expected"; + if (message.cancelledCount != null && message.hasOwnProperty("cancelledCount")) + if (!$util.isInteger(message.cancelledCount)) + return "cancelledCount: integer expected"; + if (message.retriedCount != null && message.hasOwnProperty("retriedCount")) + if (!$util.isInteger(message.retriedCount)) + return "retriedCount: integer expected"; + if (message.logUri != null && message.hasOwnProperty("logUri")) + if (!$util.isString(message.logUri)) + return "logUri: string expected"; if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -13269,6 +13330,12 @@ message.succeededCount = object.succeededCount | 0; if (object.failedCount != null) message.failedCount = object.failedCount | 0; + if (object.cancelledCount != null) + message.cancelledCount = object.cancelledCount | 0; + if (object.retriedCount != null) + message.retriedCount = object.retriedCount | 0; + if (object.logUri != null) + message.logUri = String(object.logUri); if (object.etag != null) message.etag = String(object.etag); return message; @@ -13321,6 +13388,9 @@ object.succeededCount = 0; object.failedCount = 0; object.startTime = null; + object.cancelledCount = 0; + object.retriedCount = 0; + object.logUri = ""; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -13383,6 +13453,12 @@ object.failedCount = message.failedCount; if (message.startTime != null && message.hasOwnProperty("startTime")) object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.cancelledCount != null && message.hasOwnProperty("cancelledCount")) + object.cancelledCount = message.cancelledCount; + if (message.retriedCount != null && message.hasOwnProperty("retriedCount")) + object.retriedCount = message.retriedCount; + if (message.logUri != null && message.hasOwnProperty("logUri")) + object.logUri = message.logUri; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; @@ -18952,6 +19028,22 @@ return values; })(); + /** + * EncryptionKeyRevocationAction enum. + * @name google.cloud.run.v2.EncryptionKeyRevocationAction + * @enum {number} + * @property {number} ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED=0 ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED value + * @property {number} PREVENT_NEW=1 PREVENT_NEW value + * @property {number} SHUTDOWN=2 SHUTDOWN value + */ + v2.EncryptionKeyRevocationAction = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "PREVENT_NEW"] = 1; + values[valuesById[2] = "SHUTDOWN"] = 2; + return values; + })(); + v2.ExecutionTemplate = (function() { /** @@ -23727,6 +23819,8 @@ * @property {Array.|null} [volumes] Revision volumes * @property {google.cloud.run.v2.ExecutionEnvironment|null} [executionEnvironment] Revision executionEnvironment * @property {string|null} [encryptionKey] Revision encryptionKey + * @property {google.cloud.run.v2.EncryptionKeyRevocationAction|null} [encryptionKeyRevocationAction] Revision encryptionKeyRevocationAction + * @property {google.protobuf.IDuration|null} [encryptionKeyShutdownDuration] Revision encryptionKeyShutdownDuration * @property {boolean|null} [reconciling] Revision reconciling * @property {Array.|null} [conditions] Revision conditions * @property {number|Long|null} [observedGeneration] Revision observedGeneration @@ -23914,6 +24008,22 @@ */ Revision.prototype.encryptionKey = ""; + /** + * Revision encryptionKeyRevocationAction. + * @member {google.cloud.run.v2.EncryptionKeyRevocationAction} encryptionKeyRevocationAction + * @memberof google.cloud.run.v2.Revision + * @instance + */ + Revision.prototype.encryptionKeyRevocationAction = 0; + + /** + * Revision encryptionKeyShutdownDuration. + * @member {google.protobuf.IDuration|null|undefined} encryptionKeyShutdownDuration + * @memberof google.cloud.run.v2.Revision + * @instance + */ + Revision.prototype.encryptionKeyShutdownDuration = null; + /** * Revision reconciling. * @member {boolean} reconciling @@ -24020,6 +24130,10 @@ writer.uint32(/* id 20, wireType 0 =*/160).int32(message.executionEnvironment); if (message.encryptionKey != null && Object.hasOwnProperty.call(message, "encryptionKey")) writer.uint32(/* id 21, wireType 2 =*/170).string(message.encryptionKey); + if (message.encryptionKeyRevocationAction != null && Object.hasOwnProperty.call(message, "encryptionKeyRevocationAction")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.encryptionKeyRevocationAction); + if (message.encryptionKeyShutdownDuration != null && Object.hasOwnProperty.call(message, "encryptionKeyShutdownDuration")) + $root.google.protobuf.Duration.encode(message.encryptionKeyShutdownDuration, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling")) writer.uint32(/* id 30, wireType 0 =*/240).bool(message.reconciling); if (message.conditions != null && message.conditions.length) @@ -24189,6 +24303,14 @@ message.encryptionKey = reader.string(); break; } + case 23: { + message.encryptionKeyRevocationAction = reader.int32(); + break; + } + case 24: { + message.encryptionKeyShutdownDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } case 30: { message.reconciling = reader.bool(); break; @@ -24359,6 +24481,20 @@ if (message.encryptionKey != null && message.hasOwnProperty("encryptionKey")) if (!$util.isString(message.encryptionKey)) return "encryptionKey: string expected"; + if (message.encryptionKeyRevocationAction != null && message.hasOwnProperty("encryptionKeyRevocationAction")) + switch (message.encryptionKeyRevocationAction) { + default: + return "encryptionKeyRevocationAction: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionKeyShutdownDuration != null && message.hasOwnProperty("encryptionKeyShutdownDuration")) { + var error = $root.google.protobuf.Duration.verify(message.encryptionKeyShutdownDuration); + if (error) + return "encryptionKeyShutdownDuration." + error; + } if (message.reconciling != null && message.hasOwnProperty("reconciling")) if (typeof message.reconciling !== "boolean") return "reconciling: boolean expected"; @@ -24545,6 +24681,31 @@ } if (object.encryptionKey != null) message.encryptionKey = String(object.encryptionKey); + switch (object.encryptionKeyRevocationAction) { + default: + if (typeof object.encryptionKeyRevocationAction === "number") { + message.encryptionKeyRevocationAction = object.encryptionKeyRevocationAction; + break; + } + break; + case "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED": + case 0: + message.encryptionKeyRevocationAction = 0; + break; + case "PREVENT_NEW": + case 1: + message.encryptionKeyRevocationAction = 1; + break; + case "SHUTDOWN": + case 2: + message.encryptionKeyRevocationAction = 2; + break; + } + if (object.encryptionKeyShutdownDuration != null) { + if (typeof object.encryptionKeyShutdownDuration !== "object") + throw TypeError(".google.cloud.run.v2.Revision.encryptionKeyShutdownDuration: object expected"); + message.encryptionKeyShutdownDuration = $root.google.protobuf.Duration.fromObject(object.encryptionKeyShutdownDuration); + } if (object.reconciling != null) message.reconciling = Boolean(object.reconciling); if (object.conditions) { @@ -24615,6 +24776,8 @@ object.serviceAccount = ""; object.executionEnvironment = options.enums === String ? "EXECUTION_ENVIRONMENT_UNSPECIFIED" : 0; object.encryptionKey = ""; + object.encryptionKeyRevocationAction = options.enums === String ? "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED" : 0; + object.encryptionKeyShutdownDuration = null; object.reconciling = false; if ($util.Long) { var long = new $util.Long(0, 0, false); @@ -24679,6 +24842,10 @@ object.executionEnvironment = options.enums === String ? $root.google.cloud.run.v2.ExecutionEnvironment[message.executionEnvironment] === undefined ? message.executionEnvironment : $root.google.cloud.run.v2.ExecutionEnvironment[message.executionEnvironment] : message.executionEnvironment; if (message.encryptionKey != null && message.hasOwnProperty("encryptionKey")) object.encryptionKey = message.encryptionKey; + if (message.encryptionKeyRevocationAction != null && message.hasOwnProperty("encryptionKeyRevocationAction")) + object.encryptionKeyRevocationAction = options.enums === String ? $root.google.cloud.run.v2.EncryptionKeyRevocationAction[message.encryptionKeyRevocationAction] === undefined ? message.encryptionKeyRevocationAction : $root.google.cloud.run.v2.EncryptionKeyRevocationAction[message.encryptionKeyRevocationAction] : message.encryptionKeyRevocationAction; + if (message.encryptionKeyShutdownDuration != null && message.hasOwnProperty("encryptionKeyShutdownDuration")) + object.encryptionKeyShutdownDuration = $root.google.protobuf.Duration.toObject(message.encryptionKeyShutdownDuration, options); if (message.reconciling != null && message.hasOwnProperty("reconciling")) object.reconciling = message.reconciling; if (message.conditions && message.conditions.length) { @@ -29739,6 +29906,7 @@ * @property {google.cloud.run.v2.ITaskAttemptResult|null} [lastAttemptResult] Task lastAttemptResult * @property {string|null} [encryptionKey] Task encryptionKey * @property {google.cloud.run.v2.IVpcAccess|null} [vpcAccess] Task vpcAccess + * @property {string|null} [logUri] Task logUri * @property {string|null} [etag] Task etag */ @@ -29978,6 +30146,14 @@ */ Task.prototype.vpcAccess = null; + /** + * Task logUri. + * @member {string} logUri + * @memberof google.cloud.run.v2.Task + * @instance + */ + Task.prototype.logUri = ""; + /** * Task etag. * @member {string} etag @@ -30069,6 +30245,8 @@ writer.uint32(/* id 28, wireType 2 =*/226).string(message.encryptionKey); if (message.vpcAccess != null && Object.hasOwnProperty.call(message, "vpcAccess")) $root.google.cloud.run.v2.VpcAccess.encode(message.vpcAccess, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.logUri != null && Object.hasOwnProperty.call(message, "logUri")) + writer.uint32(/* id 32, wireType 2 =*/258).string(message.logUri); if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) writer.uint32(/* id 99, wireType 2 =*/794).string(message.etag); return writer; @@ -30257,6 +30435,10 @@ message.vpcAccess = $root.google.cloud.run.v2.VpcAccess.decode(reader, reader.uint32()); break; } + case 32: { + message.logUri = reader.string(); + break; + } case 99: { message.etag = reader.string(); break; @@ -30429,6 +30611,9 @@ if (error) return "vpcAccess." + error; } + if (message.logUri != null && message.hasOwnProperty("logUri")) + if (!$util.isString(message.logUri)) + return "logUri: string expected"; if (message.etag != null && message.hasOwnProperty("etag")) if (!$util.isString(message.etag)) return "etag: string expected"; @@ -30594,6 +30779,8 @@ throw TypeError(".google.cloud.run.v2.Task.vpcAccess: object expected"); message.vpcAccess = $root.google.cloud.run.v2.VpcAccess.fromObject(object.vpcAccess); } + if (object.logUri != null) + message.logUri = String(object.logUri); if (object.etag != null) message.etag = String(object.etag); return message; @@ -30652,6 +30839,7 @@ object.startTime = null; object.encryptionKey = ""; object.vpcAccess = null; + object.logUri = ""; object.etag = ""; } if (message.name != null && message.hasOwnProperty("name")) @@ -30730,6 +30918,8 @@ object.encryptionKey = message.encryptionKey; if (message.vpcAccess != null && message.hasOwnProperty("vpcAccess")) object.vpcAccess = $root.google.cloud.run.v2.VpcAccess.toObject(message.vpcAccess, options); + if (message.logUri != null && message.hasOwnProperty("logUri")) + object.logUri = message.logUri; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; return object; diff --git a/packages/google-cloud-run/protos/protos.json b/packages/google-cloud-run/protos/protos.json index 44a696ca533..667a7a2c2ed 100644 --- a/packages/google-cloud-run/protos/protos.json +++ b/packages/google-cloud-run/protos/protos.json @@ -1091,7 +1091,8 @@ "MIN_INSTANCES_NOT_PROVISIONED": 8, "ACTIVE_REVISION_LIMIT_REACHED": 9, "NO_DEPLOYMENT": 10, - "HEALTH_CHECK_SKIPPED": 11 + "HEALTH_CHECK_SKIPPED": 11, + "MIN_INSTANCES_WARMING": 12 } }, "ExecutionReason": { @@ -1399,6 +1400,27 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "cancelledCount": { + "type": "int32", + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "retriedCount": { + "type": "int32", + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "logUri": { + "type": "string", + "id": 26, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99, @@ -1843,6 +1865,13 @@ "EXECUTION_ENVIRONMENT_GEN2": 2 } }, + "EncryptionKeyRevocationAction": { + "values": { + "ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED": 0, + "PREVENT_NEW": 1, + "SHUTDOWN": 2 + } + }, "ExecutionTemplate": { "fields": { "labels": { @@ -2669,6 +2698,14 @@ "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" } }, + "encryptionKeyRevocationAction": { + "type": "EncryptionKeyRevocationAction", + "id": 23 + }, + "encryptionKeyShutdownDuration": { + "type": "google.protobuf.Duration", + "id": 24 + }, "reconciling": { "type": "bool", "id": 30, @@ -3621,6 +3658,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "logUri": { + "type": "string", + "id": 32, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "etag": { "type": "string", "id": 99, diff --git a/packages/google-cloud-run/samples/generated/v2/services.list_services.js b/packages/google-cloud-run/samples/generated/v2/services.list_services.js index a6a29f107de..5212a84dfe7 100644 --- a/packages/google-cloud-run/samples/generated/v2/services.list_services.js +++ b/packages/google-cloud-run/samples/generated/v2/services.list_services.js @@ -30,9 +30,9 @@ function main(parent) { */ /** * Required. The location and project to list resources on. - * Location must be a valid GCP region, and cannot be the "-" wildcard. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. */ // const parent = 'abc123' /** diff --git a/packages/google-cloud-run/src/v2/executions_client.ts b/packages/google-cloud-run/src/v2/executions_client.ts index 74ef676711f..f5280cd3bb6 100644 --- a/packages/google-cloud-run/src/v2/executions_client.ts +++ b/packages/google-cloud-run/src/v2/executions_client.ts @@ -245,6 +245,11 @@ export class ExecutionsClient { selector: 'google.longrunning.Operations.ListOperations', get: '/v2/{name=projects/*/locations/*}/operations', }, + { + selector: 'google.longrunning.Operations.WaitOperation', + post: '/v2/{name=projects/*/locations/*/operations/*}:wait', + body: '*', + }, ]; } this.operationsClient = this._gaxModule diff --git a/packages/google-cloud-run/src/v2/jobs_client.ts b/packages/google-cloud-run/src/v2/jobs_client.ts index e18847b2dcf..53bc0bf816f 100644 --- a/packages/google-cloud-run/src/v2/jobs_client.ts +++ b/packages/google-cloud-run/src/v2/jobs_client.ts @@ -245,6 +245,11 @@ export class JobsClient { selector: 'google.longrunning.Operations.ListOperations', get: '/v2/{name=projects/*/locations/*}/operations', }, + { + selector: 'google.longrunning.Operations.WaitOperation', + post: '/v2/{name=projects/*/locations/*/operations/*}:wait', + body: '*', + }, ]; } this.operationsClient = this._gaxModule diff --git a/packages/google-cloud-run/src/v2/revisions_client.ts b/packages/google-cloud-run/src/v2/revisions_client.ts index d5f225fc451..88ca5d6d672 100644 --- a/packages/google-cloud-run/src/v2/revisions_client.ts +++ b/packages/google-cloud-run/src/v2/revisions_client.ts @@ -248,6 +248,11 @@ export class RevisionsClient { selector: 'google.longrunning.Operations.ListOperations', get: '/v2/{name=projects/*/locations/*}/operations', }, + { + selector: 'google.longrunning.Operations.WaitOperation', + post: '/v2/{name=projects/*/locations/*/operations/*}:wait', + body: '*', + }, ]; } this.operationsClient = this._gaxModule diff --git a/packages/google-cloud-run/src/v2/services_client.ts b/packages/google-cloud-run/src/v2/services_client.ts index f6fd0bb6f9c..3b53b40c0fb 100644 --- a/packages/google-cloud-run/src/v2/services_client.ts +++ b/packages/google-cloud-run/src/v2/services_client.ts @@ -245,6 +245,11 @@ export class ServicesClient { selector: 'google.longrunning.Operations.ListOperations', get: '/v2/{name=projects/*/locations/*}/operations', }, + { + selector: 'google.longrunning.Operations.WaitOperation', + post: '/v2/{name=projects/*/locations/*/operations/*}:wait', + body: '*', + }, ]; } this.operationsClient = this._gaxModule @@ -1285,9 +1290,9 @@ export class ServicesClient { * The request object that will be sent. * @param {string} request.parent * Required. The location and project to list resources on. - * Location must be a valid GCP region, and cannot be the "-" wildcard. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. * @param {number} request.pageSize * Maximum number of Services to return in this call. * @param {string} request.pageToken @@ -1392,9 +1397,9 @@ export class ServicesClient { * The request object that will be sent. * @param {string} request.parent * Required. The location and project to list resources on. - * Location must be a valid GCP region, and cannot be the "-" wildcard. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. * @param {number} request.pageSize * Maximum number of Services to return in this call. * @param {string} request.pageToken @@ -1455,9 +1460,9 @@ export class ServicesClient { * The request object that will be sent. * @param {string} request.parent * Required. The location and project to list resources on. - * Location must be a valid GCP region, and cannot be the "-" wildcard. - * Format: projects/{project}/locations/{location}, where {project} can be - * project id or number. + * Location must be a valid Google Cloud region, and cannot be the "-" + * wildcard. Format: projects/{project}/locations/{location}, where {project} + * can be project id or number. * @param {number} request.pageSize * Maximum number of Services to return in this call. * @param {string} request.pageToken