2020/09/29 - Schemas - 1 new5 updated api methods
Changes Update schemas client to latest version
See also: AWS API Documentation
Request Syntax
client.export_schema( RegistryName='string', SchemaName='string', SchemaVersion='string', Type='string' )
string
[REQUIRED]
The name of the registry.
string
[REQUIRED]
The name of the schema.
string
Specifying this limits the results to only this schema version.
string
[REQUIRED]
dict
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) --
{'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' )
string
[REQUIRED]
The source of the schema definition.
string
A description of the schema.
string
[REQUIRED]
The name of the registry.
string
[REQUIRED]
The name of the schema.
dict
Tags associated with the schema.
(string) --
(string) --
string
[REQUIRED]
The type of schema.
dict
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.
{'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' )
list
[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) --
string
[REQUIRED]
The type of event.
dict
Response Syntax
{ 'Content': 'string' }
Response Structure
(dict) --
200 response
Content (string) --
The source of the schema definition.
{'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' )
integer
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.
string
[REQUIRED]
The name of the registry.
string
[REQUIRED]
The name of the schema.
dict
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.
{'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' )
string
[REQUIRED]
Specifying this limits the results to only schemas that include the provided keywords.
integer
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.
string
[REQUIRED]
The name of the registry.
dict
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.
{'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' )
string
The ID of the client token.
This field is autopopulated if not provided.
string
The source of the schema definition.
string
The description of the schema.
string
[REQUIRED]
The name of the registry.
string
[REQUIRED]
The name of the schema.
string
The schema type for the events schema.
dict
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.