Schema
A Schema is a data structure used in all domains. For example, data forms of Google OAuth2 credentials or AWS access keys can be a Schema resource.
Package : spaceone.api.repository.v1
Schema
Schema Methods:
create
Creates a new Schema. You must specify the parameters: service_type, name, and schema(data structure). With the parameter domain_id, you can choose whether you will create a Schema in Local or externally. The Schema created includes repository_info, information about where the resource is managed.
POST /repository/v1/schema/create
{{< tabs " create " >}}
{{< tab "Request Example" >}}
name (string)
Requiredservice_type (string)
Requiredschema_id (string)
Requiredschema (Struct)
Requireddomain_id (string)
Requiredlabels (ListValue)
tags (Struct)
project_id (string)
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "domain_id": "domain-987654321098" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
name (string)
Requiredservice_type (string)
Requiredschema_id (string)
Requiredschema (Struct)
Requiredlabels (ListValue)
Requiredtags (Struct)
Requiredrepository_info (RepositoryInfo)
Requiredproject_id (string)
Requireddomain_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T05:46:49.929Z", "updated_at": "2022-01-01T05:46:49.929Z" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
update
Updates a specific Schema. You can make changes in Schema settings, including name, schema, labels, and tags.
POST /repository/v1/schema/update
{{< tabs " update " >}}
{{< tab "Request Example" >}}
name (string)
Requireddomain_id (string)
Requiredschema (Struct)
labels (ListValue)
tags (Struct)
{{< highlight json >}} { "name": "slack_webhook_test", "schema": {}, "labels": [], "tags": {}, "domain_id": "domain-987654321098" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
name (string)
Requiredservice_type (string)
Requiredschema_id (string)
Requiredschema (Struct)
Requiredlabels (ListValue)
Requiredtags (Struct)
Requiredrepository_info (RepositoryInfo)
Requiredproject_id (string)
Requireddomain_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T05:46:49.929Z", "updated_at": "2022-01-01T05:46:49.929Z" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
delete
Deletes a specific Schema. You must specify the name of the Schema to delete, as the name is an identifier of Schema resources.
POST /repository/v1/schema/delete
{{< tabs " delete " >}}
{{< tab "Request Example" >}}
name (string)
Requireddomain_id (string)
Requiredschema_id (string)
{{< highlight json >}} { "name": "slack_webhook" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
get
Gets a specific Schema. You must specify the name of the Schema to get, as the name is an identifier of Schema resources. You can use the parameter repository_id to limit the scope of the method to a specific Repository.
POST /repository/v1/schema/get
{{< tabs " get " >}}
{{< tab "Request Example" >}}
name (string)
Requireddomain_id (string)
Requiredrepository_id (string)
only (string)
Repeatedschema_id (string)
{{< highlight json >}} { "name": "slack_webhook", "repository_id": "repo-123456789012" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
name (string)
Requiredservice_type (string)
Requiredschema_id (string)
Requiredschema (Struct)
Requiredlabels (ListValue)
Requiredtags (Struct)
Requiredrepository_info (RepositoryInfo)
Requiredproject_id (string)
Requireddomain_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
{{< highlight json >}} { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T05:46:49.929Z", "updated_at": "2022-01-01T05:46:49.929Z" } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
list
Gets a list of all Schemas in a specific Repository. The parameter repository_id is used as an identifier of a Repository to get its list of Schemas. You can use a query to get a filtered list of Schemas.
POST /repository/v1/schema/list
{{< tabs " list " >}}
{{< tab "Request Example" >}}
project_id (string)
Requiredrepository_id (string)
Requireddomain_id (string)
Requiredquery (Query)
name (string)
service_type (string)
schema_id (string)
state (State)
{{< highlight json >}} { "query": {}, "name": "slack_webhook", "service_type": "secret.credentials", "repository_id": "repo-123456789012" } {{< /highlight >}} {{< /tab >}}
{{< tab "Response Example" >}}
results (SchemaInfo)
RepeatedRequiredtotal_count (int32)
Required
{{< highlight json >}} { "results": [ { "name": "slack_webhook", "service_type": "secret.credentials", "schema": {}, "labels": [], "tags": { "description": "Slack Webhook" }, "repository_info": { "repository_id": "repo-123456789012", "name": "Local", "repository_type": "local" }, "domain_id": "domain-987654321098", "created_at": "2022-01-01T10:20:09.064Z", "updated_at": "2022-01-01T10:20:09.064Z" } ], "total_count": 1 } {{< /highlight >}} {{< /tab >}}
{{< /tabs >}}
stat
POST /repository/v1/schema/stat
Message
CreateSchemaRequest
name (string)
Requiredservice_type (string)
Requiredschema_id (string)
Requiredschema (Struct)
Requireddomain_id (string)
Requiredlabels (ListValue)
tags (Struct)
project_id (string)
GetRepositorySchemaRequest
name (string)
Requireddomain_id (string)
Requiredrepository_id (string)
only (string)
Repeatedschema_id (string)
SchemaInfo
name (string)
Requiredservice_type (string)
Requiredschema_id (string)
Requiredschema (Struct)
Requiredlabels (ListValue)
Requiredtags (Struct)
Requiredrepository_info (RepositoryInfo)
Requiredproject_id (string)
Requireddomain_id (string)
Requiredcreated_at (string)
Requiredupdated_at (string)
Required
SchemaQuery
project_id (string)
Requiredrepository_id (string)
Requireddomain_id (string)
Requiredquery (Query)
name (string)
service_type (string)
schema_id (string)
state (State)
SchemaRequest
name (string)
Requireddomain_id (string)
Requiredschema_id (string)
SchemaStatQuery
query (StatisticsQuery)
Requiredrepository_id (string)
Requireddomain_id (string)
Required
SchemasInfo
results (SchemaInfo)
RepeatedRequiredtotal_count (int32)
Required
UpdateSchemaRequest
name (string)
Requireddomain_id (string)
Requiredschema (Struct)
labels (ListValue)
tags (Struct)
Last updated