Skip to content
Permalink
Browse files
feat(spanner): add processing_units to Instance resource (#364)
* feat(spanner): add processing_units to Instance resource

PiperOrigin-RevId: 378758342

Source-Link: googleapis/googleapis@d869871

Source-Link: https://github.com/googleapis/googleapis-gen/commit/54cfa763144ff2bf631518a6e872055493b583ae

* 🦉 Updates from OwlBot

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jun 17, 2021
1 parent 11853a5 commit 113505c58dc52509973f4199330a8983e3c5d848
@@ -128,6 +128,11 @@ class Instance(proto.Message):
See `the
documentation <https://cloud.google.com/spanner/docs/instances#node_count>`__
for more information about nodes.
processing_units (int):
The number of processing units allocated to this instance.
At most one of processing_units or node_count should be
present in the message. This may be zero in API responses
for instances that are not yet in state ``READY``.
state (google.cloud.spanner_admin_instance_v1.types.Instance.State):
Output only. The current instance state. For
[CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
@@ -177,6 +182,7 @@ class State(proto.Enum):
config = proto.Field(proto.STRING, number=2,)
display_name = proto.Field(proto.STRING, number=3,)
node_count = proto.Field(proto.INT32, number=5,)
processing_units = proto.Field(proto.INT32, number=9,)
state = proto.Field(proto.ENUM, number=6, enum=State,)
labels = proto.MapField(proto.STRING, proto.STRING, number=7,)
endpoint_uris = proto.RepeatedField(proto.STRING, number=8,)
@@ -1488,6 +1488,7 @@ def test_get_instance(
config="config_value",
display_name="display_name_value",
node_count=1070,
processing_units=1743,
state=spanner_instance_admin.Instance.State.CREATING,
endpoint_uris=["endpoint_uris_value"],
)
@@ -1504,6 +1505,7 @@ def test_get_instance(
assert response.config == "config_value"
assert response.display_name == "display_name_value"
assert response.node_count == 1070
assert response.processing_units == 1743
assert response.state == spanner_instance_admin.Instance.State.CREATING
assert response.endpoint_uris == ["endpoint_uris_value"]

@@ -1549,6 +1551,7 @@ async def test_get_instance_async(
config="config_value",
display_name="display_name_value",
node_count=1070,
processing_units=1743,
state=spanner_instance_admin.Instance.State.CREATING,
endpoint_uris=["endpoint_uris_value"],
)
@@ -1566,6 +1569,7 @@ async def test_get_instance_async(
assert response.config == "config_value"
assert response.display_name == "display_name_value"
assert response.node_count == 1070
assert response.processing_units == 1743
assert response.state == spanner_instance_admin.Instance.State.CREATING
assert response.endpoint_uris == ["endpoint_uris_value"]

0 comments on commit 113505c

Please sign in to comment.