Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/spanner/gapic/v1/admin_instance_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Spanner Admin Instance Client API
=================================

.. automodule:: google.cloud.spanner_admin_instance_v1
:members:
:inherited-members:
5 changes: 5 additions & 0 deletions docs/spanner/gapic/v1/admin_instance_types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Spanner Admin Instance Client Types
===================================

.. automodule:: google.cloud.spanner_admin_instance_v1.types
:members:
2 changes: 2 additions & 0 deletions docs/spanner/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Spanner

gapic/v1/admin_database_api
gapic/v1/admin_database_types
gapic/v1/admin_instance_api
gapic/v1/admin_instance_types

API requests are sent to the `Cloud Spanner`_ API via RPC over
HTTP/2. In order to support this, we'll rely on `gRPC`_.
Expand Down
2 changes: 1 addition & 1 deletion spanner/google/cloud/spanner/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# pylint: disable=line-too-long
from google.cloud.spanner_admin_database_v1.gapic.database_admin_client import ( # noqa
DatabaseAdminClient)
from google.cloud.gapic.spanner_admin_instance.v1.instance_admin_client import ( # noqa
from google.cloud.spanner_admin_instance_v1.gapic.instance_admin_client import ( # noqa
InstanceAdminClient)
# pylint: enable=line-too-long

Expand Down
2 changes: 1 addition & 1 deletion spanner/google/cloud/spanner/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from google.gax import INITIAL_PAGE
from google.gax.errors import GaxError
from google.gax.grpc import exc_to_code
from google.cloud.proto.spanner.admin.instance.v1 import (
from google.cloud.spanner_admin_instance_v1.proto import (
spanner_instance_admin_pb2 as admin_v1_pb2)
from google.protobuf.field_mask_pb2 import FieldMask
from grpc import StatusCode
Expand Down
30 changes: 30 additions & 0 deletions spanner/google/cloud/spanner_admin_instance_v1/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2017, Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import absolute_import

from google.cloud.spanner_admin_instance_v1 import types
from google.cloud.spanner_admin_instance_v1.gapic import enums
from google.cloud.spanner_admin_instance_v1.gapic import instance_admin_client


class InstanceAdminClient(instance_admin_client.InstanceAdminClient):
__doc__ = instance_admin_client.InstanceAdminClient.__doc__
enums = enums


__all__ = (
'enums',
'types',
'InstanceAdminClient', )
Empty file.
32 changes: 32 additions & 0 deletions spanner/google/cloud/spanner_admin_instance_v1/gapic/enums.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2017, Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Wrappers for protocol buffer enum types."""


class Instance(object):
class State(object):
"""
Indicates the current state of the instance.

Attributes:
STATE_UNSPECIFIED (int): Not specified.
CREATING (int): The instance is still being created. Resources may not be
available yet, and operations such as database creation may not
work.
READY (int): The instance is fully created and ready to do work such as
creating databases.
"""
STATE_UNSPECIFIED = 0
CREATING = 1
READY = 2
Loading