Skip to content

Commit

Permalink
feat(spanner): add processing_units to Instance resource (#364)
Browse files Browse the repository at this point in the history
* feat(spanner): add processing_units to Instance resource

PiperOrigin-RevId: 378758342

Source-Link: googleapis/googleapis@d869871

Source-Link: googleapis/googleapis-gen@54cfa76

* 🦉 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 113505c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -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],
Expand Down Expand Up @@ -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,)
Expand Down
Expand Up @@ -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"],
)
Expand All @@ -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"]

Expand Down Expand Up @@ -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"],
)
Expand All @@ -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"]

Expand Down

0 comments on commit 113505c

Please sign in to comment.