Skip to main content

data_catalogs

Creates, updates, deletes or gets a data_catalog resource or lists data_catalogs in a region

Overview

Namedata_catalogs
TypeResource
DescriptionResource schema for AWS::Athena::DataCatalog
Idaws.athena.data_catalogs

Fields

NameDatatypeDescription
namestringThe name of the data catalog to create. The catalog name must be unique for the AWS account and can use a maximum of 128 alphanumeric, underscore, at sign, or hyphen characters.
descriptionstringA description of the data catalog to be created.
parametersobjectSpecifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type.
tagsarrayA list of comma separated tags to add to the data catalog that is created.
typestringThe type of data catalog to create: LAMBDA for a federated catalog, GLUE for AWS Glue Catalog, or HIVE for an external hive metastore.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTName, Type, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all data_catalogs in a region.

SELECT
region,
name,
description,
parameters,
tags,
type
FROM aws.athena.data_catalogs
WHERE region = 'us-east-1';

Gets all properties from an individual data_catalog.

SELECT
region,
name,
description,
parameters,
tags,
type
FROM aws.athena.data_catalogs
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

Use the following StackQL query and manifest file to create a new data_catalog resource, using stack-deploy.

/*+ create */
INSERT INTO aws.athena.data_catalogs (
Name,
Type,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.athena.data_catalogs
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

To operate on the data_catalogs resource, the following permissions are required:

Create

athena:CreateDataCatalog,
athena:TagResource

Read

athena:GetDataCatalog,
athena:ListTagsForResource

Update

athena:UpdateDataCatalog,
athena:TagResource,
athena:GetDataCatalog,
athena:UntagResource,
athena:ListTagsForResource

Delete

athena:DeleteDataCatalog

List

athena:ListDataCatalog