folders
Creates, updates, deletes or gets a folder resource or lists folders in a region
Overview
| Name | folders |
| Type | Resource |
| Description | Definition of the AWS::QuickSight::Folder Resource Type. |
| Id | awscc.quicksight.folders |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) for the folder. |
aws_account_id | string | |
created_time | string | The time that the folder was created. |
folder_id | string | |
folder_type | string | |
last_updated_time | string | The time that the folder was last updated. |
name | string | |
parent_folder_arn | string | |
permissions | array | |
sharing_model | string | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
aws_account_id | string | |
folder_id | string | |
region | string | AWS region. |
For more information, see AWS::QuickSight::Folder.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | folders | INSERT | region |
delete_resource | folders | DELETE | Identifier, region |
update_resource | folders | UPDATE | Identifier, PatchDocument, region |
list_resources | folders_list_only | SELECT | region |
get_resource | folders | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual folder.
SELECT
region,
arn,
aws_account_id,
created_time,
folder_id,
folder_type,
last_updated_time,
name,
parent_folder_arn,
permissions,
sharing_model,
tags
FROM awscc.quicksight.folders
WHERE
region = '{{ region }}' AND
Identifier = '{{ aws_account_id }}|{{ folder_id }}';
Lists all folders in a region.
SELECT
region,
aws_account_id,
folder_id
FROM awscc.quicksight.folders_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new folder resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.quicksight.folders (
AwsAccountId,
FolderId,
FolderType,
Name,
ParentFolderArn,
Permissions,
SharingModel,
Tags,
region
)
SELECT
'{{ aws_account_id }}',
'{{ folder_id }}',
'{{ folder_type }}',
'{{ name }}',
'{{ parent_folder_arn }}',
'{{ permissions }}',
'{{ sharing_model }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.quicksight.folders (
AwsAccountId,
FolderId,
FolderType,
Name,
ParentFolderArn,
Permissions,
SharingModel,
Tags,
region
)
SELECT
'{{ aws_account_id }}',
'{{ folder_id }}',
'{{ folder_type }}',
'{{ name }}',
'{{ parent_folder_arn }}',
'{{ permissions }}',
'{{ sharing_model }}',
'{{ 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: folder
props:
- name: aws_account_id
value: '{{ aws_account_id }}'
- name: folder_id
value: '{{ folder_id }}'
- name: folder_type
value: '{{ folder_type }}'
- name: name
value: '{{ name }}'
- name: parent_folder_arn
value: '{{ parent_folder_arn }}'
- name: permissions
value:
- principal: '{{ principal }}'
actions:
- '{{ actions[0] }}'
- name: sharing_model
value: '{{ sharing_model }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a folder resource, using stack-deploy.
/*+ update */
UPDATE awscc.quicksight.folders
SET PatchDocument = string('{{ {
"Name": name,
"Permissions": permissions,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ aws_account_id }}|{{ folder_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.quicksight.folders
WHERE
Identifier = '{{ aws_account_id }}|{{ folder_id }}' 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 folders resource, the following permissions are required:
- Read
- Create
- Update
- Delete
- List
quicksight:DescribeFolder,
quicksight:DescribeFolderPermissions,
quicksight:ListTagsForResource
quicksight:CreateFolder,
quicksight:DescribeFolder,
quicksight:UpdateFolderPermissions,
quicksight:DescribeFolderPermissions,
quicksight:TagResource,
quicksight:ListTagsForResource
quicksight:DescribeFolder,
quicksight:UpdateFolder,
quicksight:DescribeFolderPermissions,
quicksight:UpdateFolderPermissions,
quicksight:ListTagsForResource,
quicksight:TagResource,
quicksight:UntagResource
quicksight:DeleteFolder
quicksight:ListFolders