1. Packages
  2. AWS Classic
  3. API Docs
  4. glue
  5. Schema

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.glue.Schema

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Provides a Glue Schema resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.glue.Schema("example", {
        schemaName: "example",
        registryArn: test.arn,
        dataFormat: "AVRO",
        compatibility: "NONE",
        schemaDefinition: "{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.glue.Schema("example",
        schema_name="example",
        registry_arn=test["arn"],
        data_format="AVRO",
        compatibility="NONE",
        schema_definition="{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := glue.NewSchema(ctx, "example", &glue.SchemaArgs{
    			SchemaName:       pulumi.String("example"),
    			RegistryArn:      pulumi.Any(test.Arn),
    			DataFormat:       pulumi.String("AVRO"),
    			Compatibility:    pulumi.String("NONE"),
    			SchemaDefinition: pulumi.String("{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Glue.Schema("example", new()
        {
            SchemaName = "example",
            RegistryArn = test.Arn,
            DataFormat = "AVRO",
            Compatibility = "NONE",
            SchemaDefinition = "{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.glue.Schema;
    import com.pulumi.aws.glue.SchemaArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Schema("example", SchemaArgs.builder()        
                .schemaName("example")
                .registryArn(test.arn())
                .dataFormat("AVRO")
                .compatibility("NONE")
                .schemaDefinition("{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:glue:Schema
        properties:
          schemaName: example
          registryArn: ${test.arn}
          dataFormat: AVRO
          compatibility: NONE
          schemaDefinition: '{"type": "record", "name": "r1", "fields": [ {"name": "f1", "type": "int"}, {"name": "f2", "type": "string"} ]}'
    

    Create Schema Resource

    new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);
    @overload
    def Schema(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               compatibility: Optional[str] = None,
               data_format: Optional[str] = None,
               description: Optional[str] = None,
               registry_arn: Optional[str] = None,
               schema_definition: Optional[str] = None,
               schema_name: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None)
    @overload
    def Schema(resource_name: str,
               args: SchemaArgs,
               opts: Optional[ResourceOptions] = None)
    func NewSchema(ctx *Context, name string, args SchemaArgs, opts ...ResourceOption) (*Schema, error)
    public Schema(string name, SchemaArgs args, CustomResourceOptions? opts = null)
    public Schema(String name, SchemaArgs args)
    public Schema(String name, SchemaArgs args, CustomResourceOptions options)
    
    type: aws:glue:Schema
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SchemaArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Schema Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Schema resource accepts the following input properties:

    Compatibility string
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    DataFormat string
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    SchemaDefinition string
    The schema definition using the data_format setting for schema_name.
    SchemaName string
    The Name of the schema.
    Description string
    A description of the schema.
    RegistryArn string
    The ARN of the Glue Registry to create the schema in.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Compatibility string
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    DataFormat string
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    SchemaDefinition string
    The schema definition using the data_format setting for schema_name.
    SchemaName string
    The Name of the schema.
    Description string
    A description of the schema.
    RegistryArn string
    The ARN of the Glue Registry to create the schema in.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    compatibility String
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    dataFormat String
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    schemaDefinition String
    The schema definition using the data_format setting for schema_name.
    schemaName String
    The Name of the schema.
    description String
    A description of the schema.
    registryArn String
    The ARN of the Glue Registry to create the schema in.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    compatibility string
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    dataFormat string
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    schemaDefinition string
    The schema definition using the data_format setting for schema_name.
    schemaName string
    The Name of the schema.
    description string
    A description of the schema.
    registryArn string
    The ARN of the Glue Registry to create the schema in.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    compatibility str
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    data_format str
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    schema_definition str
    The schema definition using the data_format setting for schema_name.
    schema_name str
    The Name of the schema.
    description str
    A description of the schema.
    registry_arn str
    The ARN of the Glue Registry to create the schema in.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    compatibility String
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    dataFormat String
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    schemaDefinition String
    The schema definition using the data_format setting for schema_name.
    schemaName String
    The Name of the schema.
    description String
    A description of the schema.
    registryArn String
    The ARN of the Glue Registry to create the schema in.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Schema resource produces the following output properties:

    Arn string
    Amazon Resource Name (ARN) of the schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    LatestSchemaVersion int
    The latest version of the schema associated with the returned schema definition.
    NextSchemaVersion int
    The next version of the schema associated with the returned schema definition.
    RegistryName string
    The name of the Glue Registry.
    SchemaCheckpoint int
    The version number of the checkpoint (the last time the compatibility mode was changed).
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    LatestSchemaVersion int
    The latest version of the schema associated with the returned schema definition.
    NextSchemaVersion int
    The next version of the schema associated with the returned schema definition.
    RegistryName string
    The name of the Glue Registry.
    SchemaCheckpoint int
    The version number of the checkpoint (the last time the compatibility mode was changed).
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the schema.
    id String
    The provider-assigned unique ID for this managed resource.
    latestSchemaVersion Integer
    The latest version of the schema associated with the returned schema definition.
    nextSchemaVersion Integer
    The next version of the schema associated with the returned schema definition.
    registryName String
    The name of the Glue Registry.
    schemaCheckpoint Integer
    The version number of the checkpoint (the last time the compatibility mode was changed).
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the schema.
    id string
    The provider-assigned unique ID for this managed resource.
    latestSchemaVersion number
    The latest version of the schema associated with the returned schema definition.
    nextSchemaVersion number
    The next version of the schema associated with the returned schema definition.
    registryName string
    The name of the Glue Registry.
    schemaCheckpoint number
    The version number of the checkpoint (the last time the compatibility mode was changed).
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of the schema.
    id str
    The provider-assigned unique ID for this managed resource.
    latest_schema_version int
    The latest version of the schema associated with the returned schema definition.
    next_schema_version int
    The next version of the schema associated with the returned schema definition.
    registry_name str
    The name of the Glue Registry.
    schema_checkpoint int
    The version number of the checkpoint (the last time the compatibility mode was changed).
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the schema.
    id String
    The provider-assigned unique ID for this managed resource.
    latestSchemaVersion Number
    The latest version of the schema associated with the returned schema definition.
    nextSchemaVersion Number
    The next version of the schema associated with the returned schema definition.
    registryName String
    The name of the Glue Registry.
    schemaCheckpoint Number
    The version number of the checkpoint (the last time the compatibility mode was changed).
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up Existing Schema Resource

    Get an existing Schema resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SchemaState, opts?: CustomResourceOptions): Schema
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            compatibility: Optional[str] = None,
            data_format: Optional[str] = None,
            description: Optional[str] = None,
            latest_schema_version: Optional[int] = None,
            next_schema_version: Optional[int] = None,
            registry_arn: Optional[str] = None,
            registry_name: Optional[str] = None,
            schema_checkpoint: Optional[int] = None,
            schema_definition: Optional[str] = None,
            schema_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> Schema
    func GetSchema(ctx *Context, name string, id IDInput, state *SchemaState, opts ...ResourceOption) (*Schema, error)
    public static Schema Get(string name, Input<string> id, SchemaState? state, CustomResourceOptions? opts = null)
    public static Schema get(String name, Output<String> id, SchemaState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    Amazon Resource Name (ARN) of the schema.
    Compatibility string
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    DataFormat string
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    Description string
    A description of the schema.
    LatestSchemaVersion int
    The latest version of the schema associated with the returned schema definition.
    NextSchemaVersion int
    The next version of the schema associated with the returned schema definition.
    RegistryArn string
    The ARN of the Glue Registry to create the schema in.
    RegistryName string
    The name of the Glue Registry.
    SchemaCheckpoint int
    The version number of the checkpoint (the last time the compatibility mode was changed).
    SchemaDefinition string
    The schema definition using the data_format setting for schema_name.
    SchemaName string
    The Name of the schema.
    Tags Dictionary<string, string>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the schema.
    Compatibility string
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    DataFormat string
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    Description string
    A description of the schema.
    LatestSchemaVersion int
    The latest version of the schema associated with the returned schema definition.
    NextSchemaVersion int
    The next version of the schema associated with the returned schema definition.
    RegistryArn string
    The ARN of the Glue Registry to create the schema in.
    RegistryName string
    The name of the Glue Registry.
    SchemaCheckpoint int
    The version number of the checkpoint (the last time the compatibility mode was changed).
    SchemaDefinition string
    The schema definition using the data_format setting for schema_name.
    SchemaName string
    The Name of the schema.
    Tags map[string]string
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the schema.
    compatibility String
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    dataFormat String
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    description String
    A description of the schema.
    latestSchemaVersion Integer
    The latest version of the schema associated with the returned schema definition.
    nextSchemaVersion Integer
    The next version of the schema associated with the returned schema definition.
    registryArn String
    The ARN of the Glue Registry to create the schema in.
    registryName String
    The name of the Glue Registry.
    schemaCheckpoint Integer
    The version number of the checkpoint (the last time the compatibility mode was changed).
    schemaDefinition String
    The schema definition using the data_format setting for schema_name.
    schemaName String
    The Name of the schema.
    tags Map<String,String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the schema.
    compatibility string
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    dataFormat string
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    description string
    A description of the schema.
    latestSchemaVersion number
    The latest version of the schema associated with the returned schema definition.
    nextSchemaVersion number
    The next version of the schema associated with the returned schema definition.
    registryArn string
    The ARN of the Glue Registry to create the schema in.
    registryName string
    The name of the Glue Registry.
    schemaCheckpoint number
    The version number of the checkpoint (the last time the compatibility mode was changed).
    schemaDefinition string
    The schema definition using the data_format setting for schema_name.
    schemaName string
    The Name of the schema.
    tags {[key: string]: string}
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of the schema.
    compatibility str
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    data_format str
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    description str
    A description of the schema.
    latest_schema_version int
    The latest version of the schema associated with the returned schema definition.
    next_schema_version int
    The next version of the schema associated with the returned schema definition.
    registry_arn str
    The ARN of the Glue Registry to create the schema in.
    registry_name str
    The name of the Glue Registry.
    schema_checkpoint int
    The version number of the checkpoint (the last time the compatibility mode was changed).
    schema_definition str
    The schema definition using the data_format setting for schema_name.
    schema_name str
    The Name of the schema.
    tags Mapping[str, str]
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the schema.
    compatibility String
    The compatibility mode of the schema. Values values are: NONE, DISABLED, BACKWARD, BACKWARD_ALL, FORWARD, FORWARD_ALL, FULL, and FULL_ALL.
    dataFormat String
    The data format of the schema definition. Valid values are AVRO, JSON and PROTOBUF.
    description String
    A description of the schema.
    latestSchemaVersion Number
    The latest version of the schema associated with the returned schema definition.
    nextSchemaVersion Number
    The next version of the schema associated with the returned schema definition.
    registryArn String
    The ARN of the Glue Registry to create the schema in.
    registryName String
    The name of the Glue Registry.
    schemaCheckpoint Number
    The version number of the checkpoint (the last time the compatibility mode was changed).
    schemaDefinition String
    The schema definition using the data_format setting for schema_name.
    schemaName String
    The Name of the schema.
    tags Map<String>
    Key-value map of resource tags. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Import

    Using pulumi import, import Glue Registries using arn. For example:

    $ pulumi import aws:glue/schema:Schema example arn:aws:glue:us-west-2:123456789012:schema/example/example
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi