import * as pulumi from "@pulumi/pulumi"; /** * Manages an Amazon Redshift namespace registration to the AWS Glue Data Catalog. Use this resource to enable access to a Redshift data warehouse using the Apache Iceberg REST API. * * > **NOTE:** This resource has limited drift detection capabilities. AWS does not provide a reliable API to verify registration status after creation. The resource verifies that the underlying cluster or namespace exists and that an internal data share was created, but cannot detect if the registration was removed outside of Terraform. * * ## Example Usage * * ### Serverless Namespace * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const current = aws.getCallerIdentity({}); * const example = new aws.redshiftserverless.Namespace("example", { * namespaceName: "example", * dbName: "example", * }); * const exampleWorkgroup = new aws.redshiftserverless.Workgroup("example", { * namespaceName: example.namespaceName, * workgroupName: "example", * }); * const exampleNamespaceRegistration = new aws.redshift.NamespaceRegistration("example", { * consumerIdentifier: std.format({ * input: "DataCatalog/%s", * args: [current.then(current => current.accountId)], * }).then(invoke => invoke.result), * namespaceType: "serverless", * serverlessNamespaceIdentifier: example.namespaceName, * serverlessWorkgroupIdentifier: exampleWorkgroup.workgroupName, * }); * ``` * * ### Provisioned Cluster * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const current = aws.getCallerIdentity({}); * const example = new aws.redshift.Cluster("example", { * clusterIdentifier: "example", * databaseName: "example", * masterUsername: "exampleuser", * masterPassword: "ExamplePassword123!", * nodeType: "dc2.large", * clusterType: "single-node", * }); * const exampleNamespaceRegistration = new aws.redshift.NamespaceRegistration("example", { * consumerIdentifier: std.format({ * input: "DataCatalog/%s", * args: [current.then(current => current.accountId)], * }).then(invoke => invoke.result), * namespaceType: "provisioned", * provisionedClusterIdentifier: example.clusterIdentifier, * }); * ``` * * ## Import * * For provisioned clusters: * * ### Identity Schema * * #### Required * * - `consumerIdentifier` (String) Consumer identifier for the registration. * - `namespaceType` (String) Type of namespace being registered. Valid values: `serverless`, `provisioned`. * * #### Optional * * - `accountId` (String) AWS Account where this resource is managed. * - `provisionedClusterIdentifier` (String) Identifier of the provisioned cluster. Required when `namespaceType` is `provisioned`. * - `region` (String) Region where this resource is managed. * - `serverlessNamespaceIdentifier` (String) Identifier of the serverless namespace. Required when `namespaceType` is `serverless`. * - `serverlessWorkgroupIdentifier` (String) Identifier of the serverless workgroup. Required when `namespaceType` is `serverless`. * * For provisioned clusters: * * Using `pulumi import`, import Redshift Namespace Registration using the composite ID. For example: * * For serverless namespaces: * * ```sh * $ pulumi import aws:redshift/namespaceRegistration:NamespaceRegistration example DataCatalog/123456789012,example-namespace,example-workgroup * ``` * * For provisioned clusters: * * ```sh * $ pulumi import aws:redshift/namespaceRegistration:NamespaceRegistration example DataCatalog/123456789012,example-cluster * ``` */ export declare class NamespaceRegistration extends pulumi.CustomResource { /** * Get an existing NamespaceRegistration 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: string, id: pulumi.Input, state?: NamespaceRegistrationState, opts?: pulumi.CustomResourceOptions): NamespaceRegistration; /** * Returns true if the given object is an instance of NamespaceRegistration. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is NamespaceRegistration; /** * Consumer identifier for the registration. Typically in the format `DataCatalog/`. */ readonly consumerIdentifier: pulumi.Output; /** * Type of namespace being registered. Valid values: `serverless`, `provisioned`. * * The following arguments are optional: */ readonly namespaceType: pulumi.Output; /** * Identifier of the provisioned cluster. Required when `namespaceType` is `provisioned`. */ readonly provisionedClusterIdentifier: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Identifier of the serverless namespace. Required when `namespaceType` is `serverless`. Can be either the namespace name or namespace ID (UUID). */ readonly serverlessNamespaceIdentifier: pulumi.Output; /** * Identifier of the serverless workgroup. Required when `namespaceType` is `serverless`. */ readonly serverlessWorkgroupIdentifier: pulumi.Output; /** * Create a NamespaceRegistration resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: NamespaceRegistrationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NamespaceRegistration resources. */ export interface NamespaceRegistrationState { /** * Consumer identifier for the registration. Typically in the format `DataCatalog/`. */ consumerIdentifier?: pulumi.Input; /** * Type of namespace being registered. Valid values: `serverless`, `provisioned`. * * The following arguments are optional: */ namespaceType?: pulumi.Input; /** * Identifier of the provisioned cluster. Required when `namespaceType` is `provisioned`. */ provisionedClusterIdentifier?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Identifier of the serverless namespace. Required when `namespaceType` is `serverless`. Can be either the namespace name or namespace ID (UUID). */ serverlessNamespaceIdentifier?: pulumi.Input; /** * Identifier of the serverless workgroup. Required when `namespaceType` is `serverless`. */ serverlessWorkgroupIdentifier?: pulumi.Input; } /** * The set of arguments for constructing a NamespaceRegistration resource. */ export interface NamespaceRegistrationArgs { /** * Consumer identifier for the registration. Typically in the format `DataCatalog/`. */ consumerIdentifier: pulumi.Input; /** * Type of namespace being registered. Valid values: `serverless`, `provisioned`. * * The following arguments are optional: */ namespaceType: pulumi.Input; /** * Identifier of the provisioned cluster. Required when `namespaceType` is `provisioned`. */ provisionedClusterIdentifier?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Identifier of the serverless namespace. Required when `namespaceType` is `serverless`. Can be either the namespace name or namespace ID (UUID). */ serverlessNamespaceIdentifier?: pulumi.Input; /** * Identifier of the serverless workgroup. Required when `namespaceType` is `serverless`. */ serverlessWorkgroupIdentifier?: pulumi.Input; } //# sourceMappingURL=namespaceRegistration.d.ts.map