| 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 |
Amazonka.Glue.RegisterSchemaVersion
Description
Adds a new version to the existing schema. Returns an error if new version of schema does not meet the compatibility requirements of the schema set. This API will not create a new schema set and will return a 404 error if the schema set is not already present in the Schema Registry.
If this is the first schema definition to be registered in the Schema
Registry, this API will store the schema version and return immediately.
Otherwise, this call has the potential to run longer than other
operations due to compatibility modes. You can call the
GetSchemaVersion API with the SchemaVersionId to check compatibility
modes.
If the same schema definition is already stored in Schema Registry as a version, the schema ID of the existing schema is returned to the caller.
Synopsis
- data RegisterSchemaVersion = RegisterSchemaVersion' {}
- newRegisterSchemaVersion :: SchemaId -> Text -> RegisterSchemaVersion
- registerSchemaVersion_schemaId :: Lens' RegisterSchemaVersion SchemaId
- registerSchemaVersion_schemaDefinition :: Lens' RegisterSchemaVersion Text
- data RegisterSchemaVersionResponse = RegisterSchemaVersionResponse' {}
- newRegisterSchemaVersionResponse :: Int -> RegisterSchemaVersionResponse
- registerSchemaVersionResponse_status :: Lens' RegisterSchemaVersionResponse (Maybe SchemaVersionStatus)
- registerSchemaVersionResponse_schemaVersionId :: Lens' RegisterSchemaVersionResponse (Maybe Text)
- registerSchemaVersionResponse_versionNumber :: Lens' RegisterSchemaVersionResponse (Maybe Natural)
- registerSchemaVersionResponse_httpStatus :: Lens' RegisterSchemaVersionResponse Int
Creating a Request
data RegisterSchemaVersion Source #
See: newRegisterSchemaVersion smart constructor.
Constructors
| RegisterSchemaVersion' | |
Fields
| |
Instances
newRegisterSchemaVersion Source #
Arguments
| :: SchemaId | |
| -> Text | |
| -> RegisterSchemaVersion |
Create a value of RegisterSchemaVersion 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:schemaId:RegisterSchemaVersion', registerSchemaVersion_schemaId - This is a wrapper structure to contain schema identity fields. The
structure contains:
- SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
Either
SchemaArnorSchemaNameandRegistryNamehas to be provided. - SchemaId$SchemaName: The name of the schema. Either
SchemaArnorSchemaNameandRegistryNamehas to be provided.
$sel:schemaDefinition:RegisterSchemaVersion', registerSchemaVersion_schemaDefinition - The schema definition using the DataFormat setting for the
SchemaName.
Request Lenses
registerSchemaVersion_schemaId :: Lens' RegisterSchemaVersion SchemaId Source #
This is a wrapper structure to contain schema identity fields. The structure contains:
- SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
Either
SchemaArnorSchemaNameandRegistryNamehas to be provided. - SchemaId$SchemaName: The name of the schema. Either
SchemaArnorSchemaNameandRegistryNamehas to be provided.
registerSchemaVersion_schemaDefinition :: Lens' RegisterSchemaVersion Text Source #
The schema definition using the DataFormat setting for the
SchemaName.
Destructuring the Response
data RegisterSchemaVersionResponse Source #
See: newRegisterSchemaVersionResponse smart constructor.
Constructors
| RegisterSchemaVersionResponse' | |
Fields
| |
Instances
newRegisterSchemaVersionResponse Source #
Create a value of RegisterSchemaVersionResponse 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:status:RegisterSchemaVersionResponse', registerSchemaVersionResponse_status - The status of the schema version.
$sel:schemaVersionId:RegisterSchemaVersionResponse', registerSchemaVersionResponse_schemaVersionId - The unique ID that represents the version of this schema.
$sel:versionNumber:RegisterSchemaVersionResponse', registerSchemaVersionResponse_versionNumber - The version of this schema (for sync flow only, in case this is the
first version).
$sel:httpStatus:RegisterSchemaVersionResponse', registerSchemaVersionResponse_httpStatus - The response's http status code.
Response Lenses
registerSchemaVersionResponse_status :: Lens' RegisterSchemaVersionResponse (Maybe SchemaVersionStatus) Source #
The status of the schema version.
registerSchemaVersionResponse_schemaVersionId :: Lens' RegisterSchemaVersionResponse (Maybe Text) Source #
The unique ID that represents the version of this schema.
registerSchemaVersionResponse_versionNumber :: Lens' RegisterSchemaVersionResponse (Maybe Natural) Source #
The version of this schema (for sync flow only, in case this is the first version).
registerSchemaVersionResponse_httpStatus :: Lens' RegisterSchemaVersionResponse Int Source #
The response's http status code.