CreateCatalogCommand

Creates a new catalog in the Glue Data Catalog.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { GlueClient, CreateCatalogCommand } from "@aws-sdk/client-glue"; // ES Modules import
// const { GlueClient, CreateCatalogCommand } = require("@aws-sdk/client-glue"); // CommonJS import
const client = new GlueClient(config);
const input = { // CreateCatalogRequest
  Name: "STRING_VALUE", // required
  CatalogInput: { // CatalogInput
    Description: "STRING_VALUE",
    FederatedCatalog: { // FederatedCatalog
      Identifier: "STRING_VALUE",
      ConnectionName: "STRING_VALUE",
    },
    Parameters: { // ParametersMap
      "<keys>": "STRING_VALUE",
    },
    TargetRedshiftCatalog: { // TargetRedshiftCatalog
      CatalogArn: "STRING_VALUE", // required
    },
    CatalogProperties: { // CatalogProperties
      DataLakeAccessProperties: { // DataLakeAccessProperties
        DataLakeAccess: true || false,
        DataTransferRole: "STRING_VALUE",
        KmsKey: "STRING_VALUE",
        CatalogType: "STRING_VALUE",
      },
      CustomProperties: {
        "<keys>": "STRING_VALUE",
      },
    },
    CreateTableDefaultPermissions: [ // PrincipalPermissionsList
      { // PrincipalPermissions
        Principal: { // DataLakePrincipal
          DataLakePrincipalIdentifier: "STRING_VALUE",
        },
        Permissions: [ // PermissionList
          "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS",
        ],
      },
    ],
    CreateDatabaseDefaultPermissions: [
      {
        Principal: {
          DataLakePrincipalIdentifier: "STRING_VALUE",
        },
        Permissions: [
          "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS",
        ],
      },
    ],
    AllowFullTableExternalDataAccess: "True" || "False",
  },
  Tags: { // TagsMap
    "<keys>": "STRING_VALUE",
  },
};
const command = new CreateCatalogCommand(input);
const response = await client.send(command);
// {};

CreateCatalogCommand Input

See CreateCatalogCommandInput for more details

Parameter
Type
Description
CatalogInput
Required
CatalogInput | undefined

A CatalogInput object that defines the metadata for the catalog.

Name
Required
string | undefined

The name of the catalog to create.

Tags
Record<string, string> | undefined

A map array of key-value pairs, not more than 50 pairs. Each key is a UTF-8 string, not less than 1 or more than 128 bytes long. Each value is a UTF-8 string, not more than 256 bytes long. The tags you assign to the catalog.

CreateCatalogCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
AccessDeniedException
client

Access to a resource was denied.

AlreadyExistsException
client

A resource to be created or added already exists.

ConcurrentModificationException
client

Two processes are trying to modify a resource simultaneously.

EntityNotFoundException
client

A specified entity does not exist

FederatedResourceAlreadyExistsException
client

A federated resource already exists.

FederationSourceException
client

A federation source failed.

GlueEncryptionException
client

An encryption operation failed.

InternalServiceException
server

An internal service error occurred.

InvalidInputException
client

The input provided was not valid.

OperationTimeoutException
client

The operation timed out.

ResourceNumberLimitExceededException
client

A resource numerical limit was exceeded.

GlueServiceException
Base exception class for all service exceptions from Glue service.