Skip to content

create_dashboard

create_dashboard(
    aws_account_id: AwsAccountId,
    dashboard_id: ShortRestrictiveResourceId,
    name: DashboardName,
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    parameters: Optional[Parameters] = None,
    permissions: Optional[ResourcePermissionList] = None,
    source_entity: Optional[DashboardSourceEntity] = None,
    tags: Optional[TagList] = None,
    version_description: Optional[VersionDescription] = None,
    dashboard_publish_options: Optional[DashboardPublishOptions] = None,
    theme_arn: Optional[Arn] = None,
    definition: Optional[DashboardVersionDefinition] = None,
    validation_strategy: Optional[ValidationStrategy] = None,
    folder_arns: Optional[FolderArnList] = None,
    link_sharing_configuration: Optional[LinkSharingConfiguration] = None,
    link_entities: Optional[LinkEntityArnList] = None,
) -> CreateDashboardResponse

Creates a dashboard from either a template or directly with a DashboardDefinition. To first create a template, see the CreateTemplate API operation.

A dashboard is an entity in Amazon Quick Sight that identifies Amazon Quick Sight reports, created from analyses. You can share Amazon Quick Sight dashboards. With the right permissions, you can create scheduled email reports from them. If you have the correct permissions, you can create a dashboard from a template that exists in a different Amazon Web Services account.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services account where you want to create the dashboard.

  • dashboard_id (ShortRestrictiveResourceId) –

    The ID for the dashboard, also added to the IAM policy.

  • name (DashboardName) –

    The display name of the dashboard.

  • parameters (Optional[Parameters], default: None ) –

    The parameters for the creation of the dashboard, which you want to use to override the default settings. A dashboard can have any type of parameters, and some parameters might accept multiple values.

  • permissions (Optional[ResourcePermissionList], default: None ) –

    A structure that contains the permissions of the dashboard. You can use this structure for granting permissions by providing a list of IAM action information for each principal ARN.

    To specify no permissions, omit the permissions list.

  • source_entity (Optional[DashboardSourceEntity], default: None ) –

    The entity that you are using as a source when you create the dashboard. In SourceEntity, you specify the type of object you're using as source. You can only create a dashboard from a template, so you use a SourceTemplate entity. If you need to create a dashboard from an analysis, first convert the analysis to a template by using the CreateTemplate API operation. For SourceTemplate, specify the Amazon Resource Name (ARN) of the source template. The SourceTemplateARN can contain any Amazon Web Services account and any Amazon Quick Sight-supported Amazon Web Services Region.

    Use the DataSetReferences entity within SourceTemplate to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder. Use the TopicReferences entity to list the replacement topics for the topic placeholders listed in the original. The schema in each topic must match its placeholder.

    Either a SourceEntity or a Definition must be provided in order for the request to be valid.

  • tags (Optional[TagList], default: None ) –

    Contains a map of the key-value pairs for the resource tag or tags assigned to the dashboard.

  • version_description (Optional[VersionDescription], default: None ) –

    A description for the first version of the dashboard being created.

  • dashboard_publish_options (Optional[DashboardPublishOptions], default: None ) –

    Options for publishing the dashboard when you create it:

    • AvailabilityStatus for AdHocFilteringOption - This status can be either ENABLED or DISABLED. When this is set to DISABLED, Amazon Quick Sight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is ENABLED by default.

    • AvailabilityStatus for ExportToCSVOption - This status can be either ENABLED or DISABLED. The visual option to export data to .CSV format isn't enabled when this is set to DISABLED. This option is ENABLED by default.

    • VisibilityState for SheetControlsOption - This visibility state can be either COLLAPSED or EXPANDED. This option is COLLAPSED by default.

    • AvailabilityStatus for QuickSuiteActionsOption - This status can be either ENABLED or DISABLED. Features related to Actions in Amazon Quick Suite on dashboards are disabled when this is set to DISABLED. This option is DISABLED by default.

    • AvailabilityStatus for ExecutiveSummaryOption - This status can be either ENABLED or DISABLED. The option to build an executive summary is disabled when this is set to DISABLED. This option is ENABLED by default.

    • AvailabilityStatus for DataStoriesSharingOption - This status can be either ENABLED or DISABLED. The option to share a data story is disabled when this is set to DISABLED. This option is ENABLED by default.

  • theme_arn (Optional[Arn], default: None ) –

    The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that is used in the source entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.

  • definition (Optional[DashboardVersionDefinition], default: None ) –

    The definition of a dashboard.

    A definition is the data model of all features in a Dashboard, Template, or Analysis.

    Either a SourceEntity or a Definition must be provided in order for the request to be valid.

  • validation_strategy (Optional[ValidationStrategy], default: None ) –

    The option to relax the validation needed to create a dashboard with definition objects. This option skips the validation step for specific errors.

  • folder_arns (Optional[FolderArnList], default: None ) –

    When you create the dashboard, Amazon Quick Sight adds the dashboard to these folders.

  • link_sharing_configuration (Optional[LinkSharingConfiguration], default: None ) –

    A structure that contains the permissions of a shareable link to the dashboard.

  • link_entities (Optional[LinkEntityArnList], default: None ) –

    A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.

Raises:

Source code in docs_src/capo_quicksight/_services/quick_sight.py
def create_dashboard(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    dashboard_id: "capo_quicksight.types.short_restrictive_resource_id.ShortRestrictiveResourceId",
    name: "capo_quicksight.types.dashboard_name.DashboardName",
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    parameters: Optional["capo_quicksight.types.parameters.Parameters"] = None,
    permissions: Optional[
        "capo_quicksight.types.resource_permission_list.ResourcePermissionList"
    ] = None,
    source_entity: Optional[
        "capo_quicksight.types.dashboard_source_entity.DashboardSourceEntity"
    ] = None,
    tags: Optional["capo_quicksight.types.tag_list.TagList"] = None,
    version_description: Optional[
        "capo_quicksight.types.version_description.VersionDescription"
    ] = None,
    dashboard_publish_options: Optional[
        "capo_quicksight.types.dashboard_publish_options.DashboardPublishOptions"
    ] = None,
    theme_arn: Optional["capo_quicksight.types.arn.Arn"] = None,
    definition: Optional[
        "capo_quicksight.types.dashboard_version_definition.DashboardVersionDefinition"
    ] = None,
    validation_strategy: Optional[
        "capo_quicksight.types.validation_strategy.ValidationStrategy"
    ] = None,
    folder_arns: Optional[
        "capo_quicksight.types.folder_arn_list.FolderArnList"
    ] = None,
    link_sharing_configuration: Optional[
        "capo_quicksight.types.link_sharing_configuration.LinkSharingConfiguration"
    ] = None,
    link_entities: Optional[
        "capo_quicksight.types.link_entity_arn_list.LinkEntityArnList"
    ] = None,
) -> "capo_quicksight.types.create_dashboard_response.CreateDashboardResponse":
    """<p>Creates a dashboard from either a template or directly with a <code>DashboardDefinition</code>. To first create a template, see the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation.</p> <p>A dashboard is an entity in Amazon Quick Sight that identifies Amazon Quick Sight reports, created from analyses. You can share Amazon Quick Sight dashboards. With the right permissions, you can create scheduled email reports from them. If you have the correct permissions, you can create a dashboard from a template that exists in a different Amazon Web Services account.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account where you want to create the dashboard.</p>
        dashboard_id: <p>The ID for the dashboard, also added to the IAM policy.</p>
        name: <p>The display name of the dashboard.</p>
        parameters: <p>The parameters for the creation of the dashboard, which you want to use to override the default settings. A dashboard can have any type of parameters, and some parameters might accept multiple values. </p>
        permissions: <p>A structure that contains the permissions of the dashboard. You can use this structure for granting permissions by providing a list of IAM action information for each principal ARN. </p> <p>To specify no permissions, omit the permissions list.</p>
        source_entity: <p>The entity that you are using as a source when you create the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only create a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to create a dashboard from an analysis, first convert the analysis to a template by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_CreateTemplate.html">CreateTemplate</a> </code> API operation. For <code>SourceTemplate</code>, specify the Amazon Resource Name (ARN) of the source template. The <code>SourceTemplate</code>ARN can contain any Amazon Web Services account and any Amazon Quick Sight-supported Amazon Web Services Region. </p> <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder. Use the <code>TopicReferences</code> entity to list the replacement topics for the topic placeholders listed in the original. The schema in each topic must match its placeholder.</p> <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
        tags: <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the dashboard.</p>
        version_description: <p>A description for the first version of the dashboard being created.</p>
        dashboard_publish_options: <p>Options for publishing the dashboard when you create it:</p> <ul> <li> <p> <code>AvailabilityStatus</code> for <code>AdHocFilteringOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. When this is set to <code>DISABLED</code>, Amazon Quick Sight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option is <code>ENABLED</code> by default. </p> </li> <li> <p> <code>AvailabilityStatus</code> for <code>ExportToCSVOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The visual option to export data to .CSV format isn't enabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default. </p> </li> <li> <p> <code>VisibilityState</code> for <code>SheetControlsOption</code> - This visibility state can be either <code>COLLAPSED</code> or <code>EXPANDED</code>. This option is <code>COLLAPSED</code> by default. </p> </li> <li> <p> <code>AvailabilityStatus</code> for <code>QuickSuiteActionsOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. Features related to Actions in Amazon Quick Suite on dashboards are disabled when this is set to <code>DISABLED</code>. This option is <code>DISABLED</code> by default.</p> </li> <li> <p> <code>AvailabilityStatus</code> for <code>ExecutiveSummaryOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The option to build an executive summary is disabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p> </li> <li> <p> <code>AvailabilityStatus</code> for <code>DataStoriesSharingOption</code> - This status can be either <code>ENABLED</code> or <code>DISABLED</code>. The option to share a data story is disabled when this is set to <code>DISABLED</code>. This option is <code>ENABLED</code> by default.</p> </li> </ul>
        theme_arn: <p>The Amazon Resource Name (ARN) of the theme that is being used for this dashboard. If you add a value for this field, it overrides the value that is used in the source entity. The theme ARN must exist in the same Amazon Web Services account where you create the dashboard.</p>
        definition: <p>The definition of a dashboard.</p> <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p> <p>Either a <code>SourceEntity</code> or a <code>Definition</code> must be provided in order for the request to be valid.</p>
        validation_strategy: <p>The option to relax the validation needed to create a dashboard with definition objects. This option skips the validation step for specific errors.</p>
        folder_arns: <p>When you create the dashboard, Amazon Quick Sight adds the dashboard to these folders.</p>
        link_sharing_configuration: <p>A structure that contains the permissions of a shareable link to the dashboard.</p>
        link_entities: <p>A list of analysis Amazon Resource Names (ARNs) to be linked to the dashboard.</p>

    Raises:
        capo_quicksight.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_quicksight.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
        capo_quicksight.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameters has a value that isn't valid.</p>
        capo_quicksight.errors.limit_exceeded_exception.LimitExceededException: <p>A limit is exceeded.</p>
        capo_quicksight.errors.resource_exists_exception.ResourceExistsException: <p>The resource specified already exists. </p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.unsupported_user_edition_exception.UnsupportedUserEditionException: <p>This error indicates that you are calling an operation on an Amazon Quick Suite subscription where the edition doesn't include support for that operation. Amazon Quick Suite currently has Standard Edition and Enterprise Edition. Not every operation and capability is available in every edition.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_quicksight.types.create_dashboard_request.CreateDashboardRequest]",
    ) -> OperationResponse[
        "capo_quicksight.types.create_dashboard_response.CreateDashboardResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.create_dashboard

        output, http_response = (
            capo_quicksight._operations.quick_sight_20180401.create_dashboard.create_dashboard(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_quicksight.types.create_dashboard_request.CreateDashboardRequest",
    ) -> dict[str, Any]:
        import capo_quicksight.types.create_dashboard_request

        return capo_quicksight.types.create_dashboard_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateDashboard", redact_input=_redact_input),
    )
    input_: capo_quicksight.types.create_dashboard_request.CreateDashboardRequest = {
        "aws_account_id": aws_account_id,
        "dashboard_id": dashboard_id,
        "name": name,
    }
    if parameters is not None:
        input_["parameters"] = parameters
    if permissions is not None:
        input_["permissions"] = permissions
    if source_entity is not None:
        input_["source_entity"] = source_entity
    if tags is not None:
        input_["tags"] = tags
    if version_description is not None:
        input_["version_description"] = version_description
    if dashboard_publish_options is not None:
        input_["dashboard_publish_options"] = dashboard_publish_options
    if theme_arn is not None:
        input_["theme_arn"] = theme_arn
    if definition is not None:
        input_["definition"] = definition
    if validation_strategy is not None:
        input_["validation_strategy"] = validation_strategy
    if folder_arns is not None:
        input_["folder_arns"] = folder_arns
    if link_sharing_configuration is not None:
        input_["link_sharing_configuration"] = link_sharing_configuration
    if link_entities is not None:
        input_["link_entities"] = link_entities

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output