aws logo
AWS Classic v5.32.0, Mar 17 23

aws.glue.CatalogDatabase

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

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var awsGlueCatalogDatabase = new Aws.Glue.CatalogDatabase("awsGlueCatalogDatabase", new()
    {
        Name = "MyCatalogDatabase",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/glue"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := glue.NewCatalogDatabase(ctx, "awsGlueCatalogDatabase", &glue.CatalogDatabaseArgs{
			Name: pulumi.String("MyCatalogDatabase"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.List;
import java.util.ArrayList;
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 awsGlueCatalogDatabase = new CatalogDatabase("awsGlueCatalogDatabase", CatalogDatabaseArgs.builder()        
            .name("MyCatalogDatabase")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

aws_glue_catalog_database = aws.glue.CatalogDatabase("awsGlueCatalogDatabase", name="MyCatalogDatabase")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const awsGlueCatalogDatabase = new aws.glue.CatalogDatabase("awsGlueCatalogDatabase", {name: "MyCatalogDatabase"});
resources:
  awsGlueCatalogDatabase:
    type: aws:glue:CatalogDatabase
    properties:
      name: MyCatalogDatabase

Create Table Default Permissions

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var awsGlueCatalogDatabase = new Aws.Glue.CatalogDatabase("awsGlueCatalogDatabase", new()
    {
        CreateTableDefaultPermissions = new[]
        {
            new Aws.Glue.Inputs.CatalogDatabaseCreateTableDefaultPermissionArgs
            {
                Permissions = new[]
                {
                    "SELECT",
                },
                Principal = new Aws.Glue.Inputs.CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs
                {
                    DataLakePrincipalIdentifier = "IAM_ALLOWED_PRINCIPALS",
                },
            },
        },
        Name = "MyCatalogDatabase",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/glue"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := glue.NewCatalogDatabase(ctx, "awsGlueCatalogDatabase", &glue.CatalogDatabaseArgs{
			CreateTableDefaultPermissions: glue.CatalogDatabaseCreateTableDefaultPermissionArray{
				&glue.CatalogDatabaseCreateTableDefaultPermissionArgs{
					Permissions: pulumi.StringArray{
						pulumi.String("SELECT"),
					},
					Principal: &glue.CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs{
						DataLakePrincipalIdentifier: pulumi.String("IAM_ALLOWED_PRINCIPALS"),
					},
				},
			},
			Name: pulumi.String("MyCatalogDatabase"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.List;
import java.util.ArrayList;
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 awsGlueCatalogDatabase = new CatalogDatabase("awsGlueCatalogDatabase", CatalogDatabaseArgs.builder()        
            .createTableDefaultPermissions(CatalogDatabaseCreateTableDefaultPermissionArgs.builder()
                .permissions("SELECT")
                .principal(CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs.builder()
                    .dataLakePrincipalIdentifier("IAM_ALLOWED_PRINCIPALS")
                    .build())
                .build())
            .name("MyCatalogDatabase")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

aws_glue_catalog_database = aws.glue.CatalogDatabase("awsGlueCatalogDatabase",
    create_table_default_permissions=[aws.glue.CatalogDatabaseCreateTableDefaultPermissionArgs(
        permissions=["SELECT"],
        principal=aws.glue.CatalogDatabaseCreateTableDefaultPermissionPrincipalArgs(
            data_lake_principal_identifier="IAM_ALLOWED_PRINCIPALS",
        ),
    )],
    name="MyCatalogDatabase")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const awsGlueCatalogDatabase = new aws.glue.CatalogDatabase("awsGlueCatalogDatabase", {
    createTableDefaultPermissions: [{
        permissions: ["SELECT"],
        principal: {
            dataLakePrincipalIdentifier: "IAM_ALLOWED_PRINCIPALS",
        },
    }],
    name: "MyCatalogDatabase",
});
resources:
  awsGlueCatalogDatabase:
    type: aws:glue:CatalogDatabase
    properties:
      createTableDefaultPermissions:
        - permissions:
            - SELECT
          principal:
            dataLakePrincipalIdentifier: IAM_ALLOWED_PRINCIPALS
      name: MyCatalogDatabase

Create CatalogDatabase Resource

new CatalogDatabase(name: string, args?: CatalogDatabaseArgs, opts?: CustomResourceOptions);
@overload
def CatalogDatabase(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    catalog_id: Optional[str] = None,
                    create_table_default_permissions: Optional[Sequence[CatalogDatabaseCreateTableDefaultPermissionArgs]] = None,
                    description: Optional[str] = None,
                    location_uri: Optional[str] = None,
                    name: Optional[str] = None,
                    parameters: Optional[Mapping[str, str]] = None,
                    target_database: Optional[CatalogDatabaseTargetDatabaseArgs] = None)
@overload
def CatalogDatabase(resource_name: str,
                    args: Optional[CatalogDatabaseArgs] = None,
                    opts: Optional[ResourceOptions] = None)
func NewCatalogDatabase(ctx *Context, name string, args *CatalogDatabaseArgs, opts ...ResourceOption) (*CatalogDatabase, error)
public CatalogDatabase(string name, CatalogDatabaseArgs? args = null, CustomResourceOptions? opts = null)
public CatalogDatabase(String name, CatalogDatabaseArgs args)
public CatalogDatabase(String name, CatalogDatabaseArgs args, CustomResourceOptions options)
type: aws:glue:CatalogDatabase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args CatalogDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args CatalogDatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CatalogDatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CatalogDatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args CatalogDatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

CatalogDatabase Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The CatalogDatabase resource accepts the following input properties:

CatalogId string

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

CreateTableDefaultPermissions List<CatalogDatabaseCreateTableDefaultPermissionArgs>

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

Description string

Description of the database.

LocationUri string

Location of the database (for example, an HDFS path).

Name string

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

Parameters Dictionary<string, string>

List of key-value pairs that define parameters and properties of the database.

TargetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

CatalogId string

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

CreateTableDefaultPermissions []CatalogDatabaseCreateTableDefaultPermissionArgs

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

Description string

Description of the database.

LocationUri string

Location of the database (for example, an HDFS path).

Name string

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

Parameters map[string]string

List of key-value pairs that define parameters and properties of the database.

TargetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

catalogId String

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

createTableDefaultPermissions List<CatalogDatabaseCreateTableDefaultPermissionArgs>

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description String

Description of the database.

locationUri String

Location of the database (for example, an HDFS path).

name String

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters Map<String,String>

List of key-value pairs that define parameters and properties of the database.

targetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

catalogId string

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

createTableDefaultPermissions CatalogDatabaseCreateTableDefaultPermissionArgs[]

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description string

Description of the database.

locationUri string

Location of the database (for example, an HDFS path).

name string

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters {[key: string]: string}

List of key-value pairs that define parameters and properties of the database.

targetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

catalog_id str

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

create_table_default_permissions Sequence[CatalogDatabaseCreateTableDefaultPermissionArgs]

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description str

Description of the database.

location_uri str

Location of the database (for example, an HDFS path).

name str

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters Mapping[str, str]

List of key-value pairs that define parameters and properties of the database.

target_database CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

catalogId String

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

createTableDefaultPermissions List<Property Map>

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description String

Description of the database.

locationUri String

Location of the database (for example, an HDFS path).

name String

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters Map<String>

List of key-value pairs that define parameters and properties of the database.

targetDatabase Property Map

Configuration block for a target database for resource linking. See target_database below.

Outputs

All input properties are implicitly available as output properties. Additionally, the CatalogDatabase resource produces the following output properties:

Arn string

ARN of the Glue Catalog Database.

Id string

The provider-assigned unique ID for this managed resource.

Arn string

ARN of the Glue Catalog Database.

Id string

The provider-assigned unique ID for this managed resource.

arn String

ARN of the Glue Catalog Database.

id String

The provider-assigned unique ID for this managed resource.

arn string

ARN of the Glue Catalog Database.

id string

The provider-assigned unique ID for this managed resource.

arn str

ARN of the Glue Catalog Database.

id str

The provider-assigned unique ID for this managed resource.

arn String

ARN of the Glue Catalog Database.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing CatalogDatabase Resource

Get an existing CatalogDatabase resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CatalogDatabaseState, opts?: CustomResourceOptions): CatalogDatabase
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        catalog_id: Optional[str] = None,
        create_table_default_permissions: Optional[Sequence[CatalogDatabaseCreateTableDefaultPermissionArgs]] = None,
        description: Optional[str] = None,
        location_uri: Optional[str] = None,
        name: Optional[str] = None,
        parameters: Optional[Mapping[str, str]] = None,
        target_database: Optional[CatalogDatabaseTargetDatabaseArgs] = None) -> CatalogDatabase
func GetCatalogDatabase(ctx *Context, name string, id IDInput, state *CatalogDatabaseState, opts ...ResourceOption) (*CatalogDatabase, error)
public static CatalogDatabase Get(string name, Input<string> id, CatalogDatabaseState? state, CustomResourceOptions? opts = null)
public static CatalogDatabase get(String name, Output<String> id, CatalogDatabaseState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string

ARN of the Glue Catalog Database.

CatalogId string

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

CreateTableDefaultPermissions List<CatalogDatabaseCreateTableDefaultPermissionArgs>

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

Description string

Description of the database.

LocationUri string

Location of the database (for example, an HDFS path).

Name string

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

Parameters Dictionary<string, string>

List of key-value pairs that define parameters and properties of the database.

TargetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

Arn string

ARN of the Glue Catalog Database.

CatalogId string

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

CreateTableDefaultPermissions []CatalogDatabaseCreateTableDefaultPermissionArgs

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

Description string

Description of the database.

LocationUri string

Location of the database (for example, an HDFS path).

Name string

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

Parameters map[string]string

List of key-value pairs that define parameters and properties of the database.

TargetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

arn String

ARN of the Glue Catalog Database.

catalogId String

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

createTableDefaultPermissions List<CatalogDatabaseCreateTableDefaultPermissionArgs>

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description String

Description of the database.

locationUri String

Location of the database (for example, an HDFS path).

name String

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters Map<String,String>

List of key-value pairs that define parameters and properties of the database.

targetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

arn string

ARN of the Glue Catalog Database.

catalogId string

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

createTableDefaultPermissions CatalogDatabaseCreateTableDefaultPermissionArgs[]

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description string

Description of the database.

locationUri string

Location of the database (for example, an HDFS path).

name string

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters {[key: string]: string}

List of key-value pairs that define parameters and properties of the database.

targetDatabase CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

arn str

ARN of the Glue Catalog Database.

catalog_id str

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

create_table_default_permissions Sequence[CatalogDatabaseCreateTableDefaultPermissionArgs]

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description str

Description of the database.

location_uri str

Location of the database (for example, an HDFS path).

name str

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters Mapping[str, str]

List of key-value pairs that define parameters and properties of the database.

target_database CatalogDatabaseTargetDatabaseArgs

Configuration block for a target database for resource linking. See target_database below.

arn String

ARN of the Glue Catalog Database.

catalogId String

ID of the Glue Catalog to create the database in. If omitted, this defaults to the AWS Account ID.

createTableDefaultPermissions List<Property Map>

Creates a set of default permissions on the table for principals. See create_table_default_permission below.

description String

Description of the database.

locationUri String

Location of the database (for example, an HDFS path).

name String

Name of the database. The acceptable characters are lowercase letters, numbers, and the underscore character.

parameters Map<String>

List of key-value pairs that define parameters and properties of the database.

targetDatabase Property Map

Configuration block for a target database for resource linking. See target_database below.

Supporting Types

CatalogDatabaseCreateTableDefaultPermission

Permissions List<string>

The permissions that are granted to the principal.

Principal CatalogDatabaseCreateTableDefaultPermissionPrincipal

The principal who is granted permissions.. See principal below.

Permissions []string

The permissions that are granted to the principal.

Principal CatalogDatabaseCreateTableDefaultPermissionPrincipal

The principal who is granted permissions.. See principal below.

permissions List<String>

The permissions that are granted to the principal.

principal CatalogDatabaseCreateTableDefaultPermissionPrincipal

The principal who is granted permissions.. See principal below.

permissions string[]

The permissions that are granted to the principal.

principal CatalogDatabaseCreateTableDefaultPermissionPrincipal

The principal who is granted permissions.. See principal below.

permissions Sequence[str]

The permissions that are granted to the principal.

principal CatalogDatabaseCreateTableDefaultPermissionPrincipal

The principal who is granted permissions.. See principal below.

permissions List<String>

The permissions that are granted to the principal.

principal Property Map

The principal who is granted permissions.. See principal below.

CatalogDatabaseCreateTableDefaultPermissionPrincipal

DataLakePrincipalIdentifier string

An identifier for the Lake Formation principal.

DataLakePrincipalIdentifier string

An identifier for the Lake Formation principal.

dataLakePrincipalIdentifier String

An identifier for the Lake Formation principal.

dataLakePrincipalIdentifier string

An identifier for the Lake Formation principal.

data_lake_principal_identifier str

An identifier for the Lake Formation principal.

dataLakePrincipalIdentifier String

An identifier for the Lake Formation principal.

CatalogDatabaseTargetDatabase

CatalogId string

ID of the Data Catalog in which the database resides.

DatabaseName string

Name of the catalog database.

CatalogId string

ID of the Data Catalog in which the database resides.

DatabaseName string

Name of the catalog database.

catalogId String

ID of the Data Catalog in which the database resides.

databaseName String

Name of the catalog database.

catalogId string

ID of the Data Catalog in which the database resides.

databaseName string

Name of the catalog database.

catalog_id str

ID of the Data Catalog in which the database resides.

database_name str

Name of the catalog database.

catalogId String

ID of the Data Catalog in which the database resides.

databaseName String

Name of the catalog database.

Import

Glue Catalog Databases can be imported using the catalog_id:name. If you have not set a Catalog ID specify the AWS Account ID that the database is in, e.g.,

 $ pulumi import aws:glue/catalogDatabase:CatalogDatabase database 123456789012:my_database

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.