UNPKG

@pulumi/aws

Version:

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

192 lines • 8.07 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.MLTransform = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Glue ML Transform resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testCatalogDatabase = new aws.glue.CatalogDatabase("test", {name: "example"}); * const testCatalogTable = new aws.glue.CatalogTable("test", { * name: "example", * databaseName: testCatalogDatabase.name, * owner: "my_owner", * retention: 1, * tableType: "VIRTUAL_VIEW", * viewExpandedText: "view_expanded_text_1", * viewOriginalText: "view_original_text_1", * storageDescriptor: { * bucketColumns: ["bucket_column_1"], * compressed: false, * inputFormat: "SequenceFileInputFormat", * location: "my_location", * numberOfBuckets: 1, * outputFormat: "SequenceFileInputFormat", * storedAsSubDirectories: false, * parameters: { * param1: "param1_val", * }, * columns: [ * { * name: "my_column_1", * type: "int", * comment: "my_column1_comment", * }, * { * name: "my_column_2", * type: "string", * comment: "my_column2_comment", * }, * ], * serDeInfo: { * name: "ser_de_name", * parameters: { * param1: "param_val_1", * }, * serializationLibrary: "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe", * }, * sortColumns: [{ * column: "my_column_1", * sortOrder: 1, * }], * skewedInfo: { * skewedColumnNames: ["my_column_1"], * skewedColumnValueLocationMaps: { * my_column_1: "my_column_1_val_loc_map", * }, * skewedColumnValues: ["skewed_val_1"], * }, * }, * partitionKeys: [ * { * name: "my_column_1", * type: "int", * comment: "my_column_1_comment", * }, * { * name: "my_column_2", * type: "string", * comment: "my_column_2_comment", * }, * ], * parameters: { * param1: "param1_val", * }, * }); * const test = new aws.glue.MLTransform("test", { * name: "example", * roleArn: testAwsIamRole.arn, * inputRecordTables: [{ * databaseName: testCatalogTable.databaseName, * tableName: testCatalogTable.name, * }], * parameters: { * transformType: "FIND_MATCHES", * findMatchesParameters: { * primaryKeyColumnName: "my_column_1", * }, * }, * }, { * dependsOn: [testAwsIamRolePolicyAttachment], * }); * ``` * * ## Import * * Using `pulumi import`, import Glue ML Transforms using `id`. For example: * * ```sh * $ pulumi import aws:glue/mLTransform:MLTransform example tfm-c2cafbe83b1c575f49eaca9939220e2fcd58e2d5 * ``` */ class MLTransform extends pulumi.CustomResource { /** * Get an existing MLTransform 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 MLTransform(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MLTransform. 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'] === MLTransform.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["glueVersion"] = state ? state.glueVersion : undefined; resourceInputs["inputRecordTables"] = state ? state.inputRecordTables : undefined; resourceInputs["labelCount"] = state ? state.labelCount : undefined; resourceInputs["maxCapacity"] = state ? state.maxCapacity : undefined; resourceInputs["maxRetries"] = state ? state.maxRetries : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["numberOfWorkers"] = state ? state.numberOfWorkers : undefined; resourceInputs["parameters"] = state ? state.parameters : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["roleArn"] = state ? state.roleArn : undefined; resourceInputs["schemas"] = state ? state.schemas : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["timeout"] = state ? state.timeout : undefined; resourceInputs["workerType"] = state ? state.workerType : undefined; } else { const args = argsOrState; if ((!args || args.inputRecordTables === undefined) && !opts.urn) { throw new Error("Missing required property 'inputRecordTables'"); } if ((!args || args.parameters === undefined) && !opts.urn) { throw new Error("Missing required property 'parameters'"); } if ((!args || args.roleArn === undefined) && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["glueVersion"] = args ? args.glueVersion : undefined; resourceInputs["inputRecordTables"] = args ? args.inputRecordTables : undefined; resourceInputs["maxCapacity"] = args ? args.maxCapacity : undefined; resourceInputs["maxRetries"] = args ? args.maxRetries : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["numberOfWorkers"] = args ? args.numberOfWorkers : undefined; resourceInputs["parameters"] = args ? args.parameters : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["roleArn"] = args ? args.roleArn : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["timeout"] = args ? args.timeout : undefined; resourceInputs["workerType"] = args ? args.workerType : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["labelCount"] = undefined /*out*/; resourceInputs["schemas"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MLTransform.__pulumiType, name, resourceInputs, opts); } } exports.MLTransform = MLTransform; /** @internal */ MLTransform.__pulumiType = 'aws:glue/mLTransform:MLTransform'; //# sourceMappingURL=mltransform.js.map