UNPKG

@pulumi/aws

Version:

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

108 lines 4.67 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, { ...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?.arn; resourceInputs["catalogId"] = state?.catalogId; resourceInputs["createTableDefaultPermissions"] = state?.createTableDefaultPermissions; resourceInputs["description"] = state?.description; resourceInputs["federatedDatabase"] = state?.federatedDatabase; resourceInputs["locationUri"] = state?.locationUri; resourceInputs["name"] = state?.name; resourceInputs["parameters"] = state?.parameters; resourceInputs["region"] = state?.region; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["targetDatabase"] = state?.targetDatabase; } else { const args = argsOrState; resourceInputs["catalogId"] = args?.catalogId; resourceInputs["createTableDefaultPermissions"] = args?.createTableDefaultPermissions; resourceInputs["description"] = args?.description; resourceInputs["federatedDatabase"] = args?.federatedDatabase; resourceInputs["locationUri"] = args?.locationUri; resourceInputs["name"] = args?.name; resourceInputs["parameters"] = args?.parameters; resourceInputs["region"] = args?.region; resourceInputs["tags"] = args?.tags; resourceInputs["targetDatabase"] = args?.targetDatabase; 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