UNPKG

@pulumi/aws

Version:

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

108 lines 5.11 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.CatalogDatabase = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Glue Catalog Database Resource. You can refer to the [Glue Developer Guide](http://docs.aws.amazon.com/glue/latest/dg/populate-data-catalog.html) for a full explanation of the Glue Data Catalog functionality * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.CatalogDatabase("example", {name: "MyCatalogDatabase"}); * ``` * * ### Create Table Default Permissions * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.glue.CatalogDatabase("example", { * name: "MyCatalogDatabase", * createTableDefaultPermissions: [{ * permissions: ["SELECT"], * principal: { * dataLakePrincipalIdentifier: "IAM_ALLOWED_PRINCIPALS", * }, * }], * }); * ``` * * ## Import * * Using `pulumi import`, import Glue Catalog Databases using the `catalog_id:name`. If you have not set a Catalog ID specify the AWS Account ID that the database is in. For example: * * ```sh * $ pulumi import aws:glue/catalogDatabase:CatalogDatabase database 123456789012:my_database * ``` */ class CatalogDatabase extends pulumi.CustomResource { /** * Get an existing CatalogDatabase 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 CatalogDatabase(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of CatalogDatabase. 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'] === CatalogDatabase.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["catalogId"] = state ? state.catalogId : undefined; resourceInputs["createTableDefaultPermissions"] = state ? state.createTableDefaultPermissions : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["federatedDatabase"] = state ? state.federatedDatabase : undefined; resourceInputs["locationUri"] = state ? state.locationUri : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["parameters"] = state ? state.parameters : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["targetDatabase"] = state ? state.targetDatabase : undefined; } else { const args = argsOrState; resourceInputs["catalogId"] = args ? args.catalogId : undefined; resourceInputs["createTableDefaultPermissions"] = args ? args.createTableDefaultPermissions : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["federatedDatabase"] = args ? args.federatedDatabase : undefined; resourceInputs["locationUri"] = args ? args.locationUri : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["parameters"] = args ? args.parameters : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["targetDatabase"] = args ? args.targetDatabase : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(CatalogDatabase.__pulumiType, name, resourceInputs, opts); } } exports.CatalogDatabase = CatalogDatabase; /** @internal */ CatalogDatabase.__pulumiType = 'aws:glue/catalogDatabase:CatalogDatabase'; //# sourceMappingURL=catalogDatabase.js.map