data_catalogs
Creates, updates, deletes or gets a data_catalog
resource or lists data_catalogs
in a region
Overview
Name | data_catalogs |
Type | Resource |
Description | Resource schema for AWS::Athena::DataCatalog |
Id | aws.athena.data_catalogs |
Fields
Name | Datatype | Description |
---|---|---|
name | string | The 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. |
description | string | A description of the data catalog to be created. |
parameters | object | Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type. |
tags | array | A list of comma separated tags to add to the data catalog that is created. |
type | string | The type of data catalog to create: LAMBDA for a federated catalog, GLUE for AWS Glue Catalog, or HIVE for an external hive metastore. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Name, Type, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.athena.data_catalogs (
Name,
Type,
region
)
SELECT
'{{ Name }}',
'{{ Type }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.athena.data_catalogs (
Name,
Description,
Parameters,
Tags,
Type,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ Parameters }}',
'{{ Tags }}',
'{{ Type }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: data_catalog
props:
- name: Name
value: '{{ Name }}'
- name: Description
value: '{{ Description }}'
- name: Parameters
value: {}
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
- name: Type
value: '{{ Type }}'
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