Classifier

Provides a Glue Classifier resource.

NOTE: It is only valid to create one type of classifier (csv, grok, JSON, or XML). Changing classifier types will recreate the classifier.

Example Usage

Csv Classifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Glue.Classifier("example", new Aws.Glue.ClassifierArgs
        {
            CsvClassifier = new Aws.Glue.Inputs.ClassifierCsvClassifierArgs
            {
                AllowSingleColumn = false,
                ContainsHeader = "PRESENT",
                Delimiter = ",",
                DisableValueTrimming = false,
                Headers = 
                {
                    "example1",
                    "example2",
                },
                QuoteSymbol = "'",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/glue"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := glue.NewClassifier(ctx, "example", &glue.ClassifierArgs{
            CsvClassifier: &glue.ClassifierCsvClassifierArgs{
                AllowSingleColumn:    pulumi.Bool(false),
                ContainsHeader:       pulumi.String("PRESENT"),
                Delimiter:            pulumi.String(","),
                DisableValueTrimming: pulumi.Bool(false),
                Headers: pulumi.StringArray{
                    pulumi.String("example1"),
                    pulumi.String("example2"),
                },
                QuoteSymbol: pulumi.String("'"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.glue.Classifier("example", csv_classifier={
    "allowSingleColumn": False,
    "containsHeader": "PRESENT",
    "delimiter": ",",
    "disableValueTrimming": False,
    "headers": [
        "example1",
        "example2",
    ],
    "quoteSymbol": "'",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.glue.Classifier("example", {
    csvClassifier: {
        allowSingleColumn: false,
        containsHeader: "PRESENT",
        delimiter: ",",
        disableValueTrimming: false,
        headers: [
            "example1",
            "example2",
        ],
        quoteSymbol: "'",
    },
});

Grok Classifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Glue.Classifier("example", new Aws.Glue.ClassifierArgs
        {
            GrokClassifier = new Aws.Glue.Inputs.ClassifierGrokClassifierArgs
            {
                Classification = "example",
                GrokPattern = "example",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/glue"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := glue.NewClassifier(ctx, "example", &glue.ClassifierArgs{
            GrokClassifier: &glue.ClassifierGrokClassifierArgs{
                Classification: pulumi.String("example"),
                GrokPattern:    pulumi.String("example"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.glue.Classifier("example", grok_classifier={
    "classification": "example",
    "grokPattern": "example",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.glue.Classifier("example", {
    grokClassifier: {
        classification: "example",
        grokPattern: "example",
    },
});

JSON Classifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Glue.Classifier("example", new Aws.Glue.ClassifierArgs
        {
            JsonClassifier = new Aws.Glue.Inputs.ClassifierJsonClassifierArgs
            {
                JsonPath = "example",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/glue"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := glue.NewClassifier(ctx, "example", &glue.ClassifierArgs{
            JsonClassifier: &glue.ClassifierJsonClassifierArgs{
                JsonPath: pulumi.String("example"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.glue.Classifier("example", json_classifier={
    "jsonPath": "example",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.glue.Classifier("example", {
    jsonClassifier: {
        jsonPath: "example",
    },
});

XML Classifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Glue.Classifier("example", new Aws.Glue.ClassifierArgs
        {
            XmlClassifier = new Aws.Glue.Inputs.ClassifierXmlClassifierArgs
            {
                Classification = "example",
                RowTag = "example",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/glue"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := glue.NewClassifier(ctx, "example", &glue.ClassifierArgs{
            XmlClassifier: &glue.ClassifierXmlClassifierArgs{
                Classification: pulumi.String("example"),
                RowTag:         pulumi.String("example"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.glue.Classifier("example", xml_classifier={
    "classification": "example",
    "rowTag": "example",
})
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.glue.Classifier("example", {
    xmlClassifier: {
        classification: "example",
        rowTag: "example",
    },
});

Create a Classifier Resource

def Classifier(resource_name, opts=None, csv_classifier=None, grok_classifier=None, json_classifier=None, name=None, xml_classifier=None, __props__=None);
func NewClassifier(ctx *Context, name string, args *ClassifierArgs, opts ...ResourceOption) (*Classifier, error)
public Classifier(string name, ClassifierArgs? args = null, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ClassifierArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ClassifierArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ClassifierArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Classifier Resource Properties

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

Inputs

The Classifier resource accepts the following input properties:

CsvClassifier ClassifierCsvClassifierArgs

A classifier for Csv content. Defined below.

GrokClassifier ClassifierGrokClassifierArgs

A classifier that uses grok patterns. Defined below.

JsonClassifier ClassifierJsonClassifierArgs

A classifier for JSON content. Defined below.

Name string

The name of the classifier.

XmlClassifier ClassifierXmlClassifierArgs

A classifier for XML content. Defined below.

CsvClassifier ClassifierCsvClassifier

A classifier for Csv content. Defined below.

GrokClassifier ClassifierGrokClassifier

A classifier that uses grok patterns. Defined below.

JsonClassifier ClassifierJsonClassifier

A classifier for JSON content. Defined below.

Name string

The name of the classifier.

XmlClassifier ClassifierXmlClassifier

A classifier for XML content. Defined below.

csvClassifier ClassifierCsvClassifier

A classifier for Csv content. Defined below.

grokClassifier ClassifierGrokClassifier

A classifier that uses grok patterns. Defined below.

jsonClassifier ClassifierJsonClassifier

A classifier for JSON content. Defined below.

name string

The name of the classifier.

xmlClassifier ClassifierXmlClassifier

A classifier for XML content. Defined below.

csv_classifier Dict[ClassifierCsvClassifier]

A classifier for Csv content. Defined below.

grok_classifier Dict[ClassifierGrokClassifier]

A classifier that uses grok patterns. Defined below.

json_classifier Dict[ClassifierJsonClassifier]

A classifier for JSON content. Defined below.

name str

The name of the classifier.

xml_classifier Dict[ClassifierXmlClassifier]

A classifier for XML content. Defined below.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Classifier Resource

Get an existing Classifier 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?: ClassifierState, opts?: CustomResourceOptions): Classifier
static get(resource_name, id, opts=None, csv_classifier=None, grok_classifier=None, json_classifier=None, name=None, xml_classifier=None, __props__=None);
func GetClassifier(ctx *Context, name string, id IDInput, state *ClassifierState, opts ...ResourceOption) (*Classifier, error)
public static Classifier Get(string name, Input<string> id, ClassifierState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CsvClassifier ClassifierCsvClassifierArgs

A classifier for Csv content. Defined below.

GrokClassifier ClassifierGrokClassifierArgs

A classifier that uses grok patterns. Defined below.

JsonClassifier ClassifierJsonClassifierArgs

A classifier for JSON content. Defined below.

Name string

The name of the classifier.

XmlClassifier ClassifierXmlClassifierArgs

A classifier for XML content. Defined below.

CsvClassifier ClassifierCsvClassifier

A classifier for Csv content. Defined below.

GrokClassifier ClassifierGrokClassifier

A classifier that uses grok patterns. Defined below.

JsonClassifier ClassifierJsonClassifier

A classifier for JSON content. Defined below.

Name string

The name of the classifier.

XmlClassifier ClassifierXmlClassifier

A classifier for XML content. Defined below.

csvClassifier ClassifierCsvClassifier

A classifier for Csv content. Defined below.

grokClassifier ClassifierGrokClassifier

A classifier that uses grok patterns. Defined below.

jsonClassifier ClassifierJsonClassifier

A classifier for JSON content. Defined below.

name string

The name of the classifier.

xmlClassifier ClassifierXmlClassifier

A classifier for XML content. Defined below.

csv_classifier Dict[ClassifierCsvClassifier]

A classifier for Csv content. Defined below.

grok_classifier Dict[ClassifierGrokClassifier]

A classifier that uses grok patterns. Defined below.

json_classifier Dict[ClassifierJsonClassifier]

A classifier for JSON content. Defined below.

name str

The name of the classifier.

xml_classifier Dict[ClassifierXmlClassifier]

A classifier for XML content. Defined below.

Supporting Types

ClassifierCsvClassifier

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AllowSingleColumn bool

Enables the processing of files that contain only one column.

ContainsHeader string

Indicates whether the CSV file contains a header. This can be one of “ABSENT”, “PRESENT”, or “UNKNOWN”.

Delimiter string

The delimiter used in the Csv to separate columns.

DisableValueTrimming bool

Specifies whether to trim column values.

Headers List<string>

A list of strings representing column names.

QuoteSymbol string

A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

AllowSingleColumn bool

Enables the processing of files that contain only one column.

ContainsHeader string

Indicates whether the CSV file contains a header. This can be one of “ABSENT”, “PRESENT”, or “UNKNOWN”.

Delimiter string

The delimiter used in the Csv to separate columns.

DisableValueTrimming bool

Specifies whether to trim column values.

Headers []string

A list of strings representing column names.

QuoteSymbol string

A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

allowSingleColumn boolean

Enables the processing of files that contain only one column.

containsHeader string

Indicates whether the CSV file contains a header. This can be one of “ABSENT”, “PRESENT”, or “UNKNOWN”.

delimiter string

The delimiter used in the Csv to separate columns.

disableValueTrimming boolean

Specifies whether to trim column values.

headers string[]

A list of strings representing column names.

quoteSymbol string

A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

allowSingleColumn bool

Enables the processing of files that contain only one column.

containsHeader str

Indicates whether the CSV file contains a header. This can be one of “ABSENT”, “PRESENT”, or “UNKNOWN”.

delimiter str

The delimiter used in the Csv to separate columns.

disableValueTrimming bool

Specifies whether to trim column values.

headers List[str]

A list of strings representing column names.

quoteSymbol str

A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.

ClassifierGrokClassifier

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Classification string

An identifier of the data format that the classifier matches.

GrokPattern string

The grok pattern used by this classifier.

CustomPatterns string

Custom grok patterns used by this classifier.

Classification string

An identifier of the data format that the classifier matches.

GrokPattern string

The grok pattern used by this classifier.

CustomPatterns string

Custom grok patterns used by this classifier.

classification string

An identifier of the data format that the classifier matches.

grokPattern string

The grok pattern used by this classifier.

customPatterns string

Custom grok patterns used by this classifier.

classification str

An identifier of the data format that the classifier matches.

grokPattern str

The grok pattern used by this classifier.

customPatterns str

Custom grok patterns used by this classifier.

ClassifierJsonClassifier

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

JsonPath string

A JsonPath string defining the JSON data for the classifier to classify. AWS Glue supports a subset of JsonPath, as described in Writing JsonPath Custom Classifiers.

JsonPath string

A JsonPath string defining the JSON data for the classifier to classify. AWS Glue supports a subset of JsonPath, as described in Writing JsonPath Custom Classifiers.

jsonPath string

A JsonPath string defining the JSON data for the classifier to classify. AWS Glue supports a subset of JsonPath, as described in Writing JsonPath Custom Classifiers.

jsonPath str

A JsonPath string defining the JSON data for the classifier to classify. AWS Glue supports a subset of JsonPath, as described in Writing JsonPath Custom Classifiers.

ClassifierXmlClassifier

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Classification string

An identifier of the data format that the classifier matches.

RowTag string

The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by />). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, <row item_a="A" item_b="B"></row> is okay, but <row item_a="A" item_b="B" /> is not).

Classification string

An identifier of the data format that the classifier matches.

RowTag string

The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by />). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, <row item_a="A" item_b="B"></row> is okay, but <row item_a="A" item_b="B" /> is not).

classification string

An identifier of the data format that the classifier matches.

rowTag string

The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by />). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, <row item_a="A" item_b="B"></row> is okay, but <row item_a="A" item_b="B" /> is not).

classification str

An identifier of the data format that the classifier matches.

rowTag str

The XML tag designating the element that contains each record in an XML document being parsed. Note that this cannot identify a self-closing element (closed by />). An empty row element that contains only attributes can be parsed as long as it ends with a closing tag (for example, <row item_a="A" item_b="B"></row> is okay, but <row item_a="A" item_b="B" /> is not).

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.