Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Creates a new schema set and registers the schema definition. Returns an error if the schema set already exists without actually registering the version.
When the schema set is created, a version checkpoint will be set to the
first version. Compatibility mode "DISABLED" restricts any additional
schema versions from being added after the first schema version. For all
other compatibility modes, validation of compatibility settings will be
applied only from the second version onwards when the
RegisterSchemaVersion
API is used.
When this API is called without a RegistryId
, this will create an
entry for a "default-registry" in the registry database tables, if it
is not already present.
Synopsis
- data CreateSchema = CreateSchema' {}
- newCreateSchema :: Text -> DataFormat -> CreateSchema
- createSchema_schemaDefinition :: Lens' CreateSchema (Maybe Text)
- createSchema_registryId :: Lens' CreateSchema (Maybe RegistryId)
- createSchema_description :: Lens' CreateSchema (Maybe Text)
- createSchema_compatibility :: Lens' CreateSchema (Maybe Compatibility)
- createSchema_tags :: Lens' CreateSchema (Maybe (HashMap Text Text))
- createSchema_schemaName :: Lens' CreateSchema Text
- createSchema_dataFormat :: Lens' CreateSchema DataFormat
- data CreateSchemaResponse = CreateSchemaResponse' {
- schemaVersionStatus :: Maybe SchemaVersionStatus
- registryName :: Maybe Text
- schemaStatus :: Maybe SchemaStatus
- registryArn :: Maybe Text
- latestSchemaVersion :: Maybe Natural
- dataFormat :: Maybe DataFormat
- schemaCheckpoint :: Maybe Natural
- schemaName :: Maybe Text
- schemaVersionId :: Maybe Text
- schemaArn :: Maybe Text
- nextSchemaVersion :: Maybe Natural
- description :: Maybe Text
- compatibility :: Maybe Compatibility
- tags :: Maybe (HashMap Text Text)
- httpStatus :: Int
- newCreateSchemaResponse :: Int -> CreateSchemaResponse
- createSchemaResponse_schemaVersionStatus :: Lens' CreateSchemaResponse (Maybe SchemaVersionStatus)
- createSchemaResponse_registryName :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaStatus :: Lens' CreateSchemaResponse (Maybe SchemaStatus)
- createSchemaResponse_registryArn :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_latestSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural)
- createSchemaResponse_dataFormat :: Lens' CreateSchemaResponse (Maybe DataFormat)
- createSchemaResponse_schemaCheckpoint :: Lens' CreateSchemaResponse (Maybe Natural)
- createSchemaResponse_schemaName :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaVersionId :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaArn :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_nextSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural)
- createSchemaResponse_description :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_compatibility :: Lens' CreateSchemaResponse (Maybe Compatibility)
- createSchemaResponse_tags :: Lens' CreateSchemaResponse (Maybe (HashMap Text Text))
- createSchemaResponse_httpStatus :: Lens' CreateSchemaResponse Int
Creating a Request
data CreateSchema Source #
See: newCreateSchema
smart constructor.
CreateSchema' | |
|
Instances
Create a value of CreateSchema
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:schemaDefinition:CreateSchema'
, createSchema_schemaDefinition
- The schema definition using the DataFormat
setting for SchemaName
.
$sel:registryId:CreateSchema'
, createSchema_registryId
- This is a wrapper shape to contain the registry identity fields. If this
is not provided, the default registry will be used. The ARN format for
the same will be:
arn:aws:glue:us-east-2:<customer id>:registry/default-registry:random-5-letter-id
.
$sel:description:CreateSchema'
, createSchema_description
- An optional description of the schema. If description is not provided,
there will not be any automatic default value for this.
$sel:compatibility:CreateSchema'
, createSchema_compatibility
- The compatibility mode of the schema. The possible values are:
- NONE: No compatibility mode applies. You can use this choice in development scenarios or if you do not know the compatibility mode that you want to apply to schemas. Any new version added will be accepted without undergoing a compatibility check.
- DISABLED: This compatibility choice prevents versioning for a particular schema. You can use this choice to prevent future versioning of a schema.
- BACKWARD: This compatibility choice is recommended as it allows data receivers to read both the current and one previous schema version. This means that for instance, a new schema version cannot drop data fields or change the type of these fields, so they can't be read by readers using the previous version.
- BACKWARD_ALL: This compatibility choice allows data receivers to read both the current and all previous schema versions. You can use this choice when you need to delete fields or add optional fields, and check compatibility against all previous schema versions.
- FORWARD: This compatibility choice allows data receivers to read both the current and one next schema version, but not necessarily later versions. You can use this choice when you need to add fields or delete optional fields, but only check compatibility against the last schema version.
- FORWARD_ALL: This compatibility choice allows data receivers to read written by producers of any new registered schema. You can use this choice when you need to add fields or delete optional fields, and check compatibility against all previous schema versions.
- FULL: This compatibility choice allows data receivers to read data written by producers using the previous or next version of the schema, but not necessarily earlier or later versions. You can use this choice when you need to add or remove optional fields, but only check compatibility against the last schema version.
- FULL_ALL: This compatibility choice allows data receivers to read data written by producers using all previous schema versions. You can use this choice when you need to add or remove optional fields, and check compatibility against all previous schema versions.
$sel:tags:CreateSchema'
, createSchema_tags
- Amazon Web Services tags that contain a key value pair and may be
searched by console, command line, or API. If specified, follows the
Amazon Web Services tags-on-create pattern.
$sel:schemaName:CreateSchema'
, createSchema_schemaName
- Name of the schema to be created of max length of 255, and may only
contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
No whitespace.
$sel:dataFormat:CreateSchema'
, createSchema_dataFormat
- The data format of the schema definition. Currently AVRO
and JSON
are supported.
Request Lenses
createSchema_schemaDefinition :: Lens' CreateSchema (Maybe Text) Source #
The schema definition using the DataFormat
setting for SchemaName
.
createSchema_registryId :: Lens' CreateSchema (Maybe RegistryId) Source #
This is a wrapper shape to contain the registry identity fields. If this
is not provided, the default registry will be used. The ARN format for
the same will be:
arn:aws:glue:us-east-2:<customer id>:registry/default-registry:random-5-letter-id
.
createSchema_description :: Lens' CreateSchema (Maybe Text) Source #
An optional description of the schema. If description is not provided, there will not be any automatic default value for this.
createSchema_compatibility :: Lens' CreateSchema (Maybe Compatibility) Source #
The compatibility mode of the schema. The possible values are:
- NONE: No compatibility mode applies. You can use this choice in development scenarios or if you do not know the compatibility mode that you want to apply to schemas. Any new version added will be accepted without undergoing a compatibility check.
- DISABLED: This compatibility choice prevents versioning for a particular schema. You can use this choice to prevent future versioning of a schema.
- BACKWARD: This compatibility choice is recommended as it allows data receivers to read both the current and one previous schema version. This means that for instance, a new schema version cannot drop data fields or change the type of these fields, so they can't be read by readers using the previous version.
- BACKWARD_ALL: This compatibility choice allows data receivers to read both the current and all previous schema versions. You can use this choice when you need to delete fields or add optional fields, and check compatibility against all previous schema versions.
- FORWARD: This compatibility choice allows data receivers to read both the current and one next schema version, but not necessarily later versions. You can use this choice when you need to add fields or delete optional fields, but only check compatibility against the last schema version.
- FORWARD_ALL: This compatibility choice allows data receivers to read written by producers of any new registered schema. You can use this choice when you need to add fields or delete optional fields, and check compatibility against all previous schema versions.
- FULL: This compatibility choice allows data receivers to read data written by producers using the previous or next version of the schema, but not necessarily earlier or later versions. You can use this choice when you need to add or remove optional fields, but only check compatibility against the last schema version.
- FULL_ALL: This compatibility choice allows data receivers to read data written by producers using all previous schema versions. You can use this choice when you need to add or remove optional fields, and check compatibility against all previous schema versions.
createSchema_tags :: Lens' CreateSchema (Maybe (HashMap Text Text)) Source #
Amazon Web Services tags that contain a key value pair and may be searched by console, command line, or API. If specified, follows the Amazon Web Services tags-on-create pattern.
createSchema_schemaName :: Lens' CreateSchema Text Source #
Name of the schema to be created of max length of 255, and may only contain letters, numbers, hyphen, underscore, dollar sign, or hash mark. No whitespace.
createSchema_dataFormat :: Lens' CreateSchema DataFormat Source #
The data format of the schema definition. Currently AVRO
and JSON
are supported.
Destructuring the Response
data CreateSchemaResponse Source #
See: newCreateSchemaResponse
smart constructor.
CreateSchemaResponse' | |
|
Instances
newCreateSchemaResponse Source #
Create a value of CreateSchemaResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:schemaVersionStatus:CreateSchemaResponse'
, createSchemaResponse_schemaVersionStatus
- The status of the first schema version created.
$sel:registryName:CreateSchemaResponse'
, createSchemaResponse_registryName
- The name of the registry.
$sel:schemaStatus:CreateSchemaResponse'
, createSchemaResponse_schemaStatus
- The status of the schema.
$sel:registryArn:CreateSchemaResponse'
, createSchemaResponse_registryArn
- The Amazon Resource Name (ARN) of the registry.
$sel:latestSchemaVersion:CreateSchemaResponse'
, createSchemaResponse_latestSchemaVersion
- The latest version of the schema associated with the returned schema
definition.
$sel:dataFormat:CreateSchema'
, createSchemaResponse_dataFormat
- The data format of the schema definition. Currently AVRO
and JSON
are supported.
$sel:schemaCheckpoint:CreateSchemaResponse'
, createSchemaResponse_schemaCheckpoint
- The version number of the checkpoint (the last time the compatibility
mode was changed).
$sel:schemaName:CreateSchema'
, createSchemaResponse_schemaName
- The name of the schema.
$sel:schemaVersionId:CreateSchemaResponse'
, createSchemaResponse_schemaVersionId
- The unique identifier of the first schema version.
$sel:schemaArn:CreateSchemaResponse'
, createSchemaResponse_schemaArn
- The Amazon Resource Name (ARN) of the schema.
$sel:nextSchemaVersion:CreateSchemaResponse'
, createSchemaResponse_nextSchemaVersion
- The next version of the schema associated with the returned schema
definition.
$sel:description:CreateSchema'
, createSchemaResponse_description
- A description of the schema if specified when created.
$sel:compatibility:CreateSchema'
, createSchemaResponse_compatibility
- The schema compatibility mode.
$sel:tags:CreateSchema'
, createSchemaResponse_tags
- The tags for the schema.
$sel:httpStatus:CreateSchemaResponse'
, createSchemaResponse_httpStatus
- The response's http status code.
Response Lenses
createSchemaResponse_schemaVersionStatus :: Lens' CreateSchemaResponse (Maybe SchemaVersionStatus) Source #
The status of the first schema version created.
createSchemaResponse_registryName :: Lens' CreateSchemaResponse (Maybe Text) Source #
The name of the registry.
createSchemaResponse_schemaStatus :: Lens' CreateSchemaResponse (Maybe SchemaStatus) Source #
The status of the schema.
createSchemaResponse_registryArn :: Lens' CreateSchemaResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the registry.
createSchemaResponse_latestSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural) Source #
The latest version of the schema associated with the returned schema definition.
createSchemaResponse_dataFormat :: Lens' CreateSchemaResponse (Maybe DataFormat) Source #
The data format of the schema definition. Currently AVRO
and JSON
are supported.
createSchemaResponse_schemaCheckpoint :: Lens' CreateSchemaResponse (Maybe Natural) Source #
The version number of the checkpoint (the last time the compatibility mode was changed).
createSchemaResponse_schemaName :: Lens' CreateSchemaResponse (Maybe Text) Source #
The name of the schema.
createSchemaResponse_schemaVersionId :: Lens' CreateSchemaResponse (Maybe Text) Source #
The unique identifier of the first schema version.
createSchemaResponse_schemaArn :: Lens' CreateSchemaResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the schema.
createSchemaResponse_nextSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural) Source #
The next version of the schema associated with the returned schema definition.
createSchemaResponse_description :: Lens' CreateSchemaResponse (Maybe Text) Source #
A description of the schema if specified when created.
createSchemaResponse_compatibility :: Lens' CreateSchemaResponse (Maybe Compatibility) Source #
The schema compatibility mode.
createSchemaResponse_tags :: Lens' CreateSchemaResponse (Maybe (HashMap Text Text)) Source #
The tags for the schema.
createSchemaResponse_httpStatus :: Lens' CreateSchemaResponse Int Source #
The response's http status code.