# DatabaseInputProperty

The structure used to create or update a database.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_glue as glue } from 'aws-cdk-lib';

declare const parameters: any;
const databaseInputProperty: glue.CfnDatabase.DatabaseInputProperty = {
  createTableDefaultPermissions: [{
    permissions: ['permissions'],
    principal: {
      dataLakePrincipalIdentifier: 'dataLakePrincipalIdentifier',
    },
  }],
  description: 'description',
  federatedDatabase: {
    connectionName: 'connectionName',
    identifier: 'identifier',
  },
  locationUri: 'locationUri',
  name: 'name',
  parameters: parameters,
  targetDatabase: {
    catalogId: 'catalogId',
    databaseName: 'databaseName',
    region: 'region',
  },
};
```

Python:

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

# parameters: Any

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

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.glue.*;

Object parameters;

DatabaseInputProperty databaseInputProperty = DatabaseInputProperty.builder()
        .createTableDefaultPermissions(List.of(PrincipalPrivilegesProperty.builder()
                .permissions(List.of("permissions"))
                .principal(DataLakePrincipalProperty.builder()
                        .dataLakePrincipalIdentifier("dataLakePrincipalIdentifier")
                        .build())
                .build()))
        .description("description")
        .federatedDatabase(FederatedDatabaseProperty.builder()
                .connectionName("connectionName")
                .identifier("identifier")
                .build())
        .locationUri("locationUri")
        .name("name")
        .parameters(parameters)
        .targetDatabase(DatabaseIdentifierProperty.builder()
                .catalogId("catalogId")
                .databaseName("databaseName")
                .region("region")
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Glue;

var parameters;

var databaseInputProperty = new DatabaseInputProperty {
    CreateTableDefaultPermissions = new [] { new PrincipalPrivilegesProperty {
        Permissions = new [] { "permissions" },
        Principal = new DataLakePrincipalProperty {
            DataLakePrincipalIdentifier = "dataLakePrincipalIdentifier"
        }
    } },
    Description = "description",
    FederatedDatabase = new FederatedDatabaseProperty {
        ConnectionName = "connectionName",
        Identifier = "identifier"
    },
    LocationUri = "locationUri",
    Name = "name",
    Parameters = parameters,
    TargetDatabase = new DatabaseIdentifierProperty {
        CatalogId = "catalogId",
        DatabaseName = "databaseName",
        Region = "region"
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var parameters interface{}

databaseInputProperty := &DatabaseInputProperty{
	CreateTableDefaultPermissions: []interface{}{
		&PrincipalPrivilegesProperty{
			Permissions: []*string{
				jsii.String("permissions"),
			},
			Principal: &DataLakePrincipalProperty{
				DataLakePrincipalIdentifier: jsii.String("dataLakePrincipalIdentifier"),
			},
		},
	},
	Description: jsii.String("description"),
	FederatedDatabase: &FederatedDatabaseProperty{
		ConnectionName: jsii.String("connectionName"),
		Identifier: jsii.String("identifier"),
	},
	LocationUri: jsii.String("locationUri"),
	Name: jsii.String("name"),
	Parameters: parameters,
	TargetDatabase: &DatabaseIdentifierProperty{
		CatalogId: jsii.String("catalogId"),
		DatabaseName: jsii.String("databaseName"),
		Region: jsii.String("region"),
	},
}
```

## Properties

- `createTableDefaultPermissions`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatabase.PrincipalPrivilegesProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnDatabase.PrincipalPrivilegesProperty.html)[] — 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`: string — A description of the database.

- `federatedDatabase`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatabase.FederatedDatabaseProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnDatabase.FederatedDatabaseProperty.html) — A `FederatedDatabase` structure that references an entity outside the AWS Glue Data Catalog .

- `locationUri`: string — The location of the database (for example, an HDFS path).

- `name`: string — 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.

- `targetDatabase`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnDatabase.DatabaseIdentifierProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_glue.CfnDatabase.DatabaseIdentifierProperty.html) — A `DatabaseIdentifier` structure that describes a target database for resource linking.
