blob: 9483b8a22ce8a379b9ce122ff7be194f26039638 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="redis_v1.html">Google Cloud Memorystore for Redis API</a> . <a href="redis_v1.projects.html">projects</a> . <a href="redis_v1.projects.locations.html">locations</a> . <a href="redis_v1.projects.locations.instances.html">instances</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, instanceId=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a Redis instance based on the specified tier and memory size.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a specific Redis instance. Instance stops serving and data is</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#export">export(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Export Redis instance data into a Redis RDB format file in Cloud Storage.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#failover">failover(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Initiates a failover of the master node to current replica node for a</p>
89<p class="toc_element">
90 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
91<p class="firstline">Gets the details of a specific Redis instance.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#import_">import_(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.</p>
95<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070096 <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Lists all Redis instances owned by a project in either the specified</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103<p class="firstline">Updates the metadata and configuration of a specific Redis instance.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700104<p class="toc_element">
105 <code><a href="#upgrade">upgrade(name, body=None, x__xgafv=None)</a></code></p>
106<p class="firstline">Upgrades Redis instance to the newer Redis version specified in the</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107<h3>Method Details</h3>
108<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 <code class="details" id="create">create(parent, body=None, instanceId=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 <pre>Creates a Redis instance based on the specified tier and memory size.
111
Bu Sun Kim65020912020-05-20 12:08:20 -0700112By default, the instance is accessible from the project&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113[default network](/compute/docs/networks-and-firewalls#networks).
114
115The creation is executed asynchronously and callers may check the returned
116operation to track its progress. Once the operation is completed the Redis
117instance will be fully functional. Completed longrunning.Operation will
118contain the new instance object in the response field.
119
120The returned operation is automatically deleted after a few hours, so there
121is no need to call DeleteOperation.
122
123Args:
124 parent: string, Required. The resource name of the instance location using the form:
125 `projects/{project_id}/locations/{location_id}`
126where `location_id` refers to a GCP region. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700127 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700128 The object takes the form of:
129
130{ # A Google Cloud Redis instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 &quot;statusMessage&quot;: &quot;A String&quot;, # Output only. Additional information about the current status of this
132 # instance, if available.
133 &quot;authorizedNetwork&quot;: &quot;A String&quot;, # Optional. The full name of the Google Compute Engine
134 # [network](/compute/docs/networks-and-firewalls#networks) to which the
135 # instance is connected. If left unspecified, the `default` network
136 # will be used.
137 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of this instance.
138 &quot;name&quot;: &quot;A String&quot;, # Required. Unique name of the resource in this scope including project and
139 # location using the form:
140 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
141 #
142 # Note: Redis instances are managed and addressed at regional level so
143 # location_id here refers to a GCP region; however, users may choose which
144 # specific zone (or collection of zones for cross-zone instances) an instance
145 # should be provisioned in. Refer to location_id and
146 # alternative_location_id fields for more details.
147 &quot;connectMode&quot;: &quot;A String&quot;, # Optional. The network connect mode of the Redis instance.
148 # If not provided, the connect mode defaults to DIRECT_PEERING.
149 &quot;persistenceIamIdentity&quot;: &quot;A String&quot;, # Output only. Cloud IAM identity used by import / export operations to
150 # transfer data to/from Cloud Storage. Format is
151 # &quot;serviceAccount:&lt;service_account_email&gt;&quot;. The value may change over time
152 # for a given instance so should be checked before each import/export
153 # operation.
154 &quot;redisConfigs&quot;: { # Optional. Redis configuration parameters, according to
155 # http://redis.io/topics/config. Currently, the only supported parameters
156 # are:
157 #
158 # Redis version 3.2 and newer:
159 #
160 # * maxmemory-policy
161 # * notify-keyspace-events
162 #
163 # Redis version 4.0 and newer:
164 #
165 # * activedefrag
166 # * lfu-decay-time
167 # * lfu-log-factor
168 # * maxmemory-gb
169 #
170 # Redis version 5.0 and newer:
171 #
172 # * stream-node-max-bytes
173 # * stream-node-max-entries
174 &quot;a_key&quot;: &quot;A String&quot;,
175 },
176 &quot;port&quot;: 42, # Output only. The port number of the exposed Redis endpoint.
177 &quot;host&quot;: &quot;A String&quot;, # Output only. Hostname or IP address of the exposed Redis endpoint used by
178 # clients to connect to the service.
179 &quot;redisVersion&quot;: &quot;A String&quot;, # Optional. The version of Redis software.
180 # If not provided, latest supported version will be used. Currently, the
181 # supported values are:
182 #
183 # * `REDIS_3_2` for Redis 3.2 compatibility
184 # * `REDIS_4_0` for Redis 4.0 compatibility (default)
185 # * `REDIS_5_0` for Redis 5.0 compatibility
Bu Sun Kim65020912020-05-20 12:08:20 -0700186 &quot;memorySizeGb&quot;: 42, # Required. Redis memory size in GiB.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700187 &quot;tier&quot;: &quot;A String&quot;, # Required. The service tier of the instance.
188 &quot;displayName&quot;: &quot;A String&quot;, # An arbitrary and optional user-provided name for the instance.
189 &quot;locationId&quot;: &quot;A String&quot;, # Optional. The zone where the instance will be provisioned. If not provided,
190 # the service will choose a zone for the instance. For STANDARD_HA tier,
191 # instances will be created across two zones for protection against zonal
192 # failures. If alternative_location_id is also provided, it must be
193 # different from location_id.
194 &quot;reservedIpRange&quot;: &quot;A String&quot;, # Optional. The CIDR range of internal addresses that are reserved for this
195 # instance. If not provided, the service will choose an unused /29 block,
196 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
197 # and non-overlapping with existing subnets in an authorized network.
198 &quot;currentLocationId&quot;: &quot;A String&quot;, # Output only. The current zone where the Redis endpoint is placed. For Basic
199 # Tier instances, this will always be the same as the location_id
200 # provided by the user at creation time. For Standard Tier instances,
201 # this can be either location_id or alternative_location_id and can
202 # change after a failover event.
203 &quot;alternativeLocationId&quot;: &quot;A String&quot;, # Optional. Only applicable to STANDARD_HA tier which protects the instance
204 # against zonal failures by provisioning it across two zones. If provided, it
205 # must be a different zone from the one provided in location_id.
206 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the instance was created.
207 &quot;labels&quot;: { # Resource labels to represent user provided metadata
208 &quot;a_key&quot;: &quot;A String&quot;,
209 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211
212 instanceId: string, Required. The logical name of the Redis instance in the customer project
213with the following restrictions:
214
215* Must contain only lowercase letters, numbers, and hyphens.
216* Must start with a letter.
217* Must be between 1-40 characters.
218* Must end with a number or a letter.
219* Must be unique within the customer project / location
220 x__xgafv: string, V1 error format.
221 Allowed values
222 1 - v1 error format
223 2 - v2 error format
224
225Returns:
226 An object of the form:
227
228 { # This resource represents a long-running operation that is the result of a
229 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700230 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
231 # method returns no data on success, such as `Delete`, the response is
232 # `google.protobuf.Empty`. If the original method is standard
233 # `Get`/`Create`/`Update`, the response should be the resource. For other
234 # methods, the response should have the type `XxxResponse`, where `Xxx`
235 # is the original method name. For example, if the original method name
236 # is `TakeSnapshot()`, the inferred response type is
237 # `TakeSnapshotResponse`.
238 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
239 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700240 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
241 # originally returns it. If you use the default HTTP mapping, the
242 # `name` should be a resource name ending with `operations/{unique_id}`.
243 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
244 # different programming environments, including REST APIs and RPC APIs. It is
245 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
246 # three pieces of data: error code, error message, and error details.
247 #
248 # You can find out more about this error model and how to work with it in the
249 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700250 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
251 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
252 # user-facing error message should be localized and sent in the
253 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
255 # message types for APIs to use.
256 {
257 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
258 },
259 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700261 &quot;metadata&quot;: { # {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700262 #
263 # `createTime`: The time the operation was created.
264 #
265 # `endTime`: The time the operation finished running.
266 #
267 # `target`: Server-defined resource path for the target of the operation.
268 #
269 # `verb`: Name of the verb executed by the operation.
270 #
271 # `statusDetail`: Human-readable status of the operation, if any.
272 #
273 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
274 #
275 # `apiVersion`: API version used to start the operation.
276 #
277 # }
Bu Sun Kim65020912020-05-20 12:08:20 -0700278 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700279 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 # If `true`, the operation is completed, and either `error` or `response` is
282 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 }</pre>
284</div>
285
286<div class="method">
287 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
288 <pre>Deletes a specific Redis instance. Instance stops serving and data is
289deleted.
290
291Args:
292 name: string, Required. Redis instance resource name using the form:
293 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
294where `location_id` refers to a GCP region. (required)
295 x__xgafv: string, V1 error format.
296 Allowed values
297 1 - v1 error format
298 2 - v2 error format
299
300Returns:
301 An object of the form:
302
303 { # This resource represents a long-running operation that is the result of a
304 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700305 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
306 # method returns no data on success, such as `Delete`, the response is
307 # `google.protobuf.Empty`. If the original method is standard
308 # `Get`/`Create`/`Update`, the response should be the resource. For other
309 # methods, the response should have the type `XxxResponse`, where `Xxx`
310 # is the original method name. For example, if the original method name
311 # is `TakeSnapshot()`, the inferred response type is
312 # `TakeSnapshotResponse`.
313 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
314 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700315 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
316 # originally returns it. If you use the default HTTP mapping, the
317 # `name` should be a resource name ending with `operations/{unique_id}`.
318 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
319 # different programming environments, including REST APIs and RPC APIs. It is
320 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
321 # three pieces of data: error code, error message, and error details.
322 #
323 # You can find out more about this error model and how to work with it in the
324 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700325 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
326 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
327 # user-facing error message should be localized and sent in the
328 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
330 # message types for APIs to use.
331 {
332 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
333 },
334 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 &quot;metadata&quot;: { # {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 #
338 # `createTime`: The time the operation was created.
339 #
340 # `endTime`: The time the operation finished running.
341 #
342 # `target`: Server-defined resource path for the target of the operation.
343 #
344 # `verb`: Name of the verb executed by the operation.
345 #
346 # `statusDetail`: Human-readable status of the operation, if any.
347 #
348 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
349 #
350 # `apiVersion`: API version used to start the operation.
351 #
352 # }
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700355 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -0700356 # If `true`, the operation is completed, and either `error` or `response` is
357 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 }</pre>
359</div>
360
361<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700362 <code class="details" id="export">export(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700363 <pre>Export Redis instance data into a Redis RDB format file in Cloud Storage.
364
365Redis will continue serving during this operation.
366
367The returned operation is automatically deleted after a few hours, so
368there is no need to call DeleteOperation.
369
370Args:
371 name: string, Required. Redis instance resource name using the form:
372 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
373where `location_id` refers to a GCP region. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700374 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700375 The object takes the form of:
376
377{ # Request for Export.
Bu Sun Kim65020912020-05-20 12:08:20 -0700378 &quot;outputConfig&quot;: { # The output content # Required. Specify data to be exported.
379 &quot;gcsDestination&quot;: { # The Cloud Storage location for the output content # Google Cloud Storage destination for output content.
380 &quot;uri&quot;: &quot;A String&quot;, # Required. Data destination URI (e.g.
381 # &#x27;gs://my_bucket/my_object&#x27;). Existing files will be overwritten.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 },
383 },
384 }
385
386 x__xgafv: string, V1 error format.
387 Allowed values
388 1 - v1 error format
389 2 - v2 error format
390
391Returns:
392 An object of the form:
393
394 { # This resource represents a long-running operation that is the result of a
395 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
397 # method returns no data on success, such as `Delete`, the response is
398 # `google.protobuf.Empty`. If the original method is standard
399 # `Get`/`Create`/`Update`, the response should be the resource. For other
400 # methods, the response should have the type `XxxResponse`, where `Xxx`
401 # is the original method name. For example, if the original method name
402 # is `TakeSnapshot()`, the inferred response type is
403 # `TakeSnapshotResponse`.
404 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
405 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700406 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
407 # originally returns it. If you use the default HTTP mapping, the
408 # `name` should be a resource name ending with `operations/{unique_id}`.
409 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
410 # different programming environments, including REST APIs and RPC APIs. It is
411 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
412 # three pieces of data: error code, error message, and error details.
413 #
414 # You can find out more about this error model and how to work with it in the
415 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700416 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
417 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
418 # user-facing error message should be localized and sent in the
419 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700420 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
421 # message types for APIs to use.
422 {
423 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
424 },
425 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700426 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700427 &quot;metadata&quot;: { # {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700428 #
429 # `createTime`: The time the operation was created.
430 #
431 # `endTime`: The time the operation finished running.
432 #
433 # `target`: Server-defined resource path for the target of the operation.
434 #
435 # `verb`: Name of the verb executed by the operation.
436 #
437 # `statusDetail`: Human-readable status of the operation, if any.
438 #
439 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
440 #
441 # `apiVersion`: API version used to start the operation.
442 #
443 # }
Bu Sun Kim65020912020-05-20 12:08:20 -0700444 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700445 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -0700447 # If `true`, the operation is completed, and either `error` or `response` is
448 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700449 }</pre>
450</div>
451
452<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700453 <code class="details" id="failover">failover(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 <pre>Initiates a failover of the master node to current replica node for a
455specific STANDARD tier Cloud Memorystore for Redis instance.
456
457Args:
458 name: string, Required. Redis instance resource name using the form:
459 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
460where `location_id` refers to a GCP region. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700461 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 The object takes the form of:
463
464{ # Request for Failover.
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 &quot;dataProtectionMode&quot;: &quot;A String&quot;, # Optional. Available data protection modes that the user can choose. If it&#x27;s
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700466 # unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
467 }
468
469 x__xgafv: string, V1 error format.
470 Allowed values
471 1 - v1 error format
472 2 - v2 error format
473
474Returns:
475 An object of the form:
476
477 { # This resource represents a long-running operation that is the result of a
478 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700479 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
480 # method returns no data on success, such as `Delete`, the response is
481 # `google.protobuf.Empty`. If the original method is standard
482 # `Get`/`Create`/`Update`, the response should be the resource. For other
483 # methods, the response should have the type `XxxResponse`, where `Xxx`
484 # is the original method name. For example, if the original method name
485 # is `TakeSnapshot()`, the inferred response type is
486 # `TakeSnapshotResponse`.
487 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
488 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700489 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
490 # originally returns it. If you use the default HTTP mapping, the
491 # `name` should be a resource name ending with `operations/{unique_id}`.
492 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
493 # different programming environments, including REST APIs and RPC APIs. It is
494 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
495 # three pieces of data: error code, error message, and error details.
496 #
497 # You can find out more about this error model and how to work with it in the
498 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700499 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
500 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
501 # user-facing error message should be localized and sent in the
502 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
504 # message types for APIs to use.
505 {
506 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
507 },
508 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700509 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;metadata&quot;: { # {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 #
512 # `createTime`: The time the operation was created.
513 #
514 # `endTime`: The time the operation finished running.
515 #
516 # `target`: Server-defined resource path for the target of the operation.
517 #
518 # `verb`: Name of the verb executed by the operation.
519 #
520 # `statusDetail`: Human-readable status of the operation, if any.
521 #
522 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
523 #
524 # `apiVersion`: API version used to start the operation.
525 #
526 # }
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 # If `true`, the operation is completed, and either `error` or `response` is
531 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 }</pre>
533</div>
534
535<div class="method">
536 <code class="details" id="get">get(name, x__xgafv=None)</code>
537 <pre>Gets the details of a specific Redis instance.
538
539Args:
540 name: string, Required. Redis instance resource name using the form:
541 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
542where `location_id` refers to a GCP region. (required)
543 x__xgafv: string, V1 error format.
544 Allowed values
545 1 - v1 error format
546 2 - v2 error format
547
548Returns:
549 An object of the form:
550
551 { # A Google Cloud Redis instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;statusMessage&quot;: &quot;A String&quot;, # Output only. Additional information about the current status of this
553 # instance, if available.
554 &quot;authorizedNetwork&quot;: &quot;A String&quot;, # Optional. The full name of the Google Compute Engine
555 # [network](/compute/docs/networks-and-firewalls#networks) to which the
556 # instance is connected. If left unspecified, the `default` network
557 # will be used.
558 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of this instance.
559 &quot;name&quot;: &quot;A String&quot;, # Required. Unique name of the resource in this scope including project and
560 # location using the form:
561 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
562 #
563 # Note: Redis instances are managed and addressed at regional level so
564 # location_id here refers to a GCP region; however, users may choose which
565 # specific zone (or collection of zones for cross-zone instances) an instance
566 # should be provisioned in. Refer to location_id and
567 # alternative_location_id fields for more details.
568 &quot;connectMode&quot;: &quot;A String&quot;, # Optional. The network connect mode of the Redis instance.
569 # If not provided, the connect mode defaults to DIRECT_PEERING.
570 &quot;persistenceIamIdentity&quot;: &quot;A String&quot;, # Output only. Cloud IAM identity used by import / export operations to
571 # transfer data to/from Cloud Storage. Format is
572 # &quot;serviceAccount:&lt;service_account_email&gt;&quot;. The value may change over time
573 # for a given instance so should be checked before each import/export
574 # operation.
575 &quot;redisConfigs&quot;: { # Optional. Redis configuration parameters, according to
576 # http://redis.io/topics/config. Currently, the only supported parameters
577 # are:
578 #
579 # Redis version 3.2 and newer:
580 #
581 # * maxmemory-policy
582 # * notify-keyspace-events
583 #
584 # Redis version 4.0 and newer:
585 #
586 # * activedefrag
587 # * lfu-decay-time
588 # * lfu-log-factor
589 # * maxmemory-gb
590 #
591 # Redis version 5.0 and newer:
592 #
593 # * stream-node-max-bytes
594 # * stream-node-max-entries
595 &quot;a_key&quot;: &quot;A String&quot;,
596 },
597 &quot;port&quot;: 42, # Output only. The port number of the exposed Redis endpoint.
598 &quot;host&quot;: &quot;A String&quot;, # Output only. Hostname or IP address of the exposed Redis endpoint used by
599 # clients to connect to the service.
600 &quot;redisVersion&quot;: &quot;A String&quot;, # Optional. The version of Redis software.
601 # If not provided, latest supported version will be used. Currently, the
602 # supported values are:
603 #
604 # * `REDIS_3_2` for Redis 3.2 compatibility
605 # * `REDIS_4_0` for Redis 4.0 compatibility (default)
606 # * `REDIS_5_0` for Redis 5.0 compatibility
Bu Sun Kim65020912020-05-20 12:08:20 -0700607 &quot;memorySizeGb&quot;: 42, # Required. Redis memory size in GiB.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700608 &quot;tier&quot;: &quot;A String&quot;, # Required. The service tier of the instance.
609 &quot;displayName&quot;: &quot;A String&quot;, # An arbitrary and optional user-provided name for the instance.
610 &quot;locationId&quot;: &quot;A String&quot;, # Optional. The zone where the instance will be provisioned. If not provided,
611 # the service will choose a zone for the instance. For STANDARD_HA tier,
612 # instances will be created across two zones for protection against zonal
613 # failures. If alternative_location_id is also provided, it must be
614 # different from location_id.
615 &quot;reservedIpRange&quot;: &quot;A String&quot;, # Optional. The CIDR range of internal addresses that are reserved for this
616 # instance. If not provided, the service will choose an unused /29 block,
617 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
618 # and non-overlapping with existing subnets in an authorized network.
619 &quot;currentLocationId&quot;: &quot;A String&quot;, # Output only. The current zone where the Redis endpoint is placed. For Basic
620 # Tier instances, this will always be the same as the location_id
621 # provided by the user at creation time. For Standard Tier instances,
622 # this can be either location_id or alternative_location_id and can
623 # change after a failover event.
624 &quot;alternativeLocationId&quot;: &quot;A String&quot;, # Optional. Only applicable to STANDARD_HA tier which protects the instance
625 # against zonal failures by provisioning it across two zones. If provided, it
626 # must be a different zone from the one provided in location_id.
627 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the instance was created.
628 &quot;labels&quot;: { # Resource labels to represent user provided metadata
629 &quot;a_key&quot;: &quot;A String&quot;,
630 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700631 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700632</div>
633
634<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700635 <code class="details" id="import_">import_(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636 <pre>Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
637
638Redis may stop serving during this operation. Instance state will be
639IMPORTING for entire operation. When complete, the instance will contain
640only data from the imported file.
641
642The returned operation is automatically deleted after a few hours, so
643there is no need to call DeleteOperation.
644
645Args:
646 name: string, Required. Redis instance resource name using the form:
647 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
648where `location_id` refers to a GCP region. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700649 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700650 The object takes the form of:
651
652{ # Request for Import.
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;inputConfig&quot;: { # The input content # Required. Specify data to be imported.
654 &quot;gcsSource&quot;: { # The Cloud Storage location for the input content # Google Cloud Storage location where input content is located.
655 &quot;uri&quot;: &quot;A String&quot;, # Required. Source data URI. (e.g. &#x27;gs://my_bucket/my_object&#x27;).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700656 },
657 },
658 }
659
660 x__xgafv: string, V1 error format.
661 Allowed values
662 1 - v1 error format
663 2 - v2 error format
664
665Returns:
666 An object of the form:
667
668 { # This resource represents a long-running operation that is the result of a
669 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700670 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
671 # method returns no data on success, such as `Delete`, the response is
672 # `google.protobuf.Empty`. If the original method is standard
673 # `Get`/`Create`/`Update`, the response should be the resource. For other
674 # methods, the response should have the type `XxxResponse`, where `Xxx`
675 # is the original method name. For example, if the original method name
676 # is `TakeSnapshot()`, the inferred response type is
677 # `TakeSnapshotResponse`.
678 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
679 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700680 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
681 # originally returns it. If you use the default HTTP mapping, the
682 # `name` should be a resource name ending with `operations/{unique_id}`.
683 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
684 # different programming environments, including REST APIs and RPC APIs. It is
685 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
686 # three pieces of data: error code, error message, and error details.
687 #
688 # You can find out more about this error model and how to work with it in the
689 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700690 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
691 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
692 # user-facing error message should be localized and sent in the
693 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
695 # message types for APIs to use.
696 {
697 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
698 },
699 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700701 &quot;metadata&quot;: { # {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702 #
703 # `createTime`: The time the operation was created.
704 #
705 # `endTime`: The time the operation finished running.
706 #
707 # `target`: Server-defined resource path for the target of the operation.
708 #
709 # `verb`: Name of the verb executed by the operation.
710 #
711 # `statusDetail`: Human-readable status of the operation, if any.
712 #
713 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
714 #
715 # `apiVersion`: API version used to start the operation.
716 #
717 # }
Bu Sun Kim65020912020-05-20 12:08:20 -0700718 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 # If `true`, the operation is completed, and either `error` or `response` is
722 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700723 }</pre>
724</div>
725
726<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700728 <pre>Lists all Redis instances owned by a project in either the specified
729location (region) or all locations.
730
731The location should have the following format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700732
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733* `projects/{project_id}/locations/{location_id}`
734
735If `location_id` is specified as `-` (wildcard), then all regions
736available to the project are queried, and the results are aggregated.
737
738Args:
739 parent: string, Required. The resource name of the instance location using the form:
740 `projects/{project_id}/locations/{location_id}`
741where `location_id` refers to a GCP region. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 pageToken: string, The `next_page_token` value returned from a previous
743ListInstances request, if any.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700744 pageSize: integer, The maximum number of items to return.
745
746If not specified, a default value of 1000 will be used by the service.
747Regardless of the page_size value, the response may include a partial list
Bu Sun Kim65020912020-05-20 12:08:20 -0700748and a caller should only rely on response&#x27;s
Dan O'Mearadd494642020-05-01 07:42:23 -0700749`next_page_token`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700750to determine if there are more instances left to be queried.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 x__xgafv: string, V1 error format.
752 Allowed values
753 1 - v1 error format
754 2 - v2 error format
755
756Returns:
757 An object of the form:
758
759 { # Response for ListInstances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700760 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more
761 # results in the list.
762 &quot;unreachable&quot;: [ # Locations that could not be reached.
763 &quot;A String&quot;,
764 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 &quot;instances&quot;: [ # A list of Redis instances in the project in the specified location,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700766 # or across all locations.
767 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700768 # If the `location_id` in the parent field of the request is &quot;-&quot;, all regions
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769 # available to the project are queried, and the results aggregated.
770 # If in such an aggregated query a location is unavailable, a dummy Redis
Dan O'Mearadd494642020-05-01 07:42:23 -0700771 # entry is included in the response with the `name` field set to a value of
772 # the form `projects/{project_id}/locations/{location_id}/instances/`- and
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 # the `status` field set to ERROR and `status_message` field set to &quot;location
774 # not available for ListInstances&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700775 { # A Google Cloud Redis instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;statusMessage&quot;: &quot;A String&quot;, # Output only. Additional information about the current status of this
777 # instance, if available.
778 &quot;authorizedNetwork&quot;: &quot;A String&quot;, # Optional. The full name of the Google Compute Engine
779 # [network](/compute/docs/networks-and-firewalls#networks) to which the
780 # instance is connected. If left unspecified, the `default` network
781 # will be used.
782 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of this instance.
783 &quot;name&quot;: &quot;A String&quot;, # Required. Unique name of the resource in this scope including project and
784 # location using the form:
785 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
786 #
787 # Note: Redis instances are managed and addressed at regional level so
788 # location_id here refers to a GCP region; however, users may choose which
789 # specific zone (or collection of zones for cross-zone instances) an instance
790 # should be provisioned in. Refer to location_id and
791 # alternative_location_id fields for more details.
792 &quot;connectMode&quot;: &quot;A String&quot;, # Optional. The network connect mode of the Redis instance.
793 # If not provided, the connect mode defaults to DIRECT_PEERING.
794 &quot;persistenceIamIdentity&quot;: &quot;A String&quot;, # Output only. Cloud IAM identity used by import / export operations to
795 # transfer data to/from Cloud Storage. Format is
796 # &quot;serviceAccount:&lt;service_account_email&gt;&quot;. The value may change over time
797 # for a given instance so should be checked before each import/export
798 # operation.
799 &quot;redisConfigs&quot;: { # Optional. Redis configuration parameters, according to
800 # http://redis.io/topics/config. Currently, the only supported parameters
801 # are:
802 #
803 # Redis version 3.2 and newer:
804 #
805 # * maxmemory-policy
806 # * notify-keyspace-events
807 #
808 # Redis version 4.0 and newer:
809 #
810 # * activedefrag
811 # * lfu-decay-time
812 # * lfu-log-factor
813 # * maxmemory-gb
814 #
815 # Redis version 5.0 and newer:
816 #
817 # * stream-node-max-bytes
818 # * stream-node-max-entries
819 &quot;a_key&quot;: &quot;A String&quot;,
820 },
821 &quot;port&quot;: 42, # Output only. The port number of the exposed Redis endpoint.
822 &quot;host&quot;: &quot;A String&quot;, # Output only. Hostname or IP address of the exposed Redis endpoint used by
823 # clients to connect to the service.
824 &quot;redisVersion&quot;: &quot;A String&quot;, # Optional. The version of Redis software.
825 # If not provided, latest supported version will be used. Currently, the
826 # supported values are:
827 #
828 # * `REDIS_3_2` for Redis 3.2 compatibility
829 # * `REDIS_4_0` for Redis 4.0 compatibility (default)
830 # * `REDIS_5_0` for Redis 5.0 compatibility
Bu Sun Kim65020912020-05-20 12:08:20 -0700831 &quot;memorySizeGb&quot;: 42, # Required. Redis memory size in GiB.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700832 &quot;tier&quot;: &quot;A String&quot;, # Required. The service tier of the instance.
833 &quot;displayName&quot;: &quot;A String&quot;, # An arbitrary and optional user-provided name for the instance.
834 &quot;locationId&quot;: &quot;A String&quot;, # Optional. The zone where the instance will be provisioned. If not provided,
835 # the service will choose a zone for the instance. For STANDARD_HA tier,
836 # instances will be created across two zones for protection against zonal
837 # failures. If alternative_location_id is also provided, it must be
838 # different from location_id.
839 &quot;reservedIpRange&quot;: &quot;A String&quot;, # Optional. The CIDR range of internal addresses that are reserved for this
840 # instance. If not provided, the service will choose an unused /29 block,
841 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
842 # and non-overlapping with existing subnets in an authorized network.
843 &quot;currentLocationId&quot;: &quot;A String&quot;, # Output only. The current zone where the Redis endpoint is placed. For Basic
844 # Tier instances, this will always be the same as the location_id
845 # provided by the user at creation time. For Standard Tier instances,
846 # this can be either location_id or alternative_location_id and can
847 # change after a failover event.
848 &quot;alternativeLocationId&quot;: &quot;A String&quot;, # Optional. Only applicable to STANDARD_HA tier which protects the instance
849 # against zonal failures by provisioning it across two zones. If provided, it
850 # must be a different zone from the one provided in location_id.
851 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the instance was created.
852 &quot;labels&quot;: { # Resource labels to represent user provided metadata
853 &quot;a_key&quot;: &quot;A String&quot;,
854 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700855 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700856 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 }</pre>
858</div>
859
860<div class="method">
861 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
862 <pre>Retrieves the next page of results.
863
864Args:
865 previous_request: The request for the previous page. (required)
866 previous_response: The response from the request for the previous page. (required)
867
868Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700870 page. Returns None if there are no more items in the collection.
871 </pre>
872</div>
873
874<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 <pre>Updates the metadata and configuration of a specific Redis instance.
877
878Completed longrunning.Operation will contain the new instance object
879in the response field. The returned operation is automatically deleted
880after a few hours, so there is no need to call DeleteOperation.
881
882Args:
883 name: string, Required. Unique name of the resource in this scope including project and
884location using the form:
885 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
886
887Note: Redis instances are managed and addressed at regional level so
888location_id here refers to a GCP region; however, users may choose which
889specific zone (or collection of zones for cross-zone instances) an instance
Dan O'Mearadd494642020-05-01 07:42:23 -0700890should be provisioned in. Refer to location_id and
891alternative_location_id fields for more details. (required)
892 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700893 The object takes the form of:
894
895{ # A Google Cloud Redis instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700896 &quot;statusMessage&quot;: &quot;A String&quot;, # Output only. Additional information about the current status of this
897 # instance, if available.
898 &quot;authorizedNetwork&quot;: &quot;A String&quot;, # Optional. The full name of the Google Compute Engine
899 # [network](/compute/docs/networks-and-firewalls#networks) to which the
900 # instance is connected. If left unspecified, the `default` network
901 # will be used.
902 &quot;state&quot;: &quot;A String&quot;, # Output only. The current state of this instance.
903 &quot;name&quot;: &quot;A String&quot;, # Required. Unique name of the resource in this scope including project and
904 # location using the form:
905 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
906 #
907 # Note: Redis instances are managed and addressed at regional level so
908 # location_id here refers to a GCP region; however, users may choose which
909 # specific zone (or collection of zones for cross-zone instances) an instance
910 # should be provisioned in. Refer to location_id and
911 # alternative_location_id fields for more details.
912 &quot;connectMode&quot;: &quot;A String&quot;, # Optional. The network connect mode of the Redis instance.
913 # If not provided, the connect mode defaults to DIRECT_PEERING.
914 &quot;persistenceIamIdentity&quot;: &quot;A String&quot;, # Output only. Cloud IAM identity used by import / export operations to
915 # transfer data to/from Cloud Storage. Format is
916 # &quot;serviceAccount:&lt;service_account_email&gt;&quot;. The value may change over time
917 # for a given instance so should be checked before each import/export
918 # operation.
919 &quot;redisConfigs&quot;: { # Optional. Redis configuration parameters, according to
920 # http://redis.io/topics/config. Currently, the only supported parameters
921 # are:
922 #
923 # Redis version 3.2 and newer:
924 #
925 # * maxmemory-policy
926 # * notify-keyspace-events
927 #
928 # Redis version 4.0 and newer:
929 #
930 # * activedefrag
931 # * lfu-decay-time
932 # * lfu-log-factor
933 # * maxmemory-gb
934 #
935 # Redis version 5.0 and newer:
936 #
937 # * stream-node-max-bytes
938 # * stream-node-max-entries
939 &quot;a_key&quot;: &quot;A String&quot;,
940 },
941 &quot;port&quot;: 42, # Output only. The port number of the exposed Redis endpoint.
942 &quot;host&quot;: &quot;A String&quot;, # Output only. Hostname or IP address of the exposed Redis endpoint used by
943 # clients to connect to the service.
944 &quot;redisVersion&quot;: &quot;A String&quot;, # Optional. The version of Redis software.
945 # If not provided, latest supported version will be used. Currently, the
946 # supported values are:
947 #
948 # * `REDIS_3_2` for Redis 3.2 compatibility
949 # * `REDIS_4_0` for Redis 4.0 compatibility (default)
950 # * `REDIS_5_0` for Redis 5.0 compatibility
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 &quot;memorySizeGb&quot;: 42, # Required. Redis memory size in GiB.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700952 &quot;tier&quot;: &quot;A String&quot;, # Required. The service tier of the instance.
953 &quot;displayName&quot;: &quot;A String&quot;, # An arbitrary and optional user-provided name for the instance.
954 &quot;locationId&quot;: &quot;A String&quot;, # Optional. The zone where the instance will be provisioned. If not provided,
955 # the service will choose a zone for the instance. For STANDARD_HA tier,
956 # instances will be created across two zones for protection against zonal
957 # failures. If alternative_location_id is also provided, it must be
958 # different from location_id.
959 &quot;reservedIpRange&quot;: &quot;A String&quot;, # Optional. The CIDR range of internal addresses that are reserved for this
960 # instance. If not provided, the service will choose an unused /29 block,
961 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
962 # and non-overlapping with existing subnets in an authorized network.
963 &quot;currentLocationId&quot;: &quot;A String&quot;, # Output only. The current zone where the Redis endpoint is placed. For Basic
964 # Tier instances, this will always be the same as the location_id
965 # provided by the user at creation time. For Standard Tier instances,
966 # this can be either location_id or alternative_location_id and can
967 # change after a failover event.
968 &quot;alternativeLocationId&quot;: &quot;A String&quot;, # Optional. Only applicable to STANDARD_HA tier which protects the instance
969 # against zonal failures by provisioning it across two zones. If provided, it
970 # must be a different zone from the one provided in location_id.
971 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time the instance was created.
972 &quot;labels&quot;: { # Resource labels to represent user provided metadata
973 &quot;a_key&quot;: &quot;A String&quot;,
974 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700976
977 updateMask: string, Required. Mask of fields to update. At least one path must be supplied in
978this field. The elements of the repeated paths field may only include these
979fields from Instance:
980
981 * `displayName`
982 * `labels`
983 * `memorySizeGb`
984 * `redisConfig`
985 x__xgafv: string, V1 error format.
986 Allowed values
987 1 - v1 error format
988 2 - v2 error format
989
990Returns:
991 An object of the form:
992
993 { # This resource represents a long-running operation that is the result of a
994 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700995 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
996 # method returns no data on success, such as `Delete`, the response is
997 # `google.protobuf.Empty`. If the original method is standard
998 # `Get`/`Create`/`Update`, the response should be the resource. For other
999 # methods, the response should have the type `XxxResponse`, where `Xxx`
1000 # is the original method name. For example, if the original method name
1001 # is `TakeSnapshot()`, the inferred response type is
1002 # `TakeSnapshotResponse`.
1003 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1004 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001005 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1006 # originally returns it. If you use the default HTTP mapping, the
1007 # `name` should be a resource name ending with `operations/{unique_id}`.
1008 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1009 # different programming environments, including REST APIs and RPC APIs. It is
1010 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1011 # three pieces of data: error code, error message, and error details.
1012 #
1013 # You can find out more about this error model and how to work with it in the
1014 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001015 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1016 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1017 # user-facing error message should be localized and sent in the
1018 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001019 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1020 # message types for APIs to use.
1021 {
1022 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1023 },
1024 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001025 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &quot;metadata&quot;: { # {
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001027 #
1028 # `createTime`: The time the operation was created.
1029 #
1030 # `endTime`: The time the operation finished running.
1031 #
1032 # `target`: Server-defined resource path for the target of the operation.
1033 #
1034 # `verb`: Name of the verb executed by the operation.
1035 #
1036 # `statusDetail`: Human-readable status of the operation, if any.
1037 #
1038 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1039 #
1040 # `apiVersion`: API version used to start the operation.
1041 #
1042 # }
Bu Sun Kim65020912020-05-20 12:08:20 -07001043 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001044 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001045 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -07001046 # If `true`, the operation is completed, and either `error` or `response` is
1047 # available.
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 }</pre>
1049</div>
1050
1051<div class="method">
1052 <code class="details" id="upgrade">upgrade(name, body=None, x__xgafv=None)</code>
1053 <pre>Upgrades Redis instance to the newer Redis version specified in the
1054request.
1055
1056Args:
1057 name: string, Required. Redis instance resource name using the form:
1058 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
1059where `location_id` refers to a GCP region. (required)
1060 body: object, The request body.
1061 The object takes the form of:
1062
1063{ # Request for UpgradeInstance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001064 &quot;redisVersion&quot;: &quot;A String&quot;, # Required. Specifies the target version of Redis software to upgrade to.
Dan O'Mearadd494642020-05-01 07:42:23 -07001065 }
1066
1067 x__xgafv: string, V1 error format.
1068 Allowed values
1069 1 - v1 error format
1070 2 - v2 error format
1071
1072Returns:
1073 An object of the form:
1074
1075 { # This resource represents a long-running operation that is the result of a
1076 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001077 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
1078 # method returns no data on success, such as `Delete`, the response is
1079 # `google.protobuf.Empty`. If the original method is standard
1080 # `Get`/`Create`/`Update`, the response should be the resource. For other
1081 # methods, the response should have the type `XxxResponse`, where `Xxx`
1082 # is the original method name. For example, if the original method name
1083 # is `TakeSnapshot()`, the inferred response type is
1084 # `TakeSnapshotResponse`.
1085 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1086 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001087 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
1088 # originally returns it. If you use the default HTTP mapping, the
1089 # `name` should be a resource name ending with `operations/{unique_id}`.
1090 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
1091 # different programming environments, including REST APIs and RPC APIs. It is
1092 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1093 # three pieces of data: error code, error message, and error details.
1094 #
1095 # You can find out more about this error model and how to work with it in the
1096 # [API Design Guide](https://cloud.google.com/apis/design/errors).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001097 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1098 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1099 # user-facing error message should be localized and sent in the
1100 # google.rpc.Status.details field, or localized by the client.
Bu Sun Kim65020912020-05-20 12:08:20 -07001101 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1102 # message types for APIs to use.
1103 {
1104 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1105 },
1106 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001108 &quot;metadata&quot;: { # {
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 #
1110 # `createTime`: The time the operation was created.
1111 #
1112 # `endTime`: The time the operation finished running.
1113 #
1114 # `target`: Server-defined resource path for the target of the operation.
1115 #
1116 # `verb`: Name of the verb executed by the operation.
1117 #
1118 # `statusDetail`: Human-readable status of the operation, if any.
1119 #
1120 # `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1121 #
1122 # `apiVersion`: API version used to start the operation.
1123 #
1124 # }
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Dan O'Mearadd494642020-05-01 07:42:23 -07001126 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001127 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
Dan O'Mearadd494642020-05-01 07:42:23 -07001128 # If `true`, the operation is completed, and either `error` or `response` is
1129 # available.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001130 }</pre>
1131</div>
1132
1133</body></html>