schemas
Creates, updates, deletes, gets or lists a schemas resource.
Overview
| Name | schemas |
| Type | Resource |
| Id | aws.clouddirectory.schemas |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create_schema | insert | region, Name | Creates a new schema in a development state. A schema can exist in three phases: Development: This is a mutable phase of the schema. All new schemas are in the development phase. Once the schema is finalized, it can be published. Published: Published schemas are immutable and have a version associated with them. Applied: Applied schemas are mutable in a way that allows you to add new schema facets. You can also add new, nonrequired attributes to existing schema facets. You can apply only published schemas to directories. | |
update_schema | update | x-amz-data-partition, region, Name | Updates the schema name with a new name. Only development schema names can be updated. | |
delete_schema | delete | x-amz-data-partition, region | Deletes a given schema. Schemas in a development and published state can only be deleted. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
x-amz-data-partition | string | The Amazon Resource Name (ARN) of the development schema. For more information, see arns. |
INSERT examples
- create_schema
- Manifest
Creates a new schema in a development state. A schema can exist in three phases: Development: This is a mutable phase of the schema. All new schemas are in the development phase. Once the schema is finalized, it can be published. Published: Published schemas are immutable and have a version associated with them. Applied: Applied schemas are mutable in a way that allows you to add new schema facets. You can also add new, nonrequired attributes to existing schema facets. You can apply only published schemas to directories.
INSERT INTO aws.clouddirectory.schemas (
Name,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ region }}'
RETURNING
schema_arn
;
# Description fields are for documentation purposes
- name: schemas
props:
- name: region
value: "{{ region }}"
description: Required parameter for the schemas resource.
- name: Name
value: "{{ Name }}"
UPDATE examples
- update_schema
Updates the schema name with a new name. Only development schema names can be updated.
UPDATE aws.clouddirectory.schemas
SET
Name = '{{ Name }}'
WHERE
`x-amz-data-partition` = '{{ x-amz-data-partition }}' --required
AND region = '{{ region }}' --required
AND Name = '{{ Name }}' --required
RETURNING
schema_arn;
DELETE examples
- delete_schema
Deletes a given schema. Schemas in a development and published state can only be deleted.
DELETE FROM aws.clouddirectory.schemas
WHERE `x-amz-data-partition` = '{{ x-amz-data-partition }}' --required
AND region = '{{ region }}' --required
;