UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

140 lines 4.52 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Classifier = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.Classifier("example", { * name: "example", * csvClassifier: { * allowSingleColumn: false, * containsHeader: "PRESENT", * delimiter: ",", * disableValueTrimming: false, * headers: [ * "example1", * "example2", * ], * quoteSymbol: "'", * }, * }); * ``` * * ### Grok Classifier * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.Classifier("example", { * name: "example", * grokClassifier: { * classification: "example", * grokPattern: "example", * }, * }); * ``` * * ### JSON Classifier * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.Classifier("example", { * name: "example", * jsonClassifier: { * jsonPath: "example", * }, * }); * ``` * * ### XML Classifier * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.Classifier("example", { * name: "example", * xmlClassifier: { * classification: "example", * rowTag: "example", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Glue Classifiers using their name. For example: * * ```sh * $ pulumi import aws:glue/classifier:Classifier MyClassifier MyClassifier * ``` */ class Classifier extends pulumi.CustomResource { /** * Get an existing Classifier resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Classifier(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Classifier. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Classifier.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["csvClassifier"] = state?.csvClassifier; resourceInputs["grokClassifier"] = state?.grokClassifier; resourceInputs["jsonClassifier"] = state?.jsonClassifier; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["xmlClassifier"] = state?.xmlClassifier; } else { const args = argsOrState; resourceInputs["csvClassifier"] = args?.csvClassifier; resourceInputs["grokClassifier"] = args?.grokClassifier; resourceInputs["jsonClassifier"] = args?.jsonClassifier; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["xmlClassifier"] = args?.xmlClassifier; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Classifier.__pulumiType, name, resourceInputs, opts); } } exports.Classifier = Classifier; /** @internal */ Classifier.__pulumiType = 'aws:glue/classifier:Classifier'; //# sourceMappingURL=classifier.js.map