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 |
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_schemaVersionId :: Lens' RegisterSchemaVersionResponse (Maybe Text)
- registerSchemaVersionResponse_status :: Lens' RegisterSchemaVersionResponse (Maybe SchemaVersionStatus)
- registerSchemaVersionResponse_versionNumber :: Lens' RegisterSchemaVersionResponse (Maybe Natural)
- registerSchemaVersionResponse_httpStatus :: Lens' RegisterSchemaVersionResponse Int
Creating a Request
data RegisterSchemaVersion Source #
See: newRegisterSchemaVersion
smart constructor.
RegisterSchemaVersion' | |
|
Instances
newRegisterSchemaVersion Source #
:: 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:
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
SchemaArn
orSchemaName
andRegistryName
has to be provided. - SchemaId$SchemaName: The name of the schema. Either
SchemaArn
orSchemaName
andRegistryName
has 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
SchemaArn
orSchemaName
andRegistryName
has to be provided. - SchemaId$SchemaName: The name of the schema. Either
SchemaArn
orSchemaName
andRegistryName
has 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.
RegisterSchemaVersionResponse' | |
|
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:
RegisterSchemaVersionResponse
, registerSchemaVersionResponse_schemaVersionId
- The unique ID that represents the version of this schema.
RegisterSchemaVersionResponse
, registerSchemaVersionResponse_status
- The status of the schema version.
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_schemaVersionId :: Lens' RegisterSchemaVersionResponse (Maybe Text) Source #
The unique ID that represents the version of this schema.
registerSchemaVersionResponse_status :: Lens' RegisterSchemaVersionResponse (Maybe SchemaVersionStatus) Source #
The status of the schema version.
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.