Skip to main content

datastores

Creates, updates, deletes, gets or lists a datastores resource.

Overview

Namedatastores
TypeResource
Idgoogle.apigee.datastores

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
createTimestring (int64)Output only. Datastore create time, in milliseconds since the epoch of 1970-01-01T00:00:00Z
datastoreConfigobjectDatastore Configurations. (id: GoogleCloudApigeeV1DatastoreConfig)
displayNamestringRequired. Display name in UI
lastUpdateTimestring (int64)Output only. Datastore last update time, in milliseconds since the epoch of 1970-01-01T00:00:00Z
orgstringOutput only. Organization that the datastore belongs to
selfstringOutput only. Resource link of Datastore. Example: /organizations/{org}/analytics/datastores/{uuid}
targetTypestringDestination storage type. Supported types gcs or bigquery.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_analytics_datastores_getselectorganizationsId, datastoresIdGet a Datastore
organizations_analytics_datastores_listselectorganizationsIdtargetTypeList Datastores
organizations_analytics_datastores_createinsertorganizationsIdCreate a Datastore for an org
organizations_analytics_datastores_updatereplaceorganizationsId, datastoresIdUpdate a Datastore
organizations_analytics_datastores_deletedeleteorganizationsId, datastoresIdDelete a Datastore from an org.
organizations_analytics_datastores_testexecorganizationsIdTest if Datastore configuration is correct. This includes checking if credentials provided by customer have required permissions in target destination storage

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
datastoresIdstring
organizationsIdstring
targetTypestring

SELECT examples

Get a Datastore

SELECT
createTime,
datastoreConfig,
displayName,
lastUpdateTime,
org,
self,
targetType
FROM google.apigee.datastores
WHERE organizationsId = '{{ organizationsId }}' -- required
AND datastoresId = '{{ datastoresId }}' -- required;

INSERT examples

Create a Datastore for an org

INSERT INTO google.apigee.datastores (
data__displayName,
data__targetType,
data__datastoreConfig,
organizationsId
)
SELECT
'{{ displayName }}',
'{{ targetType }}',
'{{ datastoreConfig }}',
'{{ organizationsId }}'
RETURNING
createTime,
datastoreConfig,
displayName,
lastUpdateTime,
org,
self,
targetType
;

REPLACE examples

Update a Datastore

REPLACE google.apigee.datastores
SET
data__displayName = '{{ displayName }}',
data__targetType = '{{ targetType }}',
data__datastoreConfig = '{{ datastoreConfig }}'
WHERE
organizationsId = '{{ organizationsId }}' --required
AND datastoresId = '{{ datastoresId }}' --required
RETURNING
createTime,
datastoreConfig,
displayName,
lastUpdateTime,
org,
self,
targetType;

DELETE examples

Delete a Datastore from an org.

DELETE FROM google.apigee.datastores
WHERE organizationsId = '{{ organizationsId }}' --required
AND datastoresId = '{{ datastoresId }}' --required;

Lifecycle Methods

Test if Datastore configuration is correct. This includes checking if credentials provided by customer have required permissions in target destination storage

EXEC google.apigee.datastores.organizations_analytics_datastores_test 
@organizationsId='{{ organizationsId }}' --required
@@json=
'{
"displayName": "{{ displayName }}",
"targetType": "{{ targetType }}",
"datastoreConfig": "{{ datastoreConfig }}"
}';