

Amazon Cloud Directory is no longer be open to new customers. For alternatives to Cloud Directory, explore [Amazon DynamoDB](https://aws.amazon.com/dynamodb/) and [Amazon Neptune](https://aws.amazon.com/neptune/). If you need help choosing the right alternative for your use case, or for any other questions, contact [AWS Support](https://aws.amazon.com/support/). 

# Manage Your Schema


This section describes how to maintain common schema tasks for your Cloud Directory environment.

**Topics**
+ [

# Create Your Schema
](how_to_manage_schema_create.md)
+ [

# Delete a Schema
](how_to_manage_schema_delete.md)
+ [

# Download a Schema
](how_to_manage_schema_download.md)
+ [

# Publish a Schema
](how_to_manage_schema_publish.md)
+ [

# Update Your Schema
](how_to_manage_schema_update.md)
+ [

# Upgrade Your Schema
](how_to_manage_schema_upgrade.md)

# Create Your Schema
Create Your Schema

Amazon Cloud Directory supports uploading of a compliant JSON file for schema creation. To create a new schema, you can either create your own JSON file from scratch or download one of the existing schemas listed in the console. Then upload it as a custom schema. For more information, see [Custom Schemas](schemas_customschematopic.md).

You can also create, delete, download, list, publish, update and upgrade schemas using the Cloud Directory APIs. For more information about schema API operations, see the [Amazon Cloud Directory API Reference Guide](http://docs.aws.amazon.com/amazoncds/latest/APIReference/welcome.html).

Choose either of the procedures below, depending on your preferred method.

**To create a custom schema**

1. In the [AWS Directory Service console](https://console.aws.amazon.com/directoryservicev2/) navigation pane, under **Cloud Directory**, choose **Schemas**.

1. Create a JSON file with all of your new schema definitions. For more information about how to format a JSON file, see [JSON Schema Format](schemas_jsonformat.md#schemas_json). 

1. In the console, choose **Upload new schema**.

1. In the **Upload new schema** dialog, type a name for the schema.

1. Select **Choose file**, select the new JSON file that you just created, and then choose **Open**. 

1. Choose **Upload**. This adds a new schema to your schema library and places it in the **Development** state. For more information about schema states, see [Schema Lifecycle](schemas_lifecycle.md).

**To create a custom schema based on an existing one in the console**

1. In the [AWS Directory Service console](https://console.aws.amazon.com/directoryservicev2/) navigation pane, under **Cloud Directory**, choose **Schemas**.

1. In the table listing the schemas, select the option near the schema you want to copy.

1. Choose **Actions**.

1. Choose **Download schema**.

1. Rename the JSON file, edit it as needed, and then save the file. For more information about how to format a JSON file, see [JSON Schema Format](schemas_jsonformat.md#schemas_json).

1. In the console, choose **Upload new schema**, select the JSON file that you just edited, and then choose **Open**.

   This adds a new schema to your schema library and places it in the **Development** state. For more information about schema states, see [Schema Lifecycle](schemas_lifecycle.md).

# Delete a Schema


Use the following procedure to delete a schema in Cloud Directory.

**To delete a schema**

1. In the [AWS Directory Service console](https://console.aws.amazon.com/directoryservicev2/) navigation pane, under **Cloud Directory**, select **Schemas**.

1. Select the option in the table next to the schema name you want to delete.

1. Choose **Actions**.

1. Choose **Delete**

1. In the **Delete schema** dialog, confirm the operation by choosing **Delete**.

# Download a Schema


Use the following procedure to download a schema.

**To download a schema**

1. In the [AWS Directory Service console](https://console.aws.amazon.com/directoryservicev2/) navigation pane, under **Cloud Directory**, select **Schemas**.

1. Select the option in the table next to the schema name you want to download.

1. Choose **Actions**.

1. Choose **Download schema**

# Publish a Schema
Publish a Schema

Use the following procedure to publish a schema in Cloud Directory.

**To publish a schema**

1. In the [AWS Directory Service console](https://console.aws.amazon.com/directoryservicev2/) navigation pane, under **Cloud Directory**, select **Schemas**.

1. Select the option in the table next to the schema name you want to publish.

1. Choose **Actions**.

1. Choose **Publish**

1. In the **Publish schema** dialog, provide the following information:

   1. **Schema name**

   1. **Major version**

   1. **Minor version**

1. Choose **Publish**.

# Update Your Schema


Use the following procedure to update a schema in Cloud Directory.

**To update a schema**

1. In the [AWS Directory Service console](https://console.aws.amazon.com/directoryservicev2/) navigation pane, under **Cloud Directory**, select **Schemas**.

1. Select the option in the table next to the schema name you want to update.

1. Choose **Actions**.

1. Choose **Update**

1. In the **Update schema** dialog, optionally modify the **Schema name**, or select **Choose file** to apply or remove facets and attributes.

1. Choose **Update**.

# Upgrade Your Schema


Upgrading a schema adds the facets and attributes you choose to the published schema or applied schema you select. 
+ To upgrade a published schema call the [https://docs.aws.amazon.com//clouddirectory/latest/APIReference/API_UpgradePublishedSchema.html](https://docs.aws.amazon.com//clouddirectory/latest/APIReference/API_UpgradePublishedSchema.html) CLI action.
+ To upgrade an applied schema, call the [https://docs.aws.amazon.com//clouddirectory/latest/APIReference/API_UpgradeAppliedSchema.html](https://docs.aws.amazon.com//clouddirectory/latest/APIReference/API_UpgradeAppliedSchema.html) CLI action.