Skip to content

Commit

Permalink
docs: state one Resource Allowance per region per project limitation …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 1, 2024
1 parent 94e9108 commit 08f330c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion google/cloud/batch/v1alpha/batch_v1alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}]
Expand Down
13 changes: 9 additions & 4 deletions google/cloud/batch/v1alpha/resource_allowance.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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];
}

Expand Down
2 changes: 2 additions & 0 deletions google/cloud/batch/v1alpha/task.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 08f330c

Please sign in to comment.