CatalogDatabase class
Provides a Glue Catalog Database Resource. You can refer to the Glue Developer Guide for a full explanation of the Glue Data Catalog functionality
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.CatalogDatabase("example", {name: "MyCatalogDatabase"});
import pulumi
import pulumi_aws as aws
example = aws.glue.CatalogDatabase("example", name="MyCatalogDatabase")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.CatalogDatabase("example", new()
{
Name = "MyCatalogDatabase",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/glue"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := glue.NewCatalogDatabase(ctx, "example", &glue.CatalogDatabaseArgs{
Name: pulumi.String("MyCatalogDatabase"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_catalogdatabase" "example" {
name = "MyCatalogDatabase"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.CatalogDatabase;
import com.pulumi.aws.glue.CatalogDatabaseArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CatalogDatabase("example", CatalogDatabaseArgs.builder()
.name("MyCatalogDatabase")
.build());
}
}
resources:
example:
type: aws:glue:CatalogDatabase
properties:
name: MyCatalogDatabase
Create Table Default Permissions
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.glue.CatalogDatabase("example", {
createTableDefaultPermissions: [{
principal: {
dataLakePrincipalIdentifier: "IAM_ALLOWED_PRINCIPALS",
},
permissions: ["SELECT"],
}],
name: "MyCatalogDatabase",
});
import pulumi
import pulumi_aws as aws
example = aws.glue.CatalogDatabase("example",
create_table_default_permissions=[{
"principal": {
"data_lake_principal_identifier": "IAM_ALLOWED_PRINCIPALS",
},
"permissions": ["SELECT"],
}],
name="MyCatalogDatabase")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Glue.CatalogDatabase("example", new()
{
CreateTableDefaultPermissions = new[]
{
new Aws.Glue.Inputs.CatalogDatabaseCreateTableDefaultPermissionArgs
{
Principal = new Aws.Glue.Inputs.CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs
{
DataLakePrincipalIdentifier = "IAM_ALLOWED_PRINCIPALS",
},
Permissions = new[]
{
"SELECT",
},
},
},
Name = "MyCatalogDatabase",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/glue"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := glue.NewCatalogDatabase(ctx, "example", &glue.CatalogDatabaseArgs{
CreateTableDefaultPermissions: glue.CatalogDatabaseCreateTableDefaultPermissionArray{
&glue.CatalogDatabaseCreateTableDefaultPermissionArgs{
Principal: &glue.CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs{
DataLakePrincipalIdentifier: pulumi.String("IAM_ALLOWED_PRINCIPALS"),
},
Permissions: pulumi.StringArray{
pulumi.String("SELECT"),
},
},
},
Name: pulumi.String("MyCatalogDatabase"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_glue_catalogdatabase" "example" {
create_table_default_permissions {
principal = {
data_lake_principal_identifier = "IAM_ALLOWED_PRINCIPALS"
}
permissions = ["SELECT"]
}
name = "MyCatalogDatabase"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.glue.CatalogDatabase;
import com.pulumi.aws.glue.CatalogDatabaseArgs;
import com.pulumi.aws.glue.inputs.CatalogDatabaseCreateTableDefaultPermissionArgs;
import com.pulumi.aws.glue.inputs.CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CatalogDatabase("example", CatalogDatabaseArgs.builder()
.createTableDefaultPermissions(CatalogDatabaseCreateTableDefaultPermissionArgs.builder()
.principal(CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs.builder()
.dataLakePrincipalIdentifier("IAM_ALLOWED_PRINCIPALS")
.build())
.permissions("SELECT")
.build())
.name("MyCatalogDatabase")
.build());
}
}
resources:
example:
type: aws:glue:CatalogDatabase
properties:
createTableDefaultPermissions:
- principal:
dataLakePrincipalIdentifier: IAM_ALLOWED_PRINCIPALS
permissions:
- SELECT
name: MyCatalogDatabase
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:
$ pulumi import aws:glue/catalogDatabase:CatalogDatabase database 123456789012:my_database
Constructors
- CatalogDatabase(String name, {CatalogDatabaseArgs? args, CustomResourceOptions? options})
-
Creates a new CatalogDatabase.
nameThe Pulumi resource name.argsArguments used to configure this CatalogDatabase. The set of arguments for CatalogDatabase.optionsResource options controlling this resource's behavior. - CatalogDatabase.reference(String urn)
- Creates a typed reference to an existing CatalogDatabase resource.
Properties
-
arn
↔ Output<
String> -
ARN of the Glue Catalog Database.
latefinal
-
catalogId
↔ Output<
String> -
ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTableDefaultPermissions
↔ Output<
List< CatalogDatabaseCreateTableDefaultPermission> > -
Creates a set of default permissions on the table for principals. See
createTableDefaultPermissionbelow.latefinal -
description
↔ Output<
String?> -
Description of the database.
latefinal
-
federatedDatabase
↔ Output<
CatalogDatabaseFederatedDatabase?> -
Configuration block that references an entity outside the AWS Glue Data Catalog. See
federatedDatabasebelow.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
locationUri
↔ Output<
String> -
Location of the database (for example, an HDFS path).
latefinal
-
name
↔ Output<
String> -
Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.
latefinal
-
parameters
↔ Output<
Map< String, String> ?> -
List of key-value pairs that define parameters and properties of the database.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Key-value map of resource tags. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
targetDatabase
↔ Output<
CatalogDatabaseTargetDatabase?> -
Configuration block for a target database for resource linking. See
targetDatabasebelow.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {CatalogDatabaseState? state, CustomResourceOptions? options}) → CatalogDatabase -
Gets an existing CatalogDatabase resource's state with the given
nameandid.