Skip to content

Commit 4be4f8d

Browse files
docs: [google-cloud-batch] state one Resource Allowance per region per project limitation on v1alpha (#12536)
BEGIN_COMMIT_OVERRIDE 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 END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. --- 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 Source-Link: googleapis/googleapis@08f330c Source-Link: googleapis/googleapis-gen@300d2ef Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiIzMDBkMmVmNjVkNDViZTE2OGFiMzc5MzY3ZmNhNzFiYTgwYjk0ZDE4In0= --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent 0b8728c commit 4be4f8d

10 files changed

Lines changed: 47 additions & 22 deletions

File tree

packages/google-cloud-batch/google/cloud/batch/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.15" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-batch/google/cloud/batch_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.15" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-batch/google/cloud/batch_v1alpha/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.15" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-batch/google/cloud/batch_v1alpha/services/batch_service/async_client.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,9 @@ async def sample_create_resource_allowance():
10841084
Returns:
10851085
google.cloud.batch_v1alpha.types.ResourceAllowance:
10861086
The Resource Allowance description
1087-
for Cloud Batch.
1087+
for Cloud Batch. Only one Resource
1088+
Allowance is supported now under a
1089+
specific location and project.
10881090
10891091
"""
10901092
# Create or coerce a protobuf request object.
@@ -1191,7 +1193,9 @@ async def sample_get_resource_allowance():
11911193
Returns:
11921194
google.cloud.batch_v1alpha.types.ResourceAllowance:
11931195
The Resource Allowance description
1194-
for Cloud Batch.
1196+
for Cloud Batch. Only one Resource
1197+
Allowance is supported now under a
1198+
specific location and project.
11951199
11961200
"""
11971201
# Create or coerce a protobuf request object.
@@ -1576,7 +1580,9 @@ async def sample_update_resource_allowance():
15761580
Returns:
15771581
google.cloud.batch_v1alpha.types.ResourceAllowance:
15781582
The Resource Allowance description
1579-
for Cloud Batch.
1583+
for Cloud Batch. Only one Resource
1584+
Allowance is supported now under a
1585+
specific location and project.
15801586
15811587
"""
15821588
# Create or coerce a protobuf request object.

packages/google-cloud-batch/google/cloud/batch_v1alpha/services/batch_service/client.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,9 @@ def sample_create_resource_allowance():
15241524
Returns:
15251525
google.cloud.batch_v1alpha.types.ResourceAllowance:
15261526
The Resource Allowance description
1527-
for Cloud Batch.
1527+
for Cloud Batch. Only one Resource
1528+
Allowance is supported now under a
1529+
specific location and project.
15281530
15291531
"""
15301532
# Create or coerce a protobuf request object.
@@ -1633,7 +1635,9 @@ def sample_get_resource_allowance():
16331635
Returns:
16341636
google.cloud.batch_v1alpha.types.ResourceAllowance:
16351637
The Resource Allowance description
1636-
for Cloud Batch.
1638+
for Cloud Batch. Only one Resource
1639+
Allowance is supported now under a
1640+
specific location and project.
16371641
16381642
"""
16391643
# Create or coerce a protobuf request object.
@@ -2002,7 +2006,9 @@ def sample_update_resource_allowance():
20022006
Returns:
20032007
google.cloud.batch_v1alpha.types.ResourceAllowance:
20042008
The Resource Allowance description
2005-
for Cloud Batch.
2009+
for Cloud Batch. Only one Resource
2010+
Allowance is supported now under a
2011+
specific location and project.
20062012
20072013
"""
20082014
# Create or coerce a protobuf request object.

packages/google-cloud-batch/google/cloud/batch_v1alpha/services/batch_service/transports/rest.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,9 @@ def __call__(
823823
Returns:
824824
~.gcb_resource_allowance.ResourceAllowance:
825825
The Resource Allowance description
826-
for Cloud Batch.
826+
for Cloud Batch. Only one Resource
827+
Allowance is supported now under a
828+
specific location and project.
827829
828830
"""
829831

@@ -1167,7 +1169,9 @@ def __call__(
11671169
Returns:
11681170
~.resource_allowance.ResourceAllowance:
11691171
The Resource Allowance description
1170-
for Cloud Batch.
1172+
for Cloud Batch. Only one Resource
1173+
Allowance is supported now under a
1174+
specific location and project.
11711175
11721176
"""
11731177

@@ -1589,7 +1593,9 @@ def __call__(
15891593
Returns:
15901594
~.gcb_resource_allowance.ResourceAllowance:
15911595
The Resource Allowance description
1592-
for Cloud Batch.
1596+
for Cloud Batch. Only one Resource
1597+
Allowance is supported now under a
1598+
specific location and project.
15931599
15941600
"""
15951601

packages/google-cloud-batch/google/cloud/batch_v1alpha/types/resource_allowance.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ class ResourceAllowanceState(proto.Enum):
8686

8787
class ResourceAllowance(proto.Message):
8888
r"""The Resource Allowance description for Cloud Batch.
89+
Only one Resource Allowance is supported now under a specific
90+
location and project.
91+
8992
9093
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
9194
@@ -208,11 +211,14 @@ class Limit(proto.Message):
208211
This field is a member of `oneof`_ ``duration``.
209212
limit (float):
210213
Required. Limit value of a UsageResourceAllowance within its
211-
one duration. Default is 0. For example, you can set
212-
``limit`` as 10000.0 with duration of the current month by
213-
setting ``calendar_period`` field as monthly. That means in
214-
your current month, 10000.0 is the cour hour limitation that
215-
your resources are allowed to consume.
214+
one duration.
215+
216+
Limit cannot be a negative value. Default is 0. For example,
217+
you can set ``limit`` as 10000.0 with duration of the
218+
current month by setting ``calendar_period`` field as
219+
monthly. That means in your current month, 10000.0 is the
220+
core hour limitation that your resources are allowed to
221+
consume.
216222
217223
This field is a member of `oneof`_ ``_limit``.
218224
"""

packages/google-cloud-batch/google/cloud/batch_v1alpha/types/task.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,9 +591,10 @@ class TaskSpec(proto.Message):
591591
compute_resource (google.cloud.batch_v1alpha.types.ComputeResource):
592592
ComputeResource requirements.
593593
max_run_duration (google.protobuf.duration_pb2.Duration):
594-
Maximum duration the task should run.
595-
The task will be killed and marked as FAILED if
596-
over this limit.
594+
Maximum duration the task should run. The task will be
595+
killed and marked as FAILED if over this limit. The valid
596+
value range for max_run_duration in seconds is [0,
597+
315576000000.999999999],
597598
max_retry_count (int):
598599
Maximum number of retries on failures. The default, 0, which
599600
means never retry. The valid value range is [0, 10].

packages/google-cloud-batch/samples/generated_samples/snippet_metadata_google.cloud.batch.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-batch",
11-
"version": "0.17.15"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-batch/samples/generated_samples/snippet_metadata_google.cloud.batch.v1alpha.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-batch",
11-
"version": "0.17.15"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)