Skip to content

Commit 08f330c

Browse files
Google APIscopybara-github
authored andcommitted
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
1 parent 94e9108 commit 08f330c

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

google/cloud/batch/v1alpha/batch_v1alpha.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ types:
1212
- name: google.cloud.batch.v1alpha.OperationMetadata
1313

1414
documentation:
15-
summary: An API to manage the running of batch resources on Google Cloud Platform.
15+
summary: An API to manage the running of Batch resources on Google Cloud Platform.
1616
overview: '(include == google/cloud/batch/doc/overview.md ==)'
1717
rules:
1818
- selector: google.cloud.location.Locations.GetLocation

google/cloud/batch/v1alpha/batch_v1alpha_grpc_service_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
{ "service": "google.cloud.batch.v1alpha.BatchService", "method": "UpdateJob"},
2626
{ "service": "google.cloud.batch.v1alpha.BatchService", "method": "CreateResourceAllowance" },
2727
{ "service": "google.cloud.batch.v1alpha.BatchService", "method": "DeleteResourceAllowance" },
28-
{ "service": "google.cloud.batch.v1alpha.BatchService", "method": "UpdateResourceAllowance"}
28+
{ "service": "google.cloud.batch.v1alpha.BatchService", "method": "UpdateResourceAllowance"},
29+
{ "service": "google.cloud.batch.v1alpha.BatchService", "method": "CancelTasks"}
2930
],
3031
"timeout": "60s"
3132
}]

google/cloud/batch/v1alpha/resource_allowance.proto

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ enum ResourceAllowanceState {
7070
}
7171

7272
// The Resource Allowance description for Cloud Batch.
73+
// Only one Resource Allowance is supported now under a specific location and
74+
// project.
7375
message ResourceAllowance {
7476
option (google.api.resource) = {
7577
type: "batch.googleapis.com/ResourceAllowance"
@@ -140,10 +142,13 @@ message UsageResourceAllowanceSpec {
140142
}
141143

142144
// Required. Limit value of a UsageResourceAllowance within its one
143-
// duration. Default is 0. For example, you can set `limit` as 10000.0 with
144-
// duration of the current month by setting `calendar_period` field as
145-
// monthly. That means in your current month, 10000.0 is the cour hour
146-
// limitation that your resources are allowed to consume.
145+
// duration.
146+
//
147+
// Limit cannot be a negative value. Default is 0.
148+
// For example, you can set `limit` as 10000.0 with duration of the current
149+
// month by setting `calendar_period` field as monthly. That means in your
150+
// current month, 10000.0 is the core hour limitation that your resources
151+
// are allowed to consume.
147152
optional double limit = 2 [(google.api.field_behavior) = REQUIRED];
148153
}
149154

google/cloud/batch/v1alpha/task.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ message TaskSpec {
352352

353353
// Maximum duration the task should run.
354354
// The task will be killed and marked as FAILED if over this limit.
355+
// The valid value range for max_run_duration in seconds is [0,
356+
// 315576000000.999999999],
355357
google.protobuf.Duration max_run_duration = 4;
356358

357359
// Maximum number of retries on failures.

0 commit comments

Comments
 (0)