google_api_datastore v0.1.0 GoogleApi.Datastore.V1.Api.Projects View Source

API calls for all endpoints tagged Projects.

Link to this section Summary

Functions

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted

Commits a transaction, optionally creating, deleting or modifying some entities

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage

Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users//operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore

Link to this section Functions

Link to this function datastore_projects_allocate_ids(connection, project_id, opts \\ []) View Source
datastore_projects_allocate_ids(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.AllocateIdsResponse.t()}
  | {:error, Tesla.Env.t()}

Allocates IDs for the given keys, which is useful for referencing an entity before it is inserted.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (AllocateIdsRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.AllocateIdsResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_begin_transaction(connection, project_id, opts \\ []) View Source
datastore_projects_begin_transaction(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.BeginTransactionResponse.t()}
  | {:error, Tesla.Env.t()}

Begins a new transaction.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (BeginTransactionRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.BeginTransactionResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_commit(connection, project_id, opts \\ []) View Source
datastore_projects_commit(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.CommitResponse.t()}
  | {:error, Tesla.Env.t()}

Commits a transaction, optionally creating, deleting or modifying some entities.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (CommitRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.CommitResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_export(connection, project_id, opts \\ []) View Source
datastore_projects_export(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation.t()}
  | {:error, Tesla.Env.t()}

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): Project ID against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (GoogleDatastoreAdminV1ExportEntitiesRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure

Link to this function datastore_projects_import(connection, project_id, opts \\ []) View Source
datastore_projects_import(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation.t()}
  | {:error, Tesla.Env.t()}

Imports entities into Google Cloud Datastore. Existing entities with the same key are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): Project ID against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (GoogleDatastoreAdminV1ImportEntitiesRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure

Link to this function datastore_projects_lookup(connection, project_id, opts \\ []) View Source
datastore_projects_lookup(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.LookupResponse.t()}
  | {:error, Tesla.Env.t()}

Looks up entities by key.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (LookupRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.LookupResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_operations_cancel(connection, name, opts \\ []) View Source
datastore_projects_operations_cancel(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.Empty.t()} | {:error, Tesla.Env.t()}

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • name (String.t): The name of the operation resource to be cancelled.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns

{:ok, %GoogleApi.Datastore.V1.Model.Empty{}} on success {:error, info} on failure

Link to this function datastore_projects_operations_delete(connection, name, opts \\ []) View Source
datastore_projects_operations_delete(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.Empty.t()} | {:error, Tesla.Env.t()}

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • name (String.t): The name of the operation resource to be deleted.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns

{:ok, %GoogleApi.Datastore.V1.Model.Empty{}} on success {:error, info} on failure

Link to this function datastore_projects_operations_get(connection, name, opts \\ []) View Source
datastore_projects_operations_get(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation.t()}
  | {:error, Tesla.Env.t()}

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • name (String.t): The name of the operation resource.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns

{:ok, %GoogleApi.Datastore.V1.Model.GoogleLongrunningOperation{}} on success {:error, info} on failure

Link to this function datastore_projects_operations_list(connection, name, opts \\ []) View Source
datastore_projects_operations_list(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok,
   GoogleApi.Datastore.V1.Model.GoogleLongrunningListOperationsResponse.t()}
  | {:error, Tesla.Env.t()}

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users//operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • name (String.t): The name of the operation's parent resource.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :pageSize (integer()): The standard list page size.
    • :filter (String.t): The standard list filter.
    • :pageToken (String.t): The standard list page token.

Returns

{:ok, %GoogleApi.Datastore.V1.Model.GoogleLongrunningListOperationsResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_reserve_ids(connection, project_id, opts \\ []) View Source
datastore_projects_reserve_ids(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.ReserveIdsResponse.t()}
  | {:error, Tesla.Env.t()}

Prevents the supplied keys' IDs from being auto-allocated by Cloud Datastore.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (ReserveIdsRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.ReserveIdsResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_rollback(connection, project_id, opts \\ []) View Source
datastore_projects_rollback(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.RollbackResponse.t()}
  | {:error, Tesla.Env.t()}

Rolls back a transaction.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (RollbackRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.RollbackResponse{}} on success {:error, info} on failure

Link to this function datastore_projects_run_query(connection, project_id, opts \\ []) View Source
datastore_projects_run_query(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, GoogleApi.Datastore.V1.Model.RunQueryResponse.t()}
  | {:error, Tesla.Env.t()}

Queries for entities.

Parameters

  • connection (GoogleApi.Datastore.V1.Connection): Connection to server
  • project_id (String.t): The ID of the project against which to make the request.
  • opts (KeywordList): [optional] Optional parameters

    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :uploadType (String.t): Legacy upload protocol for media (e.g. "media", "multipart").
    • :$.xgafv (String.t): V1 error format.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :callback (String.t): JSONP
    • :alt (String.t): Data format for response.
    • :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • :access_token (String.t): OAuth access token.
    • :upload_protocol (String.t): Upload protocol for media (e.g. "raw", "multipart").
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • :body (RunQueryRequest):

Returns

{:ok, %GoogleApi.Datastore.V1.Model.RunQueryResponse{}} on success {:error, info} on failure