

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::EventSchemas::Schema
<a name="aws-resource-eventschemas-schema"></a>

Use the `AWS::EventSchemas::Schema` resource to specify an event schema.

## Syntax
<a name="aws-resource-eventschemas-schema-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-eventschemas-schema-syntax.json"></a>

```
{
  "Type" : "AWS::EventSchemas::Schema",
  "Properties" : {
      "[Content](#cfn-eventschemas-schema-content)" : String,
      "[Description](#cfn-eventschemas-schema-description)" : String,
      "[RegistryName](#cfn-eventschemas-schema-registryname)" : String,
      "[SchemaName](#cfn-eventschemas-schema-schemaname)" : String,
      "[Tags](#cfn-eventschemas-schema-tags)" : [ TagsEntry, ... ],
      "[Type](#cfn-eventschemas-schema-type)" : String
    }
}
```

### YAML
<a name="aws-resource-eventschemas-schema-syntax.yaml"></a>

```
Type: AWS::EventSchemas::Schema
Properties:
  [Content](#cfn-eventschemas-schema-content): String
  [Description](#cfn-eventschemas-schema-description): String
  [RegistryName](#cfn-eventschemas-schema-registryname): String
  [SchemaName](#cfn-eventschemas-schema-schemaname): String
  [Tags](#cfn-eventschemas-schema-tags): 
    - TagsEntry
  [Type](#cfn-eventschemas-schema-type): String
```

## Properties
<a name="aws-resource-eventschemas-schema-properties"></a>

`Content`  <a name="cfn-eventschemas-schema-content"></a>
The source of the schema definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-eventschemas-schema-description"></a>
A description of the schema.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RegistryName`  <a name="cfn-eventschemas-schema-registryname"></a>
The name of the schema registry.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SchemaName`  <a name="cfn-eventschemas-schema-schemaname"></a>
The name of the schema.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-eventschemas-schema-tags"></a>
Tags associated with the schema.  
*Required*: No  
*Type*: Array of [TagsEntry](aws-properties-eventschemas-schema-tagsentry.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-eventschemas-schema-type"></a>
The type of schema.  
Valid types include `OpenApi3` and `JSONSchemaDraft4`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-eventschemas-schema-return-values"></a>

### Ref
<a name="aws-resource-eventschemas-schema-return-values-ref"></a>

When you provide the logical ID of this resource to the `Ref` intrinsic function, `Ref` returns the ARN of the schema. For example:

 `{ "Ref": "MySchema" }` 

Returns a value similar to the following:

 `arn:aws:schemas:us-east-1:012345678901:schema/MyRegistry/MySchema` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-eventschemas-schema-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-eventschemas-schema-return-values-fn--getatt-fn--getatt"></a>

`LastModified`  <a name="LastModified-fn::getatt"></a>
The date and time that schema was modified.

`SchemaArn`  <a name="SchemaArn-fn::getatt"></a>
The ARN of the schema.

`SchemaName`  <a name="SchemaName-fn::getatt"></a>
The name of the schema.

`SchemaVersion`  <a name="SchemaVersion-fn::getatt"></a>
The version number of the schema.

`VersionCreatedDate`  <a name="VersionCreatedDate-fn::getatt"></a>
The date the schema version was created.

## Examples
<a name="aws-resource-eventschemas-schema--examples"></a>

### 
<a name="aws-resource-eventschemas-schema--examples--"></a>

#### YAML
<a name="aws-resource-eventschemas-schema--examples----yaml"></a>

```
Resources:
  ExecutionStatusChangeSchema:
    Type: AWS::EventSchemas::Schema
    Properties:
      RegistryName: 'aws.events'
      SchemaName: ExecutionStatusChange
      Description: 'event emitted when the status of a state machine execution change'
      Type: OpenApi3
      Content: >
        {
          "openapi": "3.0.0",
          "info": {
            "version": "1.0.0",
            "title": "StepFunctionsExecutionStatusChange"
          },
          "paths":{},
          "components": {
            "schemas": {
              "StepFunctionsExecutionStatusChange": {
                "type": "object",
                "required": [ "output", "input", "executionArn", "name", "stateMachineArn", "startDate", "stopDate", "status" ],
                "properties": {
                  "output": {"type": "string","nullable": true},
                  "input": {"type": "string"},
                  "executionArn": {"type": "string"},
                  "name": {"type": "string"},
                  "stateMachineArn": {"type": "string"},
                  "startDate": {"type": "integer","format": "int64"},
                  "stopDate": {"type": "integer","format": "int64","nullable": true},
                  "status": {"type": "string","enum": [ "FAILED", "RUNNING", "SUCCEEDED", "ABORTED" ]}
                }
              }
            }
          }
        }
```

# AWS::EventSchemas::Schema TagsEntry
<a name="aws-properties-eventschemas-schema-tagsentry"></a>

Tags to associate with the schema.

## Syntax
<a name="aws-properties-eventschemas-schema-tagsentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-eventschemas-schema-tagsentry-syntax.json"></a>

```
{
  "[Key](#cfn-eventschemas-schema-tagsentry-key)" : String,
  "[Value](#cfn-eventschemas-schema-tagsentry-value)" : String
}
```

### YAML
<a name="aws-properties-eventschemas-schema-tagsentry-syntax.yaml"></a>

```
  [Key](#cfn-eventschemas-schema-tagsentry-key): String
  [Value](#cfn-eventschemas-schema-tagsentry-value): String
```

## Properties
<a name="aws-properties-eventschemas-schema-tagsentry-properties"></a>

`Key`  <a name="cfn-eventschemas-schema-tagsentry-key"></a>
The key of a key-value pair.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-eventschemas-schema-tagsentry-value"></a>
The value of a key-value pair.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)