@@ -32,6 +32,71 @@ class StorageType(enum.IntEnum):
32
32
HDD = 2
33
33
34
34
35
+ class Instance (object ):
36
+ class State (enum .IntEnum ):
37
+ """
38
+ Possible states of an instance.
39
+
40
+ Attributes:
41
+ STATE_NOT_KNOWN (int): The state of the instance could not be determined.
42
+ READY (int): The instance has been successfully created and can serve requests
43
+ to its tables.
44
+ CREATING (int): The instance is currently being created, and may be destroyed
45
+ if the creation process encounters an error.
46
+ """
47
+ STATE_NOT_KNOWN = 0
48
+ READY = 1
49
+ CREATING = 2
50
+
51
+ class Type (enum .IntEnum ):
52
+ """
53
+ The type of the instance.
54
+
55
+ Attributes:
56
+ TYPE_UNSPECIFIED (int): The type of the instance is unspecified. If set when creating an
57
+ instance, a ``PRODUCTION`` instance will be created. If set when updating
58
+ an instance, the type will be left unchanged.
59
+ PRODUCTION (int): An instance meant for production use. ``serve_nodes`` must be set
60
+ on the cluster.
61
+ DEVELOPMENT (int): The instance is meant for development and testing purposes only; it has
62
+ no performance or uptime guarantees and is not covered by SLA.
63
+ After a development instance is created, it can be upgraded by
64
+ updating the instance to type ``PRODUCTION``. An instance created
65
+ as a production instance cannot be changed to a development instance.
66
+ When creating a development instance, ``serve_nodes`` on the cluster must
67
+ not be set.
68
+ """
69
+ TYPE_UNSPECIFIED = 0
70
+ PRODUCTION = 1
71
+ DEVELOPMENT = 2
72
+
73
+
74
+ class Cluster (object ):
75
+ class State (enum .IntEnum ):
76
+ """
77
+ Possible states of a cluster.
78
+
79
+ Attributes:
80
+ STATE_NOT_KNOWN (int): The state of the cluster could not be determined.
81
+ READY (int): The cluster has been successfully created and is ready to serve requests.
82
+ CREATING (int): The cluster is currently being created, and may be destroyed
83
+ if the creation process encounters an error.
84
+ A cluster may not be able to serve requests while being created.
85
+ RESIZING (int): The cluster is currently being resized, and may revert to its previous
86
+ node count if the process encounters an error.
87
+ A cluster is still capable of serving requests while being resized,
88
+ but may exhibit performance as if its number of allocated nodes is
89
+ between the starting and requested states.
90
+ DISABLED (int): The cluster has no backing nodes. The data (tables) still
91
+ exist, but no operations can be performed on the cluster.
92
+ """
93
+ STATE_NOT_KNOWN = 0
94
+ READY = 1
95
+ CREATING = 2
96
+ RESIZING = 3
97
+ DISABLED = 4
98
+
99
+
35
100
class Table (object ):
36
101
class TimestampGranularity (enum .IntEnum ):
37
102
"""
@@ -104,68 +169,3 @@ class State(enum.IntEnum):
104
169
STATE_NOT_KNOWN = 0
105
170
READY = 1
106
171
CREATING = 2
107
-
108
-
109
- class Instance (object ):
110
- class State (enum .IntEnum ):
111
- """
112
- Possible states of an instance.
113
-
114
- Attributes:
115
- STATE_NOT_KNOWN (int): The state of the instance could not be determined.
116
- READY (int): The instance has been successfully created and can serve requests
117
- to its tables.
118
- CREATING (int): The instance is currently being created, and may be destroyed
119
- if the creation process encounters an error.
120
- """
121
- STATE_NOT_KNOWN = 0
122
- READY = 1
123
- CREATING = 2
124
-
125
- class Type (enum .IntEnum ):
126
- """
127
- The type of the instance.
128
-
129
- Attributes:
130
- TYPE_UNSPECIFIED (int): The type of the instance is unspecified. If set when creating an
131
- instance, a ``PRODUCTION`` instance will be created. If set when updating
132
- an instance, the type will be left unchanged.
133
- PRODUCTION (int): An instance meant for production use. ``serve_nodes`` must be set
134
- on the cluster.
135
- DEVELOPMENT (int): The instance is meant for development and testing purposes only; it has
136
- no performance or uptime guarantees and is not covered by SLA.
137
- After a development instance is created, it can be upgraded by
138
- updating the instance to type ``PRODUCTION``. An instance created
139
- as a production instance cannot be changed to a development instance.
140
- When creating a development instance, ``serve_nodes`` on the cluster must
141
- not be set.
142
- """
143
- TYPE_UNSPECIFIED = 0
144
- PRODUCTION = 1
145
- DEVELOPMENT = 2
146
-
147
-
148
- class Cluster (object ):
149
- class State (enum .IntEnum ):
150
- """
151
- Possible states of a cluster.
152
-
153
- Attributes:
154
- STATE_NOT_KNOWN (int): The state of the cluster could not be determined.
155
- READY (int): The cluster has been successfully created and is ready to serve requests.
156
- CREATING (int): The cluster is currently being created, and may be destroyed
157
- if the creation process encounters an error.
158
- A cluster may not be able to serve requests while being created.
159
- RESIZING (int): The cluster is currently being resized, and may revert to its previous
160
- node count if the process encounters an error.
161
- A cluster is still capable of serving requests while being resized,
162
- but may exhibit performance as if its number of allocated nodes is
163
- between the starting and requested states.
164
- DISABLED (int): The cluster has no backing nodes. The data (tables) still
165
- exist, but no operations can be performed on the cluster.
166
- """
167
- STATE_NOT_KNOWN = 0
168
- READY = 1
169
- CREATING = 2
170
- RESIZING = 3
171
- DISABLED = 4
0 commit comments