Schemas

2020/09/29 - Schemas - 1 new5 updated api methods

Changes  Update schemas client to latest version

ExportSchema (new) Link ¶

See also: AWS API Documentation

Request Syntax

client.export_schema(
    RegistryName='string',
    SchemaName='string',
    SchemaVersion='string',
    Type='string'
)
type RegistryName:

string

param RegistryName:

[REQUIRED]

The name of the registry.

type SchemaName:

string

param SchemaName:

[REQUIRED]

The name of the schema.

type SchemaVersion:

string

param SchemaVersion:

Specifying this limits the results to only this schema version.

type Type:

string

param Type:

[REQUIRED]

rtype:

dict

returns:

Response Syntax

{
    'Content': 'string',
    'SchemaArn': 'string',
    'SchemaName': 'string',
    'SchemaVersion': 'string',
    'Type': 'string'
}

Response Structure

  • (dict) --

    200 response

    • Content (string) --

    • SchemaArn (string) --

    • SchemaName (string) --

    • SchemaVersion (string) --

    • Type (string) --

CreateSchema (updated) Link ¶
Changes (request)
{'Type': {'JSONSchemaDraft4'}}

Creates a schema definition.

See also: AWS API Documentation

Request Syntax

client.create_schema(
    Content='string',
    Description='string',
    RegistryName='string',
    SchemaName='string',
    Tags={
        'string': 'string'
    },
    Type='OpenApi3'|'JSONSchemaDraft4'
)
type Content:

string

param Content:

[REQUIRED]

The source of the schema definition.

type Description:

string

param Description:

A description of the schema.

type RegistryName:

string

param RegistryName:

[REQUIRED]

The name of the registry.

type SchemaName:

string

param SchemaName:

[REQUIRED]

The name of the schema.

type Tags:

dict

param Tags:

Tags associated with the schema.

  • (string) --

    • (string) --

type Type:

string

param Type:

[REQUIRED]

The type of schema.

rtype:

dict

returns:

Response Syntax

{
    'Description': 'string',
    'LastModified': datetime(2015, 1, 1),
    'SchemaArn': 'string',
    'SchemaName': 'string',
    'SchemaVersion': 'string',
    'Tags': {
        'string': 'string'
    },
    'Type': 'string',
    'VersionCreatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    201 response

    • Description (string) --

      The description of the schema.

    • LastModified (datetime) --

      The date and time that schema was modified.

    • SchemaArn (string) --

      The ARN of the schema.

    • SchemaName (string) --

      The name of the schema.

    • SchemaVersion (string) --

      The version number of the schema

    • Tags (dict) --

      Key-value pairs associated with a resource.

      • (string) --

        • (string) --

    • Type (string) --

      The type of the schema.

    • VersionCreatedDate (datetime) --

      The date the schema version was created.

GetDiscoveredSchema (updated) Link ¶
Changes (request)
{'Type': {'JSONSchemaDraft4'}}

Get the discovered schema that was generated based on sampled events.

See also: AWS API Documentation

Request Syntax

client.get_discovered_schema(
    Events=[
        'string',
    ],
    Type='OpenApi3'|'JSONSchemaDraft4'
)
type Events:

list

param Events:

[REQUIRED]

An array of strings where each string is a JSON event. These are the events that were used to generate the schema. The array includes a single type of event and has a maximum size of 10 events.

  • (string) --

type Type:

string

param Type:

[REQUIRED]

The type of event.

rtype:

dict

returns:

Response Syntax

{
    'Content': 'string'
}

Response Structure

  • (dict) --

    200 response

    • Content (string) --

      The source of the schema definition.

ListSchemaVersions (updated) Link ¶
Changes (response)
{'SchemaVersions': {'Type': 'OpenApi3 | JSONSchemaDraft4'}}

Provides a list of the schema versions and related information.

See also: AWS API Documentation

Request Syntax

client.list_schema_versions(
    Limit=123,
    NextToken='string',
    RegistryName='string',
    SchemaName='string'
)
type Limit:

integer

param Limit:

type NextToken:

string

param NextToken:

The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.

type RegistryName:

string

param RegistryName:

[REQUIRED]

The name of the registry.

type SchemaName:

string

param SchemaName:

[REQUIRED]

The name of the schema.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'SchemaVersions': [
        {
            'SchemaArn': 'string',
            'SchemaName': 'string',
            'SchemaVersion': 'string',
            'Type': 'OpenApi3'|'JSONSchemaDraft4'
        },
    ]
}

Response Structure

  • (dict) --

    200 response

    • NextToken (string) --

      The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.

    • SchemaVersions (list) --

      An array of schema version summaries.

      • (dict) --

        • SchemaArn (string) --

          The ARN of the schema version.

        • SchemaName (string) --

          The name of the schema.

        • SchemaVersion (string) --

          The version number of the schema.

        • Type (string) --

          The type of schema.

SearchSchemas (updated) Link ¶
Changes (response)
{'Schemas': {'SchemaVersions': {'Type': 'OpenApi3 | JSONSchemaDraft4'}}}

Search the schemas

See also: AWS API Documentation

Request Syntax

client.search_schemas(
    Keywords='string',
    Limit=123,
    NextToken='string',
    RegistryName='string'
)
type Keywords:

string

param Keywords:

[REQUIRED]

Specifying this limits the results to only schemas that include the provided keywords.

type Limit:

integer

param Limit:

type NextToken:

string

param NextToken:

The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.

type RegistryName:

string

param RegistryName:

[REQUIRED]

The name of the registry.

rtype:

dict

returns:

Response Syntax

{
    'NextToken': 'string',
    'Schemas': [
        {
            'RegistryName': 'string',
            'SchemaArn': 'string',
            'SchemaName': 'string',
            'SchemaVersions': [
                {
                    'CreatedDate': datetime(2015, 1, 1),
                    'SchemaVersion': 'string',
                    'Type': 'OpenApi3'|'JSONSchemaDraft4'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) --

    200 response

    • NextToken (string) --

      The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.

    • Schemas (list) --

      An array of SearchSchemaSummary information.

      • (dict) --

        • RegistryName (string) --

          The name of the registry.

        • SchemaArn (string) --

          The ARN of the schema.

        • SchemaName (string) --

          The name of the schema.

        • SchemaVersions (list) --

          An array of schema version summaries.

          • (dict) --

            • CreatedDate (datetime) --

              The date the schema version was created.

            • SchemaVersion (string) --

              The version number of the schema

            • Type (string) --

              The type of schema.

UpdateSchema (updated) Link ¶
Changes (request)
{'Type': {'JSONSchemaDraft4'}}

Updates the schema definition

See also: AWS API Documentation

Request Syntax

client.update_schema(
    ClientTokenId='string',
    Content='string',
    Description='string',
    RegistryName='string',
    SchemaName='string',
    Type='OpenApi3'|'JSONSchemaDraft4'
)
type ClientTokenId:

string

param ClientTokenId:

The ID of the client token.

This field is autopopulated if not provided.

type Content:

string

param Content:

The source of the schema definition.

type Description:

string

param Description:

The description of the schema.

type RegistryName:

string

param RegistryName:

[REQUIRED]

The name of the registry.

type SchemaName:

string

param SchemaName:

[REQUIRED]

The name of the schema.

type Type:

string

param Type:

The schema type for the events schema.

rtype:

dict

returns:

Response Syntax

{
    'Description': 'string',
    'LastModified': datetime(2015, 1, 1),
    'SchemaArn': 'string',
    'SchemaName': 'string',
    'SchemaVersion': 'string',
    'Tags': {
        'string': 'string'
    },
    'Type': 'string',
    'VersionCreatedDate': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    200 response

    • Description (string) --

      The description of the schema.

    • LastModified (datetime) --

      The date and time that schema was modified.

    • SchemaArn (string) --

      The ARN of the schema.

    • SchemaName (string) --

      The name of the schema.

    • SchemaVersion (string) --

      The version number of the schema

    • Tags (dict) --

      Key-value pairs associated with a resource.

      • (string) --

        • (string) --

    • Type (string) --

      The type of the schema.

    • VersionCreatedDate (datetime) --

      The date the schema version was created.