• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<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="datastore_v1beta1.html">Cloud Datastore API</a> . <a href="datastore_v1beta1.projects.html">projects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#export">export(projectId, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Exports a copy of all or a subset of entities from Google Cloud Datastore</p>
80<p class="toc_element">
81  <code><a href="#import_">import_(projectId, body, x__xgafv=None)</a></code></p>
82<p class="firstline">Imports entities into Google Cloud Datastore. Existing entities with the</p>
83<h3>Method Details</h3>
84<div class="method">
85    <code class="details" id="export">export(projectId, body, x__xgafv=None)</code>
86  <pre>Exports a copy of all or a subset of entities from Google Cloud Datastore
87to another storage system, such as Google Cloud Storage. Recent updates to
88entities may not be reflected in the export. The export occurs in the
89background and its progress can be monitored and managed via the
90Operation resource that is created. The output of an export may only be
91used once the associated operation is done. If an export operation is
92cancelled before completion it may leave partial data behind in Google
93Cloud Storage.
94
95Args:
96  projectId: string, Project ID against which to make the request. (required)
97  body: object, The request body. (required)
98    The object takes the form of:
99
100{ # The request for
101      # google.datastore.admin.v1beta1.DatastoreAdmin.ExportEntities.
102    "outputUrlPrefix": "A String", # Location for the export metadata and data files.
103        #
104        # The full resource URL of the external storage location. Currently, only
105        # Google Cloud Storage is supported. So output_url_prefix should be of the
106        # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the
107        # name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud
108        # Storage namespace path (this is not a Cloud Datastore namespace). For more
109        # information about Cloud Storage namespace paths, see
110        # [Object name
111        # considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
112        #
113        # The resulting files will be nested deeper than the specified URL prefix.
114        # The final output URL will be provided in the
115        # google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url
116        # field. That value should be used for subsequent ImportEntities operations.
117        #
118        # By nesting the data files deeper, the same Cloud Storage bucket can be used
119        # in multiple ExportEntities operations without conflict.
120    "labels": { # Client-assigned labels.
121      "a_key": "A String",
122    },
123    "entityFilter": { # Identifies a subset of entities in a project. This is specified as # Description of what data from the project is included in the export.
124        # combinations of kinds and namespaces (either or both of which may be all, as
125        # described in the following examples).
126        # Example usage:
127        #
128        # Entire project:
129        #   kinds=[], namespace_ids=[]
130        #
131        # Kinds Foo and Bar in all namespaces:
132        #   kinds=['Foo', 'Bar'], namespace_ids=[]
133        #
134        # Kinds Foo and Bar only in the default namespace:
135        #   kinds=['Foo', 'Bar'], namespace_ids=['']
136        #
137        # Kinds Foo and Bar in both the default and Baz namespaces:
138        #   kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
139        #
140        # The entire Baz namespace:
141        #   kinds=[], namespace_ids=['Baz']
142      "kinds": [ # If empty, then this represents all kinds.
143        "A String",
144      ],
145      "namespaceIds": [ # An empty list represents all namespaces. This is the preferred
146          # usage for projects that don't use namespaces.
147          #
148          # An empty string element represents the default namespace. This should be
149          # used if the project has data in non-default namespaces, but doesn't want to
150          # include them.
151          # Each namespace in this list must be unique.
152        "A String",
153      ],
154    },
155  }
156
157  x__xgafv: string, V1 error format.
158    Allowed values
159      1 - v1 error format
160      2 - v2 error format
161
162Returns:
163  An object of the form:
164
165    { # This resource represents a long-running operation that is the result of a
166      # network API call.
167    "metadata": { # Service-specific metadata associated with the operation.  It typically
168        # contains progress information and common metadata such as create time.
169        # Some services might not provide such metadata.  Any method that returns a
170        # long-running operation should document the metadata type, if any.
171      "a_key": "", # Properties of the object. Contains field @type with type URL.
172    },
173    "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.
174        # different programming environments, including REST APIs and RPC APIs. It is
175        # used by [gRPC](https://github.com/grpc). The error model is designed to be:
176        #
177        # - Simple to use and understand for most users
178        # - Flexible enough to meet unexpected needs
179        #
180        # # Overview
181        #
182        # The `Status` message contains three pieces of data: error code, error
183        # message, and error details. The error code should be an enum value of
184        # google.rpc.Code, but it may accept additional error codes if needed.  The
185        # error message should be a developer-facing English message that helps
186        # developers *understand* and *resolve* the error. If a localized user-facing
187        # error message is needed, put the localized message in the error details or
188        # localize it in the client. The optional error details may contain arbitrary
189        # information about the error. There is a predefined set of error detail types
190        # in the package `google.rpc` that can be used for common error conditions.
191        #
192        # # Language mapping
193        #
194        # The `Status` message is the logical representation of the error model, but it
195        # is not necessarily the actual wire format. When the `Status` message is
196        # exposed in different client libraries and different wire protocols, it can be
197        # mapped differently. For example, it will likely be mapped to some exceptions
198        # in Java, but more likely mapped to some error codes in C.
199        #
200        # # Other uses
201        #
202        # The error model and the `Status` message can be used in a variety of
203        # environments, either with or without APIs, to provide a
204        # consistent developer experience across different environments.
205        #
206        # Example uses of this error model include:
207        #
208        # - Partial errors. If a service needs to return partial errors to the client,
209        #     it may embed the `Status` in the normal response to indicate the partial
210        #     errors.
211        #
212        # - Workflow errors. A typical workflow has multiple steps. Each step may
213        #     have a `Status` message for error reporting.
214        #
215        # - Batch operations. If a client uses batch request and batch response, the
216        #     `Status` message should be used directly inside batch response, one for
217        #     each error sub-response.
218        #
219        # - Asynchronous operations. If an API call embeds asynchronous operation
220        #     results in its response, the status of those operations should be
221        #     represented directly using the `Status` message.
222        #
223        # - Logging. If some API errors are stored in logs, the message `Status` could
224        #     be used directly after any stripping needed for security/privacy reasons.
225      "message": "A String", # A developer-facing error message, which should be in English. Any
226          # user-facing error message should be localized and sent in the
227          # google.rpc.Status.details field, or localized by the client.
228      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
229      "details": [ # A list of messages that carry the error details.  There is a common set of
230          # message types for APIs to use.
231        {
232          "a_key": "", # Properties of the object. Contains field @type with type URL.
233        },
234      ],
235    },
236    "done": True or False, # If the value is `false`, it means the operation is still in progress.
237        # If `true`, the operation is completed, and either `error` or `response` is
238        # available.
239    "response": { # The normal response of the operation in case of success.  If the original
240        # method returns no data on success, such as `Delete`, the response is
241        # `google.protobuf.Empty`.  If the original method is standard
242        # `Get`/`Create`/`Update`, the response should be the resource.  For other
243        # methods, the response should have the type `XxxResponse`, where `Xxx`
244        # is the original method name.  For example, if the original method name
245        # is `TakeSnapshot()`, the inferred response type is
246        # `TakeSnapshotResponse`.
247      "a_key": "", # Properties of the object. Contains field @type with type URL.
248    },
249    "name": "A String", # The server-assigned name, which is only unique within the same service that
250        # originally returns it. If you use the default HTTP mapping, the
251        # `name` should have the format of `operations/some/unique/name`.
252  }</pre>
253</div>
254
255<div class="method">
256    <code class="details" id="import_">import_(projectId, body, x__xgafv=None)</code>
257  <pre>Imports entities into Google Cloud Datastore. Existing entities with the
258same key are overwritten. The import occurs in the background and its
259progress can be monitored and managed via the Operation resource that is
260created. If an ImportEntities operation is cancelled, it is possible
261that a subset of the data has already been imported to Cloud Datastore.
262
263Args:
264  projectId: string, Project ID against which to make the request. (required)
265  body: object, The request body. (required)
266    The object takes the form of:
267
268{ # The request for
269      # google.datastore.admin.v1beta1.DatastoreAdmin.ImportEntities.
270    "labels": { # Client-assigned labels.
271      "a_key": "A String",
272    },
273    "entityFilter": { # Identifies a subset of entities in a project. This is specified as # Optionally specify which kinds/namespaces are to be imported. If provided,
274        # the list must be a subset of the EntityFilter used in creating the export,
275        # otherwise a FAILED_PRECONDITION error will be returned. If no filter is
276        # specified then all entities from the export are imported.
277        # combinations of kinds and namespaces (either or both of which may be all, as
278        # described in the following examples).
279        # Example usage:
280        #
281        # Entire project:
282        #   kinds=[], namespace_ids=[]
283        #
284        # Kinds Foo and Bar in all namespaces:
285        #   kinds=['Foo', 'Bar'], namespace_ids=[]
286        #
287        # Kinds Foo and Bar only in the default namespace:
288        #   kinds=['Foo', 'Bar'], namespace_ids=['']
289        #
290        # Kinds Foo and Bar in both the default and Baz namespaces:
291        #   kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
292        #
293        # The entire Baz namespace:
294        #   kinds=[], namespace_ids=['Baz']
295      "kinds": [ # If empty, then this represents all kinds.
296        "A String",
297      ],
298      "namespaceIds": [ # An empty list represents all namespaces. This is the preferred
299          # usage for projects that don't use namespaces.
300          #
301          # An empty string element represents the default namespace. This should be
302          # used if the project has data in non-default namespaces, but doesn't want to
303          # include them.
304          # Each namespace in this list must be unique.
305        "A String",
306      ],
307    },
308    "inputUrl": "A String", # The full resource URL of the external storage location. Currently, only
309        # Google Cloud Storage is supported. So input_url should be of the form:
310        # `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
311        # `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
312        # an optional Cloud Storage namespace path (this is not a Cloud Datastore
313        # namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
314        # by the ExportEntities operation. For more information about Cloud Storage
315        # namespace paths, see
316        # [Object name
317        # considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
318        #
319        # For more information, see
320        # google.datastore.admin.v1beta1.ExportEntitiesResponse.output_url.
321  }
322
323  x__xgafv: string, V1 error format.
324    Allowed values
325      1 - v1 error format
326      2 - v2 error format
327
328Returns:
329  An object of the form:
330
331    { # This resource represents a long-running operation that is the result of a
332      # network API call.
333    "metadata": { # Service-specific metadata associated with the operation.  It typically
334        # contains progress information and common metadata such as create time.
335        # Some services might not provide such metadata.  Any method that returns a
336        # long-running operation should document the metadata type, if any.
337      "a_key": "", # Properties of the object. Contains field @type with type URL.
338    },
339    "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.
340        # different programming environments, including REST APIs and RPC APIs. It is
341        # used by [gRPC](https://github.com/grpc). The error model is designed to be:
342        #
343        # - Simple to use and understand for most users
344        # - Flexible enough to meet unexpected needs
345        #
346        # # Overview
347        #
348        # The `Status` message contains three pieces of data: error code, error
349        # message, and error details. The error code should be an enum value of
350        # google.rpc.Code, but it may accept additional error codes if needed.  The
351        # error message should be a developer-facing English message that helps
352        # developers *understand* and *resolve* the error. If a localized user-facing
353        # error message is needed, put the localized message in the error details or
354        # localize it in the client. The optional error details may contain arbitrary
355        # information about the error. There is a predefined set of error detail types
356        # in the package `google.rpc` that can be used for common error conditions.
357        #
358        # # Language mapping
359        #
360        # The `Status` message is the logical representation of the error model, but it
361        # is not necessarily the actual wire format. When the `Status` message is
362        # exposed in different client libraries and different wire protocols, it can be
363        # mapped differently. For example, it will likely be mapped to some exceptions
364        # in Java, but more likely mapped to some error codes in C.
365        #
366        # # Other uses
367        #
368        # The error model and the `Status` message can be used in a variety of
369        # environments, either with or without APIs, to provide a
370        # consistent developer experience across different environments.
371        #
372        # Example uses of this error model include:
373        #
374        # - Partial errors. If a service needs to return partial errors to the client,
375        #     it may embed the `Status` in the normal response to indicate the partial
376        #     errors.
377        #
378        # - Workflow errors. A typical workflow has multiple steps. Each step may
379        #     have a `Status` message for error reporting.
380        #
381        # - Batch operations. If a client uses batch request and batch response, the
382        #     `Status` message should be used directly inside batch response, one for
383        #     each error sub-response.
384        #
385        # - Asynchronous operations. If an API call embeds asynchronous operation
386        #     results in its response, the status of those operations should be
387        #     represented directly using the `Status` message.
388        #
389        # - Logging. If some API errors are stored in logs, the message `Status` could
390        #     be used directly after any stripping needed for security/privacy reasons.
391      "message": "A String", # A developer-facing error message, which should be in English. Any
392          # user-facing error message should be localized and sent in the
393          # google.rpc.Status.details field, or localized by the client.
394      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
395      "details": [ # A list of messages that carry the error details.  There is a common set of
396          # message types for APIs to use.
397        {
398          "a_key": "", # Properties of the object. Contains field @type with type URL.
399        },
400      ],
401    },
402    "done": True or False, # If the value is `false`, it means the operation is still in progress.
403        # If `true`, the operation is completed, and either `error` or `response` is
404        # available.
405    "response": { # The normal response of the operation in case of success.  If the original
406        # method returns no data on success, such as `Delete`, the response is
407        # `google.protobuf.Empty`.  If the original method is standard
408        # `Get`/`Create`/`Update`, the response should be the resource.  For other
409        # methods, the response should have the type `XxxResponse`, where `Xxx`
410        # is the original method name.  For example, if the original method name
411        # is `TakeSnapshot()`, the inferred response type is
412        # `TakeSnapshotResponse`.
413      "a_key": "", # Properties of the object. Contains field @type with type URL.
414    },
415    "name": "A String", # The server-assigned name, which is only unique within the same service that
416        # originally returns it. If you use the default HTTP mapping, the
417        # `name` should have the format of `operations/some/unique/name`.
418  }</pre>
419</div>
420
421</body></html>