datasets
Creates, updates, deletes or gets a dataset
resource or lists datasets
in a region
Overview
Name | datasets |
Type | Resource |
Description | Resource Type Definition for AWS::Forecast::Dataset |
Id | aws.forecast.datasets |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | |
dataset_name | string | A name for the dataset |
dataset_type | string | The dataset type |
data_frequency | string | Frequency of data collection. This parameter is required for RELATED_TIME_SERIES |
domain | string | The domain associated with the dataset |
encryption_config | object | |
schema | object | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DatasetName, DatasetType, Domain, Schema, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all datasets
in a region.
SELECT
region,
arn,
dataset_name,
dataset_type,
data_frequency,
domain,
encryption_config,
schema,
tags
FROM aws.forecast.datasets
WHERE region = 'us-east-1';
Gets all properties from an individual dataset
.
SELECT
region,
arn,
dataset_name,
dataset_type,
data_frequency,
domain,
encryption_config,
schema,
tags
FROM aws.forecast.datasets
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';
INSERT
example
Use the following StackQL query and manifest file to create a new dataset
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.forecast.datasets (
DatasetName,
DatasetType,
Domain,
Schema,
region
)
SELECT
'{{ DatasetName }}',
'{{ DatasetType }}',
'{{ Domain }}',
'{{ Schema }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.forecast.datasets (
DatasetName,
DatasetType,
DataFrequency,
Domain,
EncryptionConfig,
Schema,
Tags,
region
)
SELECT
'{{ DatasetName }}',
'{{ DatasetType }}',
'{{ DataFrequency }}',
'{{ Domain }}',
'{{ EncryptionConfig }}',
'{{ Schema }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dataset
props:
- name: DatasetName
value: '{{ DatasetName }}'
- name: DatasetType
value: '{{ DatasetType }}'
- name: DataFrequency
value: '{{ DataFrequency }}'
- name: Domain
value: '{{ Domain }}'
- name: EncryptionConfig
value:
KmsKeyArn: '{{ KmsKeyArn }}'
RoleArn: '{{ RoleArn }}'
- name: Schema
value:
Attributes:
- AttributeName: '{{ AttributeName }}'
AttributeType: '{{ AttributeType }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.forecast.datasets
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the datasets
resource, the following permissions are required:
Create
forecast:CreateDataset
Read
forecast:DescribeDataset
Delete
forecast:DeleteDataset
List
forecast:ListDatasets