From 08f330c00c822bdc228cec85dea46ae731e10ee7 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Mon, 1 Apr 2024 14:16:04 -0700 Subject: [PATCH] docs: state one Resource Allowance per region per project limitation on v1alpha --- docs: A comment for field `max_run_duration` in message `.google.cloud.batch.v1alpha.TaskSpec` and `.google.cloud.batch.v1.TaskSpec` is changed --- docs: add non-negative restriction comment for usage_resource_allowance.spec.limit.limit exposed on v1alpha PiperOrigin-RevId: 620950825 --- google/cloud/batch/v1alpha/batch_v1alpha.yaml | 2 +- .../v1alpha/batch_v1alpha_grpc_service_config.json | 3 ++- google/cloud/batch/v1alpha/resource_allowance.proto | 13 +++++++++---- google/cloud/batch/v1alpha/task.proto | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/google/cloud/batch/v1alpha/batch_v1alpha.yaml b/google/cloud/batch/v1alpha/batch_v1alpha.yaml index 88e4867ab4..99e8c22682 100644 --- a/google/cloud/batch/v1alpha/batch_v1alpha.yaml +++ b/google/cloud/batch/v1alpha/batch_v1alpha.yaml @@ -12,7 +12,7 @@ types: - name: google.cloud.batch.v1alpha.OperationMetadata documentation: - summary: An API to manage the running of batch resources on Google Cloud Platform. + summary: An API to manage the running of Batch resources on Google Cloud Platform. overview: '(include == google/cloud/batch/doc/overview.md ==)' rules: - selector: google.cloud.location.Locations.GetLocation diff --git a/google/cloud/batch/v1alpha/batch_v1alpha_grpc_service_config.json b/google/cloud/batch/v1alpha/batch_v1alpha_grpc_service_config.json index a1e56f4a89..5b8b71d9da 100644 --- a/google/cloud/batch/v1alpha/batch_v1alpha_grpc_service_config.json +++ b/google/cloud/batch/v1alpha/batch_v1alpha_grpc_service_config.json @@ -25,7 +25,8 @@ { "service": "google.cloud.batch.v1alpha.BatchService", "method": "UpdateJob"}, { "service": "google.cloud.batch.v1alpha.BatchService", "method": "CreateResourceAllowance" }, { "service": "google.cloud.batch.v1alpha.BatchService", "method": "DeleteResourceAllowance" }, - { "service": "google.cloud.batch.v1alpha.BatchService", "method": "UpdateResourceAllowance"} + { "service": "google.cloud.batch.v1alpha.BatchService", "method": "UpdateResourceAllowance"}, + { "service": "google.cloud.batch.v1alpha.BatchService", "method": "CancelTasks"} ], "timeout": "60s" }] diff --git a/google/cloud/batch/v1alpha/resource_allowance.proto b/google/cloud/batch/v1alpha/resource_allowance.proto index 78a18a7caa..2fc987a72c 100644 --- a/google/cloud/batch/v1alpha/resource_allowance.proto +++ b/google/cloud/batch/v1alpha/resource_allowance.proto @@ -70,6 +70,8 @@ enum ResourceAllowanceState { } // The Resource Allowance description for Cloud Batch. +// Only one Resource Allowance is supported now under a specific location and +// project. message ResourceAllowance { option (google.api.resource) = { type: "batch.googleapis.com/ResourceAllowance" @@ -140,10 +142,13 @@ message UsageResourceAllowanceSpec { } // Required. Limit value of a UsageResourceAllowance within its one - // duration. Default is 0. For example, you can set `limit` as 10000.0 with - // duration of the current month by setting `calendar_period` field as - // monthly. That means in your current month, 10000.0 is the cour hour - // limitation that your resources are allowed to consume. + // duration. + // + // Limit cannot be a negative value. Default is 0. + // For example, you can set `limit` as 10000.0 with duration of the current + // month by setting `calendar_period` field as monthly. That means in your + // current month, 10000.0 is the core hour limitation that your resources + // are allowed to consume. optional double limit = 2 [(google.api.field_behavior) = REQUIRED]; } diff --git a/google/cloud/batch/v1alpha/task.proto b/google/cloud/batch/v1alpha/task.proto index 5b259463d9..72cdb6e16b 100644 --- a/google/cloud/batch/v1alpha/task.proto +++ b/google/cloud/batch/v1alpha/task.proto @@ -352,6 +352,8 @@ message TaskSpec { // Maximum duration the task should run. // The task will be killed and marked as FAILED if over this limit. + // The valid value range for max_run_duration in seconds is [0, + // 315576000000.999999999], google.protobuf.Duration max_run_duration = 4; // Maximum number of retries on failures.