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
. - Data
Format string - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - Schema
Definition string - The schema definition using the
data_format
setting forschema_name
. - Schema
Name string - The Name of the schema.
- Description string
- A description of the schema.
- Registry
Arn 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_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
, andFULL_ALL
. - Data
Format string - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - Schema
Definition string - The schema definition using the
data_format
setting forschema_name
. - Schema
Name string - The Name of the schema.
- Description string
- A description of the schema.
- Registry
Arn 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_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
, andFULL_ALL
. - data
Format String - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - schema
Definition String - The schema definition using the
data_format
setting forschema_name
. - schema
Name String - The Name of the schema.
- description String
- A description of the schema.
- registry
Arn 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_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
, andFULL_ALL
. - data
Format string - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - schema
Definition string - The schema definition using the
data_format
setting forschema_name
. - schema
Name string - The Name of the schema.
- description string
- A description of the schema.
- registry
Arn 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_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
, andFULL_ALL
. - data_
format str - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - schema_
definition str - The schema definition using the
data_format
setting 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_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
, andFULL_ALL
. - data
Format String - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - schema
Definition String - The schema definition using the
data_format
setting forschema_name
. - schema
Name String - The Name of the schema.
- description String
- A description of the schema.
- registry
Arn 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_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.
- 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 string - The name of the Glue Registry.
- Schema
Checkpoint 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_tags
configuration block.
- Arn string
- Amazon Resource Name (ARN) of the schema.
- Id string
- 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 string - The name of the Glue Registry.
- Schema
Checkpoint 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_tags
configuration block.
- arn String
- Amazon Resource Name (ARN) of the schema.
- id String
- The provider-assigned unique ID for this managed resource.
- latest
Schema IntegerVersion - The latest version of the schema associated with the returned schema definition.
- next
Schema IntegerVersion - The next version of the schema associated with the returned schema definition.
- registry
Name String - The name of the Glue Registry.
- schema
Checkpoint 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_tags
configuration block.
- arn string
- Amazon Resource Name (ARN) of the schema.
- id string
- The provider-assigned unique ID for this managed resource.
- latest
Schema numberVersion - The latest version of the schema associated with the returned schema definition.
- next
Schema numberVersion - The next version of the schema associated with the returned schema definition.
- registry
Name string - The name of the Glue Registry.
- schema
Checkpoint 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_tags
configuration 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_tags
configuration block.
- arn String
- Amazon Resource Name (ARN) of the schema.
- id String
- The provider-assigned unique ID for this managed resource.
- latest
Schema NumberVersion - The latest version of the schema associated with the returned schema definition.
- next
Schema NumberVersion - The next version of the schema associated with the returned schema definition.
- registry
Name String - The name of the Glue Registry.
- schema
Checkpoint 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_tags
configuration 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) -> 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.
- 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
. - Data
Format string - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - Description string
- 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 string - The ARN of the Glue Registry to create the schema in.
- Registry
Name string - 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 string - The schema definition using the
data_format
setting forschema_name
. - Schema
Name string - The Name of the schema.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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
. - Data
Format string - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - Description string
- 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 string - The ARN of the Glue Registry to create the schema in.
- Registry
Name string - 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 string - The schema definition using the
data_format
setting forschema_name
. - Schema
Name string - The Name of the schema.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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
. - data
Format String - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - description String
- A description of the schema.
- latest
Schema IntegerVersion - The latest version of the schema associated with the returned schema definition.
- next
Schema IntegerVersion - The next version of the schema associated with the returned schema definition.
- registry
Arn String - The ARN of the Glue Registry to create the schema in.
- registry
Name String - The name of the Glue Registry.
- schema
Checkpoint Integer - The version number of the checkpoint (the last time the compatibility mode was changed).
- schema
Definition String - The schema definition using the
data_format
setting forschema_name
. - schema
Name String - The Name of the schema.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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
. - data
Format string - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - description string
- A description of the schema.
- latest
Schema numberVersion - The latest version of the schema associated with the returned schema definition.
- next
Schema numberVersion - The next version of the schema associated with the returned schema definition.
- registry
Arn string - The ARN of the Glue Registry to create the schema in.
- registry
Name string - The name of the Glue Registry.
- schema
Checkpoint number - The version number of the checkpoint (the last time the compatibility mode was changed).
- schema
Definition string - The schema definition using the
data_format
setting forschema_name
. - schema
Name string - The Name of the schema.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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
,JSON
andPROTOBUF
. - 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_format
setting 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_tags
configuration 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_tags
configuration 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
. - data
Format String - The data format of the schema definition. Valid values are
AVRO
,JSON
andPROTOBUF
. - description String
- A description of the schema.
- latest
Schema NumberVersion - The latest version of the schema associated with the returned schema definition.
- next
Schema NumberVersion - The next version of the schema associated with the returned schema definition.
- registry
Arn String - The ARN of the Glue Registry to create the schema in.
- registry
Name String - The name of the Glue Registry.
- schema
Checkpoint Number - The version number of the checkpoint (the last time the compatibility mode was changed).
- schema
Definition String - The schema definition using the
data_format
setting forschema_name
. - schema
Name String - The Name of the schema.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration 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
aws
Terraform Provider.