CfnDatabasePropsMixin

class aws_cdk.mixins_preview.aws_glue.mixins.CfnDatabasePropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Glue::Database resource specifies a logical grouping of tables in AWS Glue .

For more information, see Defining a Database in Your Data Catalog and Database Structure in the AWS Glue Developer Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-glue-database.html

CloudformationResource:

AWS::Glue::Database

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

# parameters: Any

cfn_database_props_mixin = glue_mixins.CfnDatabasePropsMixin(glue_mixins.CfnDatabaseMixinProps(
    catalog_id="catalogId",
    database_input=glue_mixins.CfnDatabasePropsMixin.DatabaseInputProperty(
        create_table_default_permissions=[glue_mixins.CfnDatabasePropsMixin.PrincipalPrivilegesProperty(
            permissions=["permissions"],
            principal=glue_mixins.CfnDatabasePropsMixin.DataLakePrincipalProperty(
                data_lake_principal_identifier="dataLakePrincipalIdentifier"
            )
        )],
        description="description",
        federated_database=glue_mixins.CfnDatabasePropsMixin.FederatedDatabaseProperty(
            connection_name="connectionName",
            identifier="identifier"
        ),
        location_uri="locationUri",
        name="name",
        parameters=parameters,
        target_database=glue_mixins.CfnDatabasePropsMixin.DatabaseIdentifierProperty(
            catalog_id="catalogId",
            database_name="databaseName",
            region="region"
        )
    ),
    database_name="databaseName"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Glue::Database.

Parameters:
  • props (Union[CfnDatabaseMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['catalogId', 'databaseInput', 'databaseName']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

DataLakePrincipalProperty

class CfnDatabasePropsMixin.DataLakePrincipalProperty(*, data_lake_principal_identifier=None)

Bases: object

The AWS Lake Formation principal.

Parameters:

data_lake_principal_identifier (Optional[str]) – An identifier for the AWS Lake Formation principal.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-datalakeprincipal.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

data_lake_principal_property = glue_mixins.CfnDatabasePropsMixin.DataLakePrincipalProperty(
    data_lake_principal_identifier="dataLakePrincipalIdentifier"
)

Attributes

data_lake_principal_identifier

An identifier for the AWS Lake Formation principal.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-datalakeprincipal.html#cfn-glue-database-datalakeprincipal-datalakeprincipalidentifier

DatabaseIdentifierProperty

class CfnDatabasePropsMixin.DatabaseIdentifierProperty(*, catalog_id=None, database_name=None, region=None)

Bases: object

A structure that describes a target database for resource linking.

Parameters:
  • catalog_id (Optional[str]) – The ID of the Data Catalog in which the database resides.

  • database_name (Optional[str]) – The name of the catalog database.

  • region (Optional[str]) – The Region of the database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

database_identifier_property = glue_mixins.CfnDatabasePropsMixin.DatabaseIdentifierProperty(
    catalog_id="catalogId",
    database_name="databaseName",
    region="region"
)

Attributes

catalog_id

The ID of the Data Catalog in which the database resides.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html#cfn-glue-database-databaseidentifier-catalogid

database_name

The name of the catalog database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html#cfn-glue-database-databaseidentifier-databasename

region

The Region of the database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseidentifier.html#cfn-glue-database-databaseidentifier-region

DatabaseInputProperty

class CfnDatabasePropsMixin.DatabaseInputProperty(*, create_table_default_permissions=None, description=None, federated_database=None, location_uri=None, name=None, parameters=None, target_database=None)

Bases: object

The structure used to create or update a database.

Parameters:
  • create_table_default_permissions (Union[IResolvable, Sequence[Union[IResolvable, PrincipalPrivilegesProperty, Dict[str, Any]]], None]) – Creates a set of default permissions on the table for principals. Used by AWS Lake Formation . Not used in the normal course of AWS Glue operations.

  • description (Optional[str]) – A description of the database.

  • federated_database (Union[IResolvable, FederatedDatabaseProperty, Dict[str, Any], None]) – A FederatedDatabase structure that references an entity outside the AWS Glue Data Catalog .

  • location_uri (Optional[str]) – The location of the database (for example, an HDFS path).

  • name (Optional[str]) – The name of the database. For Hive compatibility, this is folded to lowercase when it is stored.

  • parameters (Any) – These key-value pairs define parameters and properties of the database.

  • target_database (Union[IResolvable, DatabaseIdentifierProperty, Dict[str, Any], None]) – A DatabaseIdentifier structure that describes a target database for resource linking.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

# parameters: Any

database_input_property = glue_mixins.CfnDatabasePropsMixin.DatabaseInputProperty(
    create_table_default_permissions=[glue_mixins.CfnDatabasePropsMixin.PrincipalPrivilegesProperty(
        permissions=["permissions"],
        principal=glue_mixins.CfnDatabasePropsMixin.DataLakePrincipalProperty(
            data_lake_principal_identifier="dataLakePrincipalIdentifier"
        )
    )],
    description="description",
    federated_database=glue_mixins.CfnDatabasePropsMixin.FederatedDatabaseProperty(
        connection_name="connectionName",
        identifier="identifier"
    ),
    location_uri="locationUri",
    name="name",
    parameters=parameters,
    target_database=glue_mixins.CfnDatabasePropsMixin.DatabaseIdentifierProperty(
        catalog_id="catalogId",
        database_name="databaseName",
        region="region"
    )
)

Attributes

create_table_default_permissions

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

Used by AWS Lake Formation . Not used in the normal course of AWS Glue operations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-createtabledefaultpermissions

description

A description of the database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-description

federated_database

A FederatedDatabase structure that references an entity outside the AWS Glue Data Catalog .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-federateddatabase

location_uri

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-locationuri

name

The name of the database.

For Hive compatibility, this is folded to lowercase when it is stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-name

parameters

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-parameters

target_database

A DatabaseIdentifier structure that describes a target database for resource linking.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-databaseinput.html#cfn-glue-database-databaseinput-targetdatabase

FederatedDatabaseProperty

class CfnDatabasePropsMixin.FederatedDatabaseProperty(*, connection_name=None, identifier=None)

Bases: object

A FederatedDatabase structure that references an entity outside the AWS Glue Data Catalog .

Parameters:
  • connection_name (Optional[str]) – The name of the connection to the external metastore.

  • identifier (Optional[str]) – A unique identifier for the federated database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-federateddatabase.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

federated_database_property = glue_mixins.CfnDatabasePropsMixin.FederatedDatabaseProperty(
    connection_name="connectionName",
    identifier="identifier"
)

Attributes

connection_name

The name of the connection to the external metastore.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-federateddatabase.html#cfn-glue-database-federateddatabase-connectionname

identifier

A unique identifier for the federated database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-federateddatabase.html#cfn-glue-database-federateddatabase-identifier

PrincipalPrivilegesProperty

class CfnDatabasePropsMixin.PrincipalPrivilegesProperty(*, permissions=None, principal=None)

Bases: object

the permissions granted to a principal.

Parameters:
  • permissions (Optional[Sequence[str]]) – The permissions that are granted to the principal.

  • principal (Union[IResolvable, DataLakePrincipalProperty, Dict[str, Any], None]) – The principal who is granted permissions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-principalprivileges.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_glue import mixins as glue_mixins

principal_privileges_property = glue_mixins.CfnDatabasePropsMixin.PrincipalPrivilegesProperty(
    permissions=["permissions"],
    principal=glue_mixins.CfnDatabasePropsMixin.DataLakePrincipalProperty(
        data_lake_principal_identifier="dataLakePrincipalIdentifier"
    )
)

Attributes

permissions

The permissions that are granted to the principal.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-principalprivileges.html#cfn-glue-database-principalprivileges-permissions

principal

The principal who is granted permissions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-database-principalprivileges.html#cfn-glue-database-principalprivileges-principal