Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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_compatibility :: Lens' CreateSchema (Maybe Compatibility)
- createSchema_description :: Lens' CreateSchema (Maybe Text)
- createSchema_registryId :: Lens' CreateSchema (Maybe RegistryId)
- createSchema_schemaDefinition :: Lens' CreateSchema (Maybe Text)
- createSchema_tags :: Lens' CreateSchema (Maybe (HashMap Text Text))
- createSchema_schemaName :: Lens' CreateSchema Text
- createSchema_dataFormat :: Lens' CreateSchema DataFormat
- data CreateSchemaResponse = CreateSchemaResponse' {
- compatibility :: Maybe Compatibility
- dataFormat :: Maybe DataFormat
- description :: Maybe Text
- latestSchemaVersion :: Maybe Natural
- nextSchemaVersion :: Maybe Natural
- registryArn :: Maybe Text
- registryName :: Maybe Text
- schemaArn :: Maybe Text
- schemaCheckpoint :: Maybe Natural
- schemaName :: Maybe Text
- schemaStatus :: Maybe SchemaStatus
- schemaVersionId :: Maybe Text
- schemaVersionStatus :: Maybe SchemaVersionStatus
- tags :: Maybe (HashMap Text Text)
- httpStatus :: Int
- newCreateSchemaResponse :: Int -> CreateSchemaResponse
- createSchemaResponse_compatibility :: Lens' CreateSchemaResponse (Maybe Compatibility)
- createSchemaResponse_dataFormat :: Lens' CreateSchemaResponse (Maybe DataFormat)
- createSchemaResponse_description :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_latestSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural)
- createSchemaResponse_nextSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural)
- createSchemaResponse_registryArn :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_registryName :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaArn :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaCheckpoint :: Lens' CreateSchemaResponse (Maybe Natural)
- createSchemaResponse_schemaName :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaStatus :: Lens' CreateSchemaResponse (Maybe SchemaStatus)
- createSchemaResponse_schemaVersionId :: Lens' CreateSchemaResponse (Maybe Text)
- createSchemaResponse_schemaVersionStatus :: Lens' CreateSchemaResponse (Maybe SchemaVersionStatus)
- 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:
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.
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: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:schemaDefinition:CreateSchema'
, createSchema_schemaDefinition
- The schema definition using the DataFormat
setting for SchemaName
.
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.
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.
CreateSchema
, createSchema_dataFormat
- The data format of the schema definition. Currently AVRO
, JSON
and
PROTOBUF
are supported.
Request Lenses
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_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_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_schemaDefinition :: Lens' CreateSchema (Maybe Text) Source #
The schema definition using the DataFormat
setting for SchemaName
.
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
, JSON
and
PROTOBUF
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:
CreateSchema
, createSchemaResponse_compatibility
- The schema compatibility mode.
CreateSchema
, createSchemaResponse_dataFormat
- The data format of the schema definition. Currently AVRO
, JSON
and
PROTOBUF
are supported.
CreateSchema
, createSchemaResponse_description
- A description of the schema if specified when created.
$sel:latestSchemaVersion:CreateSchemaResponse'
, createSchemaResponse_latestSchemaVersion
- The latest version of the schema associated with the returned schema
definition.
$sel:nextSchemaVersion:CreateSchemaResponse'
, createSchemaResponse_nextSchemaVersion
- The next version of the schema associated with the returned schema
definition.
CreateSchemaResponse
, createSchemaResponse_registryArn
- The Amazon Resource Name (ARN) of the registry.
CreateSchemaResponse
, createSchemaResponse_registryName
- The name of the registry.
CreateSchemaResponse
, createSchemaResponse_schemaArn
- The Amazon Resource Name (ARN) of the schema.
$sel:schemaCheckpoint:CreateSchemaResponse'
, createSchemaResponse_schemaCheckpoint
- The version number of the checkpoint (the last time the compatibility
mode was changed).
CreateSchema
, createSchemaResponse_schemaName
- The name of the schema.
CreateSchemaResponse
, createSchemaResponse_schemaStatus
- The status of the schema.
CreateSchemaResponse
, createSchemaResponse_schemaVersionId
- The unique identifier of the first schema version.
$sel:schemaVersionStatus:CreateSchemaResponse'
, createSchemaResponse_schemaVersionStatus
- The status of the first schema version created.
CreateSchema
, createSchemaResponse_tags
- The tags for the schema.
$sel:httpStatus:CreateSchemaResponse'
, createSchemaResponse_httpStatus
- The response's http status code.
Response Lenses
createSchemaResponse_compatibility :: Lens' CreateSchemaResponse (Maybe Compatibility) Source #
The schema compatibility mode.
createSchemaResponse_dataFormat :: Lens' CreateSchemaResponse (Maybe DataFormat) Source #
The data format of the schema definition. Currently AVRO
, JSON
and
PROTOBUF
are supported.
createSchemaResponse_description :: Lens' CreateSchemaResponse (Maybe Text) Source #
A description of the schema if specified when created.
createSchemaResponse_latestSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural) Source #
The latest version of the schema associated with the returned schema definition.
createSchemaResponse_nextSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural) Source #
The next version of the schema associated with the returned schema definition.
createSchemaResponse_registryArn :: Lens' CreateSchemaResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the registry.
createSchemaResponse_registryName :: Lens' CreateSchemaResponse (Maybe Text) Source #
The name of the registry.
createSchemaResponse_schemaArn :: Lens' CreateSchemaResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the schema.
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_schemaStatus :: Lens' CreateSchemaResponse (Maybe SchemaStatus) Source #
The status of the schema.
createSchemaResponse_schemaVersionId :: Lens' CreateSchemaResponse (Maybe Text) Source #
The unique identifier of the first schema version.
createSchemaResponse_schemaVersionStatus :: Lens' CreateSchemaResponse (Maybe SchemaVersionStatus) Source #
The status of the first schema version created.
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.