blob: d2b7f36e87b33706bf84a73c34409bdc256f04f2 [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">
78 <code><a href="#create">create(parent, body, instanceId=None, x__xgafv=None)</a></code></p>
79<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">
84 <code><a href="#export">export(name, body, x__xgafv=None)</a></code></p>
85<p class="firstline">Export Redis instance data into a Redis RDB format file in Cloud Storage.</p>
86<p class="toc_element">
87 <code><a href="#failover">failover(name, body, x__xgafv=None)</a></code></p>
88<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">
93 <code><a href="#import_">import_(name, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.</p>
95<p class="toc_element">
96 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
97<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">
102 <code><a href="#patch">patch(name, body, updateMask=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Updates the metadata and configuration of a specific Redis instance.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="create">create(parent, body, instanceId=None, x__xgafv=None)</code>
107 <pre>Creates a Redis instance based on the specified tier and memory size.
108
109By default, the instance is accessible from the project's
110[default network](/compute/docs/networks-and-firewalls#networks).
111
112The creation is executed asynchronously and callers may check the returned
113operation to track its progress. Once the operation is completed the Redis
114instance will be fully functional. Completed longrunning.Operation will
115contain the new instance object in the response field.
116
117The returned operation is automatically deleted after a few hours, so there
118is no need to call DeleteOperation.
119
120Args:
121 parent: string, Required. The resource name of the instance location using the form:
122 `projects/{project_id}/locations/{location_id}`
123where `location_id` refers to a GCP region. (required)
124 body: object, The request body. (required)
125 The object takes the form of:
126
127{ # A Google Cloud Redis instance.
128 "labels": { # Resource labels to represent user provided metadata
129 "a_key": "A String",
130 },
131 "displayName": "A String", # An arbitrary and optional user-provided name for the instance.
132 "name": "A String", # Required. Unique name of the resource in this scope including project and
133 # location using the form:
134 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
135 #
136 # Note: Redis instances are managed and addressed at regional level so
137 # location_id here refers to a GCP region; however, users may choose which
138 # specific zone (or collection of zones for cross-zone instances) an instance
139 # should be provisioned in. Refer to [location_id] and
140 # [alternative_location_id] fields for more details.
141 "alternativeLocationId": "A String", # Optional. Only applicable to STANDARD_HA tier which protects the instance
142 # against zonal failures by provisioning it across two zones. If provided, it
143 # must be a different zone from the one provided in [location_id].
144 "currentLocationId": "A String", # Output only. The current zone where the Redis endpoint is placed. For Basic
145 # Tier instances, this will always be the same as the [location_id]
146 # provided by the user at creation time. For Standard Tier instances,
147 # this can be either [location_id] or [alternative_location_id] and can
148 # change after a failover event.
149 "reservedIpRange": "A String", # Optional. The CIDR range of internal addresses that are reserved for this
150 # instance. If not provided, the service will choose an unused /29 block,
151 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
152 # and non-overlapping with existing subnets in an authorized network.
153 "redisVersion": "A String", # Optional. The version of Redis software.
154 # If not provided, latest supported version will be used. Updating the
155 # version will perform an upgrade/downgrade to the new version. Currently,
156 # the supported values are `REDIS_3_2` for Redis 3.2.
157 "state": "A String", # Output only. The current state of this instance.
158 "createTime": "A String", # Output only. The time the instance was created.
159 "memorySizeGb": 42, # Required. Redis memory size in GiB.
160 "host": "A String", # Output only. Hostname or IP address of the exposed Redis endpoint used by
161 # clients to connect to the service.
162 "persistenceIamIdentity": "A String", # Output only. Cloud IAM identity used by import / export operations to
163 # transfer data to/from Cloud Storage. Format is
164 # "serviceAccount:<service_account_email>". The value may change over time
165 # for a given instance so should be checked before each import/export
166 # operation.
167 "authorizedNetwork": "A String", # Optional. The full name of the Google Compute Engine
168 # [network](/compute/docs/networks-and-firewalls#networks) to which the
169 # instance is connected. If left unspecified, the `default` network
170 # will be used.
171 "redisConfigs": { # Optional. Redis configuration parameters, according to
172 # http://redis.io/topics/config. Currently, the only supported parameters
173 # are:
174 #
175 # * maxmemory-policy
176 # * notify-keyspace-events
177 "a_key": "A String",
178 },
179 "tier": "A String", # Required. The service tier of the instance.
180 "locationId": "A String", # Optional. The zone where the instance will be provisioned. If not provided,
181 # the service will choose a zone for the instance. For STANDARD_HA tier,
182 # instances will be created across two zones for protection against zonal
183 # failures. If [alternative_location_id] is also provided, it must be
184 # different from [location_id].
185 "port": 42, # Output only. The port number of the exposed Redis endpoint.
186 "statusMessage": "A String", # Output only. Additional information about the current status of this
187 # instance, if available.
188}
189
190 instanceId: string, Required. The logical name of the Redis instance in the customer project
191with the following restrictions:
192
193* Must contain only lowercase letters, numbers, and hyphens.
194* Must start with a letter.
195* Must be between 1-40 characters.
196* Must end with a number or a letter.
197* Must be unique within the customer project / location
198 x__xgafv: string, V1 error format.
199 Allowed values
200 1 - v1 error format
201 2 - v2 error format
202
203Returns:
204 An object of the form:
205
206 { # This resource represents a long-running operation that is the result of a
207 # network API call.
208 "metadata": { # {
209 #
210 # `createTime`: The time the operation was created.
211 #
212 # `endTime`: The time the operation finished running.
213 #
214 # `target`: Server-defined resource path for the target of the operation.
215 #
216 # `verb`: Name of the verb executed by the operation.
217 #
218 # `statusDetail`: Human-readable status of the operation, if any.
219 #
220 # `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`.
221 #
222 # `apiVersion`: API version used to start the operation.
223 #
224 # }
225 "a_key": "", # Properties of the object. Contains field @type with type URL.
226 },
227 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
228 # different programming environments, including REST APIs and RPC APIs. It is
229 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
230 # three pieces of data: error code, error message, and error details.
231 #
232 # You can find out more about this error model and how to work with it in the
233 # [API Design Guide](https://cloud.google.com/apis/design/errors).
234 "message": "A String", # A developer-facing error message, which should be in English. Any
235 # user-facing error message should be localized and sent in the
236 # google.rpc.Status.details field, or localized by the client.
237 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
238 "details": [ # A list of messages that carry the error details. There is a common set of
239 # message types for APIs to use.
240 {
241 "a_key": "", # Properties of the object. Contains field @type with type URL.
242 },
243 ],
244 },
245 "done": True or False, # If the value is `false`, it means the operation is still in progress.
246 # If `true`, the operation is completed, and either `error` or `response` is
247 # available.
248 "response": { # The normal response of the operation in case of success. If the original
249 # method returns no data on success, such as `Delete`, the response is
250 # `google.protobuf.Empty`. If the original method is standard
251 # `Get`/`Create`/`Update`, the response should be the resource. For other
252 # methods, the response should have the type `XxxResponse`, where `Xxx`
253 # is the original method name. For example, if the original method name
254 # is `TakeSnapshot()`, the inferred response type is
255 # `TakeSnapshotResponse`.
256 "a_key": "", # Properties of the object. Contains field @type with type URL.
257 },
258 "name": "A String", # The server-assigned name, which is only unique within the same service that
259 # originally returns it. If you use the default HTTP mapping, the
260 # `name` should be a resource name ending with `operations/{unique_id}`.
261 }</pre>
262</div>
263
264<div class="method">
265 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
266 <pre>Deletes a specific Redis instance. Instance stops serving and data is
267deleted.
268
269Args:
270 name: string, Required. Redis instance resource name using the form:
271 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
272where `location_id` refers to a GCP region. (required)
273 x__xgafv: string, V1 error format.
274 Allowed values
275 1 - v1 error format
276 2 - v2 error format
277
278Returns:
279 An object of the form:
280
281 { # This resource represents a long-running operation that is the result of a
282 # network API call.
283 "metadata": { # {
284 #
285 # `createTime`: The time the operation was created.
286 #
287 # `endTime`: The time the operation finished running.
288 #
289 # `target`: Server-defined resource path for the target of the operation.
290 #
291 # `verb`: Name of the verb executed by the operation.
292 #
293 # `statusDetail`: Human-readable status of the operation, if any.
294 #
295 # `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`.
296 #
297 # `apiVersion`: API version used to start the operation.
298 #
299 # }
300 "a_key": "", # Properties of the object. Contains field @type with type URL.
301 },
302 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
303 # different programming environments, including REST APIs and RPC APIs. It is
304 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
305 # three pieces of data: error code, error message, and error details.
306 #
307 # You can find out more about this error model and how to work with it in the
308 # [API Design Guide](https://cloud.google.com/apis/design/errors).
309 "message": "A String", # A developer-facing error message, which should be in English. Any
310 # user-facing error message should be localized and sent in the
311 # google.rpc.Status.details field, or localized by the client.
312 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
313 "details": [ # A list of messages that carry the error details. There is a common set of
314 # message types for APIs to use.
315 {
316 "a_key": "", # Properties of the object. Contains field @type with type URL.
317 },
318 ],
319 },
320 "done": True or False, # If the value is `false`, it means the operation is still in progress.
321 # If `true`, the operation is completed, and either `error` or `response` is
322 # available.
323 "response": { # The normal response of the operation in case of success. If the original
324 # method returns no data on success, such as `Delete`, the response is
325 # `google.protobuf.Empty`. If the original method is standard
326 # `Get`/`Create`/`Update`, the response should be the resource. For other
327 # methods, the response should have the type `XxxResponse`, where `Xxx`
328 # is the original method name. For example, if the original method name
329 # is `TakeSnapshot()`, the inferred response type is
330 # `TakeSnapshotResponse`.
331 "a_key": "", # Properties of the object. Contains field @type with type URL.
332 },
333 "name": "A String", # The server-assigned name, which is only unique within the same service that
334 # originally returns it. If you use the default HTTP mapping, the
335 # `name` should be a resource name ending with `operations/{unique_id}`.
336 }</pre>
337</div>
338
339<div class="method">
340 <code class="details" id="export">export(name, body, x__xgafv=None)</code>
341 <pre>Export Redis instance data into a Redis RDB format file in Cloud Storage.
342
343Redis will continue serving during this operation.
344
345The returned operation is automatically deleted after a few hours, so
346there is no need to call DeleteOperation.
347
348Args:
349 name: string, Required. Redis instance resource name using the form:
350 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
351where `location_id` refers to a GCP region. (required)
352 body: object, The request body. (required)
353 The object takes the form of:
354
355{ # Request for Export.
356 "outputConfig": { # The output content # Required. Specify data to be exported.
357 "gcsDestination": { # The Cloud Storage location for the output content # Google Cloud Storage destination for output content.
358 "uri": "A String", # Required. Data destination URI (e.g.
359 # 'gs://my_bucket/my_object'). Existing files will be overwritten.
360 },
361 },
362 }
363
364 x__xgafv: string, V1 error format.
365 Allowed values
366 1 - v1 error format
367 2 - v2 error format
368
369Returns:
370 An object of the form:
371
372 { # This resource represents a long-running operation that is the result of a
373 # network API call.
374 "metadata": { # {
375 #
376 # `createTime`: The time the operation was created.
377 #
378 # `endTime`: The time the operation finished running.
379 #
380 # `target`: Server-defined resource path for the target of the operation.
381 #
382 # `verb`: Name of the verb executed by the operation.
383 #
384 # `statusDetail`: Human-readable status of the operation, if any.
385 #
386 # `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`.
387 #
388 # `apiVersion`: API version used to start the operation.
389 #
390 # }
391 "a_key": "", # Properties of the object. Contains field @type with type URL.
392 },
393 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
394 # different programming environments, including REST APIs and RPC APIs. It is
395 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
396 # three pieces of data: error code, error message, and error details.
397 #
398 # You can find out more about this error model and how to work with it in the
399 # [API Design Guide](https://cloud.google.com/apis/design/errors).
400 "message": "A String", # A developer-facing error message, which should be in English. Any
401 # user-facing error message should be localized and sent in the
402 # google.rpc.Status.details field, or localized by the client.
403 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
404 "details": [ # A list of messages that carry the error details. There is a common set of
405 # message types for APIs to use.
406 {
407 "a_key": "", # Properties of the object. Contains field @type with type URL.
408 },
409 ],
410 },
411 "done": True or False, # If the value is `false`, it means the operation is still in progress.
412 # If `true`, the operation is completed, and either `error` or `response` is
413 # available.
414 "response": { # The normal response of the operation in case of success. If the original
415 # method returns no data on success, such as `Delete`, the response is
416 # `google.protobuf.Empty`. If the original method is standard
417 # `Get`/`Create`/`Update`, the response should be the resource. For other
418 # methods, the response should have the type `XxxResponse`, where `Xxx`
419 # is the original method name. For example, if the original method name
420 # is `TakeSnapshot()`, the inferred response type is
421 # `TakeSnapshotResponse`.
422 "a_key": "", # Properties of the object. Contains field @type with type URL.
423 },
424 "name": "A String", # The server-assigned name, which is only unique within the same service that
425 # originally returns it. If you use the default HTTP mapping, the
426 # `name` should be a resource name ending with `operations/{unique_id}`.
427 }</pre>
428</div>
429
430<div class="method">
431 <code class="details" id="failover">failover(name, body, x__xgafv=None)</code>
432 <pre>Initiates a failover of the master node to current replica node for a
433specific STANDARD tier Cloud Memorystore for Redis instance.
434
435Args:
436 name: string, Required. Redis instance resource name using the form:
437 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
438where `location_id` refers to a GCP region. (required)
439 body: object, The request body. (required)
440 The object takes the form of:
441
442{ # Request for Failover.
443 "dataProtectionMode": "A String", # Optional. Available data protection modes that the user can choose. If it's
444 # unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
445 }
446
447 x__xgafv: string, V1 error format.
448 Allowed values
449 1 - v1 error format
450 2 - v2 error format
451
452Returns:
453 An object of the form:
454
455 { # This resource represents a long-running operation that is the result of a
456 # network API call.
457 "metadata": { # {
458 #
459 # `createTime`: The time the operation was created.
460 #
461 # `endTime`: The time the operation finished running.
462 #
463 # `target`: Server-defined resource path for the target of the operation.
464 #
465 # `verb`: Name of the verb executed by the operation.
466 #
467 # `statusDetail`: Human-readable status of the operation, if any.
468 #
469 # `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`.
470 #
471 # `apiVersion`: API version used to start the operation.
472 #
473 # }
474 "a_key": "", # Properties of the object. Contains field @type with type URL.
475 },
476 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
477 # different programming environments, including REST APIs and RPC APIs. It is
478 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
479 # three pieces of data: error code, error message, and error details.
480 #
481 # You can find out more about this error model and how to work with it in the
482 # [API Design Guide](https://cloud.google.com/apis/design/errors).
483 "message": "A String", # A developer-facing error message, which should be in English. Any
484 # user-facing error message should be localized and sent in the
485 # google.rpc.Status.details field, or localized by the client.
486 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
487 "details": [ # A list of messages that carry the error details. There is a common set of
488 # message types for APIs to use.
489 {
490 "a_key": "", # Properties of the object. Contains field @type with type URL.
491 },
492 ],
493 },
494 "done": True or False, # If the value is `false`, it means the operation is still in progress.
495 # If `true`, the operation is completed, and either `error` or `response` is
496 # available.
497 "response": { # The normal response of the operation in case of success. If the original
498 # method returns no data on success, such as `Delete`, the response is
499 # `google.protobuf.Empty`. If the original method is standard
500 # `Get`/`Create`/`Update`, the response should be the resource. For other
501 # methods, the response should have the type `XxxResponse`, where `Xxx`
502 # is the original method name. For example, if the original method name
503 # is `TakeSnapshot()`, the inferred response type is
504 # `TakeSnapshotResponse`.
505 "a_key": "", # Properties of the object. Contains field @type with type URL.
506 },
507 "name": "A String", # The server-assigned name, which is only unique within the same service that
508 # originally returns it. If you use the default HTTP mapping, the
509 # `name` should be a resource name ending with `operations/{unique_id}`.
510 }</pre>
511</div>
512
513<div class="method">
514 <code class="details" id="get">get(name, x__xgafv=None)</code>
515 <pre>Gets the details of a specific Redis instance.
516
517Args:
518 name: string, Required. Redis instance resource name using the form:
519 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
520where `location_id` refers to a GCP region. (required)
521 x__xgafv: string, V1 error format.
522 Allowed values
523 1 - v1 error format
524 2 - v2 error format
525
526Returns:
527 An object of the form:
528
529 { # A Google Cloud Redis instance.
530 "labels": { # Resource labels to represent user provided metadata
531 "a_key": "A String",
532 },
533 "displayName": "A String", # An arbitrary and optional user-provided name for the instance.
534 "name": "A String", # Required. Unique name of the resource in this scope including project and
535 # location using the form:
536 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
537 #
538 # Note: Redis instances are managed and addressed at regional level so
539 # location_id here refers to a GCP region; however, users may choose which
540 # specific zone (or collection of zones for cross-zone instances) an instance
541 # should be provisioned in. Refer to [location_id] and
542 # [alternative_location_id] fields for more details.
543 "alternativeLocationId": "A String", # Optional. Only applicable to STANDARD_HA tier which protects the instance
544 # against zonal failures by provisioning it across two zones. If provided, it
545 # must be a different zone from the one provided in [location_id].
546 "currentLocationId": "A String", # Output only. The current zone where the Redis endpoint is placed. For Basic
547 # Tier instances, this will always be the same as the [location_id]
548 # provided by the user at creation time. For Standard Tier instances,
549 # this can be either [location_id] or [alternative_location_id] and can
550 # change after a failover event.
551 "reservedIpRange": "A String", # Optional. The CIDR range of internal addresses that are reserved for this
552 # instance. If not provided, the service will choose an unused /29 block,
553 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
554 # and non-overlapping with existing subnets in an authorized network.
555 "redisVersion": "A String", # Optional. The version of Redis software.
556 # If not provided, latest supported version will be used. Updating the
557 # version will perform an upgrade/downgrade to the new version. Currently,
558 # the supported values are `REDIS_3_2` for Redis 3.2.
559 "state": "A String", # Output only. The current state of this instance.
560 "createTime": "A String", # Output only. The time the instance was created.
561 "memorySizeGb": 42, # Required. Redis memory size in GiB.
562 "host": "A String", # Output only. Hostname or IP address of the exposed Redis endpoint used by
563 # clients to connect to the service.
564 "persistenceIamIdentity": "A String", # Output only. Cloud IAM identity used by import / export operations to
565 # transfer data to/from Cloud Storage. Format is
566 # "serviceAccount:<service_account_email>". The value may change over time
567 # for a given instance so should be checked before each import/export
568 # operation.
569 "authorizedNetwork": "A String", # Optional. The full name of the Google Compute Engine
570 # [network](/compute/docs/networks-and-firewalls#networks) to which the
571 # instance is connected. If left unspecified, the `default` network
572 # will be used.
573 "redisConfigs": { # Optional. Redis configuration parameters, according to
574 # http://redis.io/topics/config. Currently, the only supported parameters
575 # are:
576 #
577 # * maxmemory-policy
578 # * notify-keyspace-events
579 "a_key": "A String",
580 },
581 "tier": "A String", # Required. The service tier of the instance.
582 "locationId": "A String", # Optional. The zone where the instance will be provisioned. If not provided,
583 # the service will choose a zone for the instance. For STANDARD_HA tier,
584 # instances will be created across two zones for protection against zonal
585 # failures. If [alternative_location_id] is also provided, it must be
586 # different from [location_id].
587 "port": 42, # Output only. The port number of the exposed Redis endpoint.
588 "statusMessage": "A String", # Output only. Additional information about the current status of this
589 # instance, if available.
590 }</pre>
591</div>
592
593<div class="method">
594 <code class="details" id="import_">import_(name, body, x__xgafv=None)</code>
595 <pre>Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
596
597Redis may stop serving during this operation. Instance state will be
598IMPORTING for entire operation. When complete, the instance will contain
599only data from the imported file.
600
601The returned operation is automatically deleted after a few hours, so
602there is no need to call DeleteOperation.
603
604Args:
605 name: string, Required. Redis instance resource name using the form:
606 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
607where `location_id` refers to a GCP region. (required)
608 body: object, The request body. (required)
609 The object takes the form of:
610
611{ # Request for Import.
612 "inputConfig": { # The input content # Required. Specify data to be imported.
613 "gcsSource": { # The Cloud Storage location for the input content # Google Cloud Storage location where input content is located.
614 "uri": "A String", # Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
615 },
616 },
617 }
618
619 x__xgafv: string, V1 error format.
620 Allowed values
621 1 - v1 error format
622 2 - v2 error format
623
624Returns:
625 An object of the form:
626
627 { # This resource represents a long-running operation that is the result of a
628 # network API call.
629 "metadata": { # {
630 #
631 # `createTime`: The time the operation was created.
632 #
633 # `endTime`: The time the operation finished running.
634 #
635 # `target`: Server-defined resource path for the target of the operation.
636 #
637 # `verb`: Name of the verb executed by the operation.
638 #
639 # `statusDetail`: Human-readable status of the operation, if any.
640 #
641 # `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`.
642 #
643 # `apiVersion`: API version used to start the operation.
644 #
645 # }
646 "a_key": "", # Properties of the object. Contains field @type with type URL.
647 },
648 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
649 # different programming environments, including REST APIs and RPC APIs. It is
650 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
651 # three pieces of data: error code, error message, and error details.
652 #
653 # You can find out more about this error model and how to work with it in the
654 # [API Design Guide](https://cloud.google.com/apis/design/errors).
655 "message": "A String", # A developer-facing error message, which should be in English. Any
656 # user-facing error message should be localized and sent in the
657 # google.rpc.Status.details field, or localized by the client.
658 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
659 "details": [ # A list of messages that carry the error details. There is a common set of
660 # message types for APIs to use.
661 {
662 "a_key": "", # Properties of the object. Contains field @type with type URL.
663 },
664 ],
665 },
666 "done": True or False, # If the value is `false`, it means the operation is still in progress.
667 # If `true`, the operation is completed, and either `error` or `response` is
668 # available.
669 "response": { # The normal response of the operation in case of success. If the original
670 # method returns no data on success, such as `Delete`, the response is
671 # `google.protobuf.Empty`. If the original method is standard
672 # `Get`/`Create`/`Update`, the response should be the resource. For other
673 # methods, the response should have the type `XxxResponse`, where `Xxx`
674 # is the original method name. For example, if the original method name
675 # is `TakeSnapshot()`, the inferred response type is
676 # `TakeSnapshotResponse`.
677 "a_key": "", # Properties of the object. Contains field @type with type URL.
678 },
679 "name": "A String", # The server-assigned name, which is only unique within the same service that
680 # originally returns it. If you use the default HTTP mapping, the
681 # `name` should be a resource name ending with `operations/{unique_id}`.
682 }</pre>
683</div>
684
685<div class="method">
686 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
687 <pre>Lists all Redis instances owned by a project in either the specified
688location (region) or all locations.
689
690The location should have the following format:
691* `projects/{project_id}/locations/{location_id}`
692
693If `location_id` is specified as `-` (wildcard), then all regions
694available to the project are queried, and the results are aggregated.
695
696Args:
697 parent: string, Required. The resource name of the instance location using the form:
698 `projects/{project_id}/locations/{location_id}`
699where `location_id` refers to a GCP region. (required)
700 pageSize: integer, The maximum number of items to return.
701
702If not specified, a default value of 1000 will be used by the service.
703Regardless of the page_size value, the response may include a partial list
704and a caller should only rely on response's
705next_page_token
706to determine if there are more instances left to be queried.
707 pageToken: string, The next_page_token value returned from a previous List request,
708if any.
709 x__xgafv: string, V1 error format.
710 Allowed values
711 1 - v1 error format
712 2 - v2 error format
713
714Returns:
715 An object of the form:
716
717 { # Response for ListInstances.
718 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more
719 # results in the list.
720 "unreachable": [ # Locations that could not be reached.
721 "A String",
722 ],
723 "instances": [ # A list of Redis instances in the project in the specified location,
724 # or across all locations.
725 #
726 # If the `location_id` in the parent field of the request is "-", all regions
727 # available to the project are queried, and the results aggregated.
728 # If in such an aggregated query a location is unavailable, a dummy Redis
729 # entry is included in the response with the "name" field set to a value of
730 # the form projects/{project_id}/locations/{location_id}/instances/- and the
731 # "status" field set to ERROR and "status_message" field set to "location not
732 # available for ListInstances".
733 { # A Google Cloud Redis instance.
734 "labels": { # Resource labels to represent user provided metadata
735 "a_key": "A String",
736 },
737 "displayName": "A String", # An arbitrary and optional user-provided name for the instance.
738 "name": "A String", # Required. Unique name of the resource in this scope including project and
739 # location using the form:
740 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
741 #
742 # Note: Redis instances are managed and addressed at regional level so
743 # location_id here refers to a GCP region; however, users may choose which
744 # specific zone (or collection of zones for cross-zone instances) an instance
745 # should be provisioned in. Refer to [location_id] and
746 # [alternative_location_id] fields for more details.
747 "alternativeLocationId": "A String", # Optional. Only applicable to STANDARD_HA tier which protects the instance
748 # against zonal failures by provisioning it across two zones. If provided, it
749 # must be a different zone from the one provided in [location_id].
750 "currentLocationId": "A String", # Output only. The current zone where the Redis endpoint is placed. For Basic
751 # Tier instances, this will always be the same as the [location_id]
752 # provided by the user at creation time. For Standard Tier instances,
753 # this can be either [location_id] or [alternative_location_id] and can
754 # change after a failover event.
755 "reservedIpRange": "A String", # Optional. The CIDR range of internal addresses that are reserved for this
756 # instance. If not provided, the service will choose an unused /29 block,
757 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
758 # and non-overlapping with existing subnets in an authorized network.
759 "redisVersion": "A String", # Optional. The version of Redis software.
760 # If not provided, latest supported version will be used. Updating the
761 # version will perform an upgrade/downgrade to the new version. Currently,
762 # the supported values are `REDIS_3_2` for Redis 3.2.
763 "state": "A String", # Output only. The current state of this instance.
764 "createTime": "A String", # Output only. The time the instance was created.
765 "memorySizeGb": 42, # Required. Redis memory size in GiB.
766 "host": "A String", # Output only. Hostname or IP address of the exposed Redis endpoint used by
767 # clients to connect to the service.
768 "persistenceIamIdentity": "A String", # Output only. Cloud IAM identity used by import / export operations to
769 # transfer data to/from Cloud Storage. Format is
770 # "serviceAccount:<service_account_email>". The value may change over time
771 # for a given instance so should be checked before each import/export
772 # operation.
773 "authorizedNetwork": "A String", # Optional. The full name of the Google Compute Engine
774 # [network](/compute/docs/networks-and-firewalls#networks) to which the
775 # instance is connected. If left unspecified, the `default` network
776 # will be used.
777 "redisConfigs": { # Optional. Redis configuration parameters, according to
778 # http://redis.io/topics/config. Currently, the only supported parameters
779 # are:
780 #
781 # * maxmemory-policy
782 # * notify-keyspace-events
783 "a_key": "A String",
784 },
785 "tier": "A String", # Required. The service tier of the instance.
786 "locationId": "A String", # Optional. The zone where the instance will be provisioned. If not provided,
787 # the service will choose a zone for the instance. For STANDARD_HA tier,
788 # instances will be created across two zones for protection against zonal
789 # failures. If [alternative_location_id] is also provided, it must be
790 # different from [location_id].
791 "port": 42, # Output only. The port number of the exposed Redis endpoint.
792 "statusMessage": "A String", # Output only. Additional information about the current status of this
793 # instance, if available.
794 },
795 ],
796 }</pre>
797</div>
798
799<div class="method">
800 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
801 <pre>Retrieves the next page of results.
802
803Args:
804 previous_request: The request for the previous page. (required)
805 previous_response: The response from the request for the previous page. (required)
806
807Returns:
808 A request object that you can call 'execute()' on to request the next
809 page. Returns None if there are no more items in the collection.
810 </pre>
811</div>
812
813<div class="method">
814 <code class="details" id="patch">patch(name, body, updateMask=None, x__xgafv=None)</code>
815 <pre>Updates the metadata and configuration of a specific Redis instance.
816
817Completed longrunning.Operation will contain the new instance object
818in the response field. The returned operation is automatically deleted
819after a few hours, so there is no need to call DeleteOperation.
820
821Args:
822 name: string, Required. Unique name of the resource in this scope including project and
823location using the form:
824 `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
825
826Note: Redis instances are managed and addressed at regional level so
827location_id here refers to a GCP region; however, users may choose which
828specific zone (or collection of zones for cross-zone instances) an instance
829should be provisioned in. Refer to [location_id] and
830[alternative_location_id] fields for more details. (required)
831 body: object, The request body. (required)
832 The object takes the form of:
833
834{ # A Google Cloud Redis instance.
835 "labels": { # Resource labels to represent user provided metadata
836 "a_key": "A String",
837 },
838 "displayName": "A String", # An arbitrary and optional user-provided name for the instance.
839 "name": "A String", # Required. Unique name of the resource in this scope including project and
840 # location using the form:
841 # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
842 #
843 # Note: Redis instances are managed and addressed at regional level so
844 # location_id here refers to a GCP region; however, users may choose which
845 # specific zone (or collection of zones for cross-zone instances) an instance
846 # should be provisioned in. Refer to [location_id] and
847 # [alternative_location_id] fields for more details.
848 "alternativeLocationId": "A String", # 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 "currentLocationId": "A String", # Output only. The current zone where the Redis endpoint is placed. For Basic
852 # Tier instances, this will always be the same as the [location_id]
853 # provided by the user at creation time. For Standard Tier instances,
854 # this can be either [location_id] or [alternative_location_id] and can
855 # change after a failover event.
856 "reservedIpRange": "A String", # Optional. The CIDR range of internal addresses that are reserved for this
857 # instance. If not provided, the service will choose an unused /29 block,
858 # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
859 # and non-overlapping with existing subnets in an authorized network.
860 "redisVersion": "A String", # Optional. The version of Redis software.
861 # If not provided, latest supported version will be used. Updating the
862 # version will perform an upgrade/downgrade to the new version. Currently,
863 # the supported values are `REDIS_3_2` for Redis 3.2.
864 "state": "A String", # Output only. The current state of this instance.
865 "createTime": "A String", # Output only. The time the instance was created.
866 "memorySizeGb": 42, # Required. Redis memory size in GiB.
867 "host": "A String", # Output only. Hostname or IP address of the exposed Redis endpoint used by
868 # clients to connect to the service.
869 "persistenceIamIdentity": "A String", # Output only. Cloud IAM identity used by import / export operations to
870 # transfer data to/from Cloud Storage. Format is
871 # "serviceAccount:<service_account_email>". The value may change over time
872 # for a given instance so should be checked before each import/export
873 # operation.
874 "authorizedNetwork": "A String", # Optional. The full name of the Google Compute Engine
875 # [network](/compute/docs/networks-and-firewalls#networks) to which the
876 # instance is connected. If left unspecified, the `default` network
877 # will be used.
878 "redisConfigs": { # Optional. Redis configuration parameters, according to
879 # http://redis.io/topics/config. Currently, the only supported parameters
880 # are:
881 #
882 # * maxmemory-policy
883 # * notify-keyspace-events
884 "a_key": "A String",
885 },
886 "tier": "A String", # Required. The service tier of the instance.
887 "locationId": "A String", # Optional. The zone where the instance will be provisioned. If not provided,
888 # the service will choose a zone for the instance. For STANDARD_HA tier,
889 # instances will be created across two zones for protection against zonal
890 # failures. If [alternative_location_id] is also provided, it must be
891 # different from [location_id].
892 "port": 42, # Output only. The port number of the exposed Redis endpoint.
893 "statusMessage": "A String", # Output only. Additional information about the current status of this
894 # instance, if available.
895}
896
897 updateMask: string, Required. Mask of fields to update. At least one path must be supplied in
898this field. The elements of the repeated paths field may only include these
899fields from Instance:
900
901 * `displayName`
902 * `labels`
903 * `memorySizeGb`
904 * `redisConfig`
905 x__xgafv: string, V1 error format.
906 Allowed values
907 1 - v1 error format
908 2 - v2 error format
909
910Returns:
911 An object of the form:
912
913 { # This resource represents a long-running operation that is the result of a
914 # network API call.
915 "metadata": { # {
916 #
917 # `createTime`: The time the operation was created.
918 #
919 # `endTime`: The time the operation finished running.
920 #
921 # `target`: Server-defined resource path for the target of the operation.
922 #
923 # `verb`: Name of the verb executed by the operation.
924 #
925 # `statusDetail`: Human-readable status of the operation, if any.
926 #
927 # `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`.
928 #
929 # `apiVersion`: API version used to start the operation.
930 #
931 # }
932 "a_key": "", # Properties of the object. Contains field @type with type URL.
933 },
934 "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
935 # different programming environments, including REST APIs and RPC APIs. It is
936 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
937 # three pieces of data: error code, error message, and error details.
938 #
939 # You can find out more about this error model and how to work with it in the
940 # [API Design Guide](https://cloud.google.com/apis/design/errors).
941 "message": "A String", # A developer-facing error message, which should be in English. Any
942 # user-facing error message should be localized and sent in the
943 # google.rpc.Status.details field, or localized by the client.
944 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
945 "details": [ # A list of messages that carry the error details. There is a common set of
946 # message types for APIs to use.
947 {
948 "a_key": "", # Properties of the object. Contains field @type with type URL.
949 },
950 ],
951 },
952 "done": True or False, # If the value is `false`, it means the operation is still in progress.
953 # If `true`, the operation is completed, and either `error` or `response` is
954 # available.
955 "response": { # The normal response of the operation in case of success. If the original
956 # method returns no data on success, such as `Delete`, the response is
957 # `google.protobuf.Empty`. If the original method is standard
958 # `Get`/`Create`/`Update`, the response should be the resource. For other
959 # methods, the response should have the type `XxxResponse`, where `Xxx`
960 # is the original method name. For example, if the original method name
961 # is `TakeSnapshot()`, the inferred response type is
962 # `TakeSnapshotResponse`.
963 "a_key": "", # Properties of the object. Contains field @type with type URL.
964 },
965 "name": "A String", # The server-assigned name, which is only unique within the same service that
966 # originally returns it. If you use the default HTTP mapping, the
967 # `name` should be a resource name ending with `operations/{unique_id}`.
968 }</pre>
969</div>
970
971</body></html>