dataset_groups
Creates, updates, deletes or gets a dataset_group resource or lists dataset_groups in a region
Overview
| Name | dataset_groups |
| Type | Resource |
| Description | Represents a dataset group that holds a collection of related datasets |
| Id | awscc.forecast.dataset_groups |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
dataset_arns | array | An array of Amazon Resource Names (ARNs) of the datasets that you want to include in the dataset group. |
dataset_group_name | string | A name for the dataset group. |
domain | string | The domain associated with the dataset group. When you add a dataset to a dataset group, this value and the value specified for the Domain parameter of the CreateDataset operation must match. |
tags | array | The tags of Application Insights application. |
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group to delete. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group to delete. |
region | string | AWS region. |
For more information, see AWS::Forecast::DatasetGroup.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | dataset_groups | INSERT | DatasetGroupName, Domain, region |
delete_resource | dataset_groups | DELETE | Identifier, region |
update_resource | dataset_groups | UPDATE | Identifier, PatchDocument, region |
list_resources | dataset_groups_list_only | SELECT | region |
get_resource | dataset_groups | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual dataset_group.
SELECT
region,
dataset_arns,
dataset_group_name,
domain,
tags,
dataset_group_arn
FROM awscc.forecast.dataset_groups
WHERE
region = '{{ region }}' AND
Identifier = '{{ dataset_group_arn }}';
Lists all dataset_groups in a region.
SELECT
region,
dataset_group_arn
FROM awscc.forecast.dataset_groups_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new dataset_group resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.forecast.dataset_groups (
DatasetGroupName,
Domain,
region
)
SELECT
'{{ dataset_group_name }}',
'{{ domain }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.forecast.dataset_groups (
DatasetArns,
DatasetGroupName,
Domain,
Tags,
region
)
SELECT
'{{ dataset_arns }}',
'{{ dataset_group_name }}',
'{{ domain }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: dataset_group
props:
- name: dataset_arns
value:
- '{{ dataset_arns[0] }}'
- name: dataset_group_name
value: '{{ dataset_group_name }}'
- name: domain
value: '{{ domain }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a dataset_group resource, using stack-deploy.
/*+ update */
UPDATE awscc.forecast.dataset_groups
SET PatchDocument = string('{{ {
"DatasetArns": dataset_arns,
"Domain": domain,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ dataset_group_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.forecast.dataset_groups
WHERE
Identifier = '{{ dataset_group_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the dataset_groups resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
forecast:CreateDatasetGroup
forecast:DescribeDatasetGroup
forecast:UpdateDatasetGroup
forecast:DeleteDatasetGroup
forecast:ListDatasetGroups