Create resources

You can create resources by adding a YAML file to the working directory. Be sure to follow the naming conventions shown in the following table and the directory structure shown in the example.

Resource type

File extension

Path

Option list

.optionList.yaml

optionLists

Entity definition

.definition.yaml

definitions

Entity

.entity.yaml

entities/<definition_name>

Policy

.policy.yaml

policies

The working folder structure is as follows:

RequestResponse
[working folder]
├── optionLists
  ├── DemoOptionListOne.optionList.yaml
  └── DemoOptionListTwo.optionList.yaml
├── definitions
  ├── DemoEntityDefinitionOne.definition.yaml
  └── DemoEntityDefinitionTwo.definition.yaml
├── entities
  └── DemoEntityDefinitionOne
    └── EntityOne.entity.yaml
├── policies
  └── DemoPolicy.policy.yaml

To edit YAML files in Visual Studio Code:

  1. Initialize your working directory. This creates the JSON schemas for the supported resource types.

  2. Install the YAML extension for Visual Studio Code. The JSON schemas automatically apply to the resource YAML files based on their file extension. As you type, the schemas provide validation and auto-completion for many commonly used properties.

Do you have some feedback for us?

If you have suggestions for improving this article,