Skip to main content

analysis

Creates, updates, deletes, gets or lists an analysis resource.

Overview

Nameanalysis
TypeResource
Idaws.quicksight.analysis

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
analysisobjectA metadata structure that contains summary information for the analysis that you're describing.
request_idstringThe Amazon Web Services request ID for this operation.
statusintegerThe HTTP status of the request.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_analysisselectaws_account_id, analysis_id, regionProvides a summary of the metadata for an analysis.
create_analysisinsertaws_account_id, analysis_id, region, NameCreates an analysis in Amazon Quick Sight. Analyses can be created either from a template or from an AnalysisDefinition.
update_analysisupdateaws_account_id, analysis_id, region, NameUpdates an analysis in Amazon Quick Sight
delete_analysisdeleteaws_account_id, analysis_id, regionrecovery-window-in-days, force-delete-without-recoveryDeletes an analysis from Amazon Quick Sight. You can optionally include a recovery window during which you can restore the analysis. If you don't specify a recovery window value, the operation defaults to 30 days. Amazon Quick Sight attaches a DeletionTime stamp to the response that specifies the end of the recovery window. At the end of the recovery window, Amazon Quick Sight deletes the analysis permanently. At any time before recovery window ends, you can use the RestoreAnalysis API operation to remove the DeletionTime stamp and cancel the deletion of the analysis. The analysis remains visible in the API until it's deleted, so you can describe it but you can't make a template from it. An analysis that's scheduled for deletion isn't accessible in the Amazon Quick Sight console. To access it in the console, restore it. Deleting an analysis doesn't delete the dashboards that you publish from it.
restore_analysisexecaws_account_id, analysis_id, regionrestore-to-foldersRestores an analysis.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
analysis_idstringThe ID of the analysis that you're restoring.
aws_account_idstringThe ID of the Amazon Web Services account that contains the analysis.
regionstringAWS region (default: us-east-1)
force-delete-without-recoverybooleanThis option defaults to the value NoForceDeleteWithoutRecovery. To immediately delete the analysis, add the ForceDeleteWithoutRecovery option. You can't restore an analysis after it's deleted.
recovery-window-in-daysinteger (int64)A value that specifies the number of days that Amazon Quick Sight waits before it deletes the analysis. You can't use this parameter with the ForceDeleteWithoutRecovery option in the same API call. The default value is 30.
restore-to-foldersbooleanA boolean value that determines if the analysis will be restored to folders that it previously resided in. A True value restores analysis back to all folders that it previously resided in. A False value restores the analysis but does not restore the analysis back to all previously resided folders. Restoring a restricted analysis requires this parameter to be set to True.

SELECT examples

Provides a summary of the metadata for an analysis.

SELECT
analysis,
request_id,
status
FROM aws.quicksight.analysis
WHERE aws_account_id = '{{ aws_account_id }}' -- required
AND analysis_id = '{{ analysis_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an analysis in Amazon Quick Sight. Analyses can be created either from a template or from an AnalysisDefinition.

INSERT INTO aws.quicksight.analysis (
Name,
Parameters,
Permissions,
SourceEntity,
ThemeArn,
Tags,
Definition,
ValidationStrategy,
FolderArns,
aws_account_id,
analysis_id,
region
)
SELECT
'{{ Name }}' /* required */,
'{{ Parameters }}',
'{{ Permissions }}',
'{{ SourceEntity }}',
'{{ ThemeArn }}',
'{{ Tags }}',
'{{ Definition }}',
'{{ ValidationStrategy }}',
'{{ FolderArns }}',
'{{ aws_account_id }}',
'{{ analysis_id }}',
'{{ region }}'
RETURNING
analysis_id,
arn,
creation_status,
request_id,
status
;

UPDATE examples

Updates an analysis in Amazon Quick Sight

UPDATE aws.quicksight.analysis
SET
Name = '{{ Name }}',
Parameters = '{{ Parameters }}',
SourceEntity = '{{ SourceEntity }}',
ThemeArn = '{{ ThemeArn }}',
Definition = '{{ Definition }}',
ValidationStrategy = '{{ ValidationStrategy }}'
WHERE
aws_account_id = '{{ aws_account_id }}' --required
AND analysis_id = '{{ analysis_id }}' --required
AND region = '{{ region }}' --required
AND Name = '{{ Name }}' --required
RETURNING
analysis_id,
arn,
request_id,
status,
update_status;

DELETE examples

Deletes an analysis from Amazon Quick Sight. You can optionally include a recovery window during which you can restore the analysis. If you don't specify a recovery window value, the operation defaults to 30 days. Amazon Quick Sight attaches a DeletionTime stamp to the response that specifies the end of the recovery window. At the end of the recovery window, Amazon Quick Sight deletes the analysis permanently. At any time before recovery window ends, you can use the RestoreAnalysis API operation to remove the DeletionTime stamp and cancel the deletion of the analysis. The analysis remains visible in the API until it's deleted, so you can describe it but you can't make a template from it. An analysis that's scheduled for deletion isn't accessible in the Amazon Quick Sight console. To access it in the console, restore it. Deleting an analysis doesn't delete the dashboards that you publish from it.

DELETE FROM aws.quicksight.analysis
WHERE aws_account_id = '{{ aws_account_id }}' --required
AND analysis_id = '{{ analysis_id }}' --required
AND region = '{{ region }}' --required
AND `recovery-window-in-days` = '{{ recovery-window-in-days }}'
AND `force-delete-without-recovery` = '{{ force-delete-without-recovery }}'
;

Lifecycle Methods

Restores an analysis.

EXEC aws.quicksight.analysis.restore_analysis
@aws_account_id='{{ aws_account_id }}' --required,
@analysis_id='{{ analysis_id }}' --required,
@region='{{ region }}' --required,
@restore-to-folders={{ restore-to-folders }}
;