@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
161 lines • 5.94 kB
JavaScript
// *** 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.PartitionIndex = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.glue.CatalogDatabase("example", {name: "example"});
* const exampleCatalogTable = new aws.glue.CatalogTable("example", {
* name: "example",
* databaseName: example.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 examplePartitionIndex = new aws.glue.PartitionIndex("example", {
* databaseName: example.name,
* tableName: exampleCatalogTable.name,
* partitionIndex: {
* indexName: "example",
* keys: [
* "my_column_1",
* "my_column_2",
* ],
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import Glue Partition Indexes using the catalog ID (usually AWS account ID), database name, table name, and index name. For example:
*
* ```sh
* $ pulumi import aws:glue/partitionIndex:PartitionIndex example 123456789012:MyDatabase:MyTable:index-name
* ```
*/
class PartitionIndex extends pulumi.CustomResource {
/**
* Get an existing PartitionIndex 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 PartitionIndex(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of PartitionIndex. 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'] === PartitionIndex.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["catalogId"] = state?.catalogId;
resourceInputs["databaseName"] = state?.databaseName;
resourceInputs["partitionIndex"] = state?.partitionIndex;
resourceInputs["region"] = state?.region;
resourceInputs["tableName"] = state?.tableName;
}
else {
const args = argsOrState;
if (args?.databaseName === undefined && !opts.urn) {
throw new Error("Missing required property 'databaseName'");
}
if (args?.partitionIndex === undefined && !opts.urn) {
throw new Error("Missing required property 'partitionIndex'");
}
if (args?.tableName === undefined && !opts.urn) {
throw new Error("Missing required property 'tableName'");
}
resourceInputs["catalogId"] = args?.catalogId;
resourceInputs["databaseName"] = args?.databaseName;
resourceInputs["partitionIndex"] = args?.partitionIndex;
resourceInputs["region"] = args?.region;
resourceInputs["tableName"] = args?.tableName;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(PartitionIndex.__pulumiType, name, resourceInputs, opts);
}
}
exports.PartitionIndex = PartitionIndex;
/** @internal */
PartitionIndex.__pulumiType = 'aws:glue/partitionIndex:PartitionIndex';
//# sourceMappingURL=partitionIndex.js.map
;