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
Idawscc.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. FEDERATED is a federated catalog for which Athena creates the connection and the Lambda function for you based on the parameters that you pass.
statusstringThe status of the creation or deletion of the data catalog. LAMBDA, GLUE, and HIVE data catalog types are created synchronously. Their status is either CREATE_COMPLETE or CREATE_FAILED. The FEDERATED data catalog type is created asynchronously.
connection_typestringThe type of connection for a FEDERATED data catalog
errorstringText of the error that occurred during data catalog creation or deletion.
regionstringAWS region.

For more information, see AWS::Athena::DataCatalog.

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 properties from an individual data_catalog.

SELECT
region,
name,
description,
parameters,
tags,
type,
status,
connection_type,
error
FROM awscc.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 awscc.athena.data_catalogs (
Name,
Type,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.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:GetDataCatalog,
athena:TagResource,
s3:ListBucket,
glue:TagResource,
glue:CreateConnection,
glue:DeleteConnection,
glue:UpdateConnection,
serverlessrepo:CreateCloudFormationTemplate,
serverlessrepo:GetCloudFormationTemplate,
cloudformation:CreateStack,
cloudformation:DeleteStack,
cloudformation:DescribeStacks,
cloudformation:CreateChangeSet,
iam:AttachRolePolicy,
iam:DetachRolePolicy,
iam:DeleteRolePolicy,
iam:PutRolePolicy,
iam:CreateRole,
iam:TagRole,
iam:DeleteRole,
iam:GetRole,
iam:GetRolePolicy,
iam:PassRole,
lambda:DeleteFunction,
lambda:CreateFunction,
lambda:TagResource,
lambda:GetFunction,
ec2:DescribeSecurityGroups,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
secretsmanager:ListSecrets,
glue:GetConnection,
ecr:BatchGetImage,
ecr:GetDownloadUrlForLayer

Read

athena:GetDataCatalog,
athena:ListTagsForResource

Update

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

Delete

athena:DeleteDataCatalog,
athena:GetDataCatalog,
glue:GetConnection,
glue:UpdateConnection,
cloudformation:DeleteStack,
cloudformation:DescribeStacks,
lambda:DeleteFunction,
iam:DeleteRole,
iam:DeleteRolePolicy,
iam:DetachRolePolicy,
s3:ListBucket

List

athena:ListDataCatalogs