aws.glue.Schema
Explore with Pulumi AI
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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);@overload
def Schema(resource_name: str,
           args: SchemaArgs,
           opts: Optional[ResourceOptions] = None)
@overload
def Schema(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           compatibility: Optional[str] = None,
           data_format: Optional[str] = None,
           schema_definition: Optional[str] = None,
           schema_name: Optional[str] = None,
           description: Optional[str] = None,
           registry_arn: Optional[str] = None,
           tags: Optional[Mapping[str, str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var schemaResource = new Aws.Glue.Schema("schemaResource", new()
{
    Compatibility = "string",
    DataFormat = "string",
    SchemaDefinition = "string",
    SchemaName = "string",
    Description = "string",
    RegistryArn = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := glue.NewSchema(ctx, "schemaResource", &glue.SchemaArgs{
	Compatibility:    pulumi.String("string"),
	DataFormat:       pulumi.String("string"),
	SchemaDefinition: pulumi.String("string"),
	SchemaName:       pulumi.String("string"),
	Description:      pulumi.String("string"),
	RegistryArn:      pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var schemaResource = new Schema("schemaResource", SchemaArgs.builder()
    .compatibility("string")
    .dataFormat("string")
    .schemaDefinition("string")
    .schemaName("string")
    .description("string")
    .registryArn("string")
    .tags(Map.of("string", "string"))
    .build());
schema_resource = aws.glue.Schema("schemaResource",
    compatibility="string",
    data_format="string",
    schema_definition="string",
    schema_name="string",
    description="string",
    registry_arn="string",
    tags={
        "string": "string",
    })
const schemaResource = new aws.glue.Schema("schemaResource", {
    compatibility: "string",
    dataFormat: "string",
    schemaDefinition: "string",
    schemaName: "string",
    description: "string",
    registryArn: "string",
    tags: {
        string: "string",
    },
});
type: aws:glue:Schema
properties:
    compatibility: string
    dataFormat: string
    description: string
    registryArn: string
    schemaDefinition: string
    schemaName: string
    tags:
        string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
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, andFULL_ALL.
- DataFormat string
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- SchemaDefinition string
- The schema definition using the data_formatsetting forschema_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.
- Dictionary<string, string>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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, andFULL_ALL.
- DataFormat string
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- SchemaDefinition string
- The schema definition using the data_formatsetting forschema_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.
- map[string]string
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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, andFULL_ALL.
- dataFormat String
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- schemaDefinition String
- The schema definition using the data_formatsetting forschema_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.
- Map<String,String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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, andFULL_ALL.
- dataFormat string
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- schemaDefinition string
- The schema definition using the data_formatsetting forschema_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.
- {[key: string]: string}
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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, andFULL_ALL.
- data_format str
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- schema_definition str
- The schema definition using the data_formatsetting forschema_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.
- Mapping[str, str]
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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, andFULL_ALL.
- dataFormat String
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- schemaDefinition String
- The schema definition using the data_formatsetting forschema_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.
- Map<String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration 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.
- LatestSchema intVersion 
- The latest version of the schema associated with the returned schema definition.
- NextSchema intVersion 
- 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).
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- Arn string
- Amazon Resource Name (ARN) of the schema.
- Id string
- The provider-assigned unique ID for this managed resource.
- LatestSchema intVersion 
- The latest version of the schema associated with the returned schema definition.
- NextSchema intVersion 
- 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).
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- Amazon Resource Name (ARN) of the schema.
- id String
- The provider-assigned unique ID for this managed resource.
- latestSchema IntegerVersion 
- The latest version of the schema associated with the returned schema definition.
- nextSchema IntegerVersion 
- 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).
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn string
- Amazon Resource Name (ARN) of the schema.
- id string
- The provider-assigned unique ID for this managed resource.
- latestSchema numberVersion 
- The latest version of the schema associated with the returned schema definition.
- nextSchema numberVersion 
- 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).
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn str
- Amazon Resource Name (ARN) of the schema.
- id str
- The provider-assigned unique ID for this managed resource.
- latest_schema_ intversion 
- The latest version of the schema associated with the returned schema definition.
- next_schema_ intversion 
- 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).
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- arn String
- Amazon Resource Name (ARN) of the schema.
- id String
- The provider-assigned unique ID for this managed resource.
- latestSchema NumberVersion 
- The latest version of the schema associated with the returned schema definition.
- nextSchema NumberVersion 
- 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).
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
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) -> Schemafunc 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)resources:  _:    type: aws:glue:Schema    get:      id: ${id}- 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.
- 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, andFULL_ALL.
- DataFormat string
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- Description string
- A description of the schema.
- LatestSchema intVersion 
- The latest version of the schema associated with the returned schema definition.
- NextSchema intVersion 
- 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_formatsetting forschema_name.
- SchemaName string
- The Name of the schema.
- Dictionary<string, string>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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, andFULL_ALL.
- DataFormat string
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- Description string
- A description of the schema.
- LatestSchema intVersion 
- The latest version of the schema associated with the returned schema definition.
- NextSchema intVersion 
- 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_formatsetting forschema_name.
- SchemaName string
- The Name of the schema.
- map[string]string
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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, andFULL_ALL.
- dataFormat String
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- description String
- A description of the schema.
- latestSchema IntegerVersion 
- The latest version of the schema associated with the returned schema definition.
- nextSchema IntegerVersion 
- 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_formatsetting forschema_name.
- schemaName String
- The Name of the schema.
- Map<String,String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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, andFULL_ALL.
- dataFormat string
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- description string
- A description of the schema.
- latestSchema numberVersion 
- The latest version of the schema associated with the returned schema definition.
- nextSchema numberVersion 
- 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_formatsetting forschema_name.
- schemaName string
- The Name of the schema.
- {[key: string]: string}
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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, andFULL_ALL.
- data_format str
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- description str
- A description of the schema.
- latest_schema_ intversion 
- The latest version of the schema associated with the returned schema definition.
- next_schema_ intversion 
- 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_formatsetting forschema_name.
- schema_name str
- The Name of the schema.
- Mapping[str, str]
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
- 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, andFULL_ALL.
- dataFormat String
- The data format of the schema definition. Valid values are AVRO,JSONandPROTOBUF.
- description String
- A description of the schema.
- latestSchema NumberVersion 
- The latest version of the schema associated with the returned schema definition.
- nextSchema NumberVersion 
- 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_formatsetting forschema_name.
- schemaName String
- The Name of the schema.
- Map<String>
- Key-value map of resource tags. .If configured with a provider default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider default_tagsconfiguration block.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.