amazonka-glue-2.0: Amazon Glue SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Glue.CreateSchema

Description

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

Creating a Request

data CreateSchema Source #

See: newCreateSchema smart constructor.

Constructors

CreateSchema' 

Fields

  • compatibility :: Maybe 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.
  • description :: Maybe Text

    An optional description of the schema. If description is not provided, there will not be any automatic default value for this.

  • registryId :: Maybe 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.

  • schemaDefinition :: Maybe Text

    The schema definition using the DataFormat setting for SchemaName.

  • tags :: Maybe (HashMap Text Text)

    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.

  • schemaName :: Text

    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.

  • dataFormat :: DataFormat

    The data format of the schema definition. Currently AVRO, JSON and PROTOBUF are supported.

Instances

Instances details
ToJSON CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

ToHeaders CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

ToPath CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

ToQuery CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

AWSRequest CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Associated Types

type AWSResponse CreateSchema #

Generic CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Associated Types

type Rep CreateSchema :: Type -> Type #

Read CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Show CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

NFData CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Methods

rnf :: CreateSchema -> () #

Eq CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Hashable CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

type AWSResponse CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

type Rep CreateSchema Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

newCreateSchema Source #

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.

Constructors

CreateSchemaResponse' 

Fields

Instances

Instances details
Generic CreateSchemaResponse Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Associated Types

type Rep CreateSchemaResponse :: Type -> Type #

Read CreateSchemaResponse Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Show CreateSchemaResponse Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

NFData CreateSchemaResponse Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

Methods

rnf :: CreateSchemaResponse -> () #

Eq CreateSchemaResponse Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

type Rep CreateSchemaResponse Source # 
Instance details

Defined in Amazonka.Glue.CreateSchema

type Rep CreateSchemaResponse = D1 ('MetaData "CreateSchemaResponse" "Amazonka.Glue.CreateSchema" "amazonka-glue-2.0-7miPWwBHdfn8N8SvbpLgE0" 'False) (C1 ('MetaCons "CreateSchemaResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "compatibility") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Compatibility)) :*: (S1 ('MetaSel ('Just "dataFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DataFormat)) :*: S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "latestSchemaVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "nextSchemaVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "registryArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "registryName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: (((S1 ('MetaSel ('Just "schemaArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "schemaCheckpoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "schemaName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "schemaStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SchemaStatus)))) :*: ((S1 ('MetaSel ('Just "schemaVersionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "schemaVersionStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe SchemaVersionStatus))) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))

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_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_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_schemaVersionId :: Lens' CreateSchemaResponse (Maybe Text) Source #

The unique identifier of the first schema version.