Skip to content

update_dashboard

update_dashboard(
    aws_account_id: AwsAccountId,
    dashboard_id: ShortRestrictiveResourceId,
    name: DashboardName,
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    source_entity: Optional[DashboardSourceEntity] = None,
    parameters: Optional[Parameters] = 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,
) -> UpdateDashboardResponse

Updates a dashboard in an Amazon Web Services account.

Updating a Dashboard creates a new dashboard version but does not immediately publish the new version. You can update the published version of a dashboard by using the UpdateDashboardPublishedVersion API operation.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services account that contains the dashboard that you're updating.

  • dashboard_id (ShortRestrictiveResourceId) –

    The ID for the dashboard.

  • name (DashboardName) –

    The display name of the dashboard.

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

    The entity that you are using as a source when you update the dashboard. In SourceEntity, you specify the type of object you're using as source. You can only update a dashboard from a template, so you use a SourceTemplate entity. If you need to update 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 SourceTemplate ARN 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.

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

    A structure that contains the parameters of the dashboard. These are parameter overrides for a dashboard. A dashboard can have any type of parameters, and some parameters might accept multiple values.

  • 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 was originally associated with the 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.

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

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

Raises:

Source code in docs_src/capo_quicksight/_services/quick_sight.py
def update_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,
    source_entity: Optional[
        "capo_quicksight.types.dashboard_source_entity.DashboardSourceEntity"
    ] = None,
    parameters: Optional["capo_quicksight.types.parameters.Parameters"] = 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,
) -> "capo_quicksight.types.update_dashboard_response.UpdateDashboardResponse":
    """<p>Updates a dashboard in an Amazon Web Services account.</p> <note> <p>Updating a Dashboard creates a new dashboard version but does not immediately publish the new version. You can update the published version of a dashboard by using the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_UpdateDashboardPublishedVersion.html">UpdateDashboardPublishedVersion</a> </code> API operation.</p> </note>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that contains the dashboard that you're updating.</p>
        dashboard_id: <p>The ID for the dashboard.</p>
        name: <p>The display name of the dashboard.</p>
        source_entity: <p>The entity that you are using as a source when you update the dashboard. In <code>SourceEntity</code>, you specify the type of object you're using as source. You can only update a dashboard from a template, so you use a <code>SourceTemplate</code> entity. If you need to update 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>
        parameters: <p>A structure that contains the parameters of the dashboard. These are parameter overrides for a dashboard. A dashboard can have any type of parameters, and some parameters might accept multiple values.</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 was originally associated with the 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>
        validation_strategy: <p>The option to relax the validation needed to update a dashboard with definition objects. This skips the validation step for specific errors.</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_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.update_dashboard_request.UpdateDashboardRequest]",
    ) -> OperationResponse[
        "capo_quicksight.types.update_dashboard_response.UpdateDashboardResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.update_dashboard

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

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

        return capo_quicksight.types.update_dashboard_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateDashboard", redact_input=_redact_input),
    )
    input_: capo_quicksight.types.update_dashboard_request.UpdateDashboardRequest = {
        "aws_account_id": aws_account_id,
        "dashboard_id": dashboard_id,
        "name": name,
    }
    if source_entity is not None:
        input_["source_entity"] = source_entity
    if parameters is not None:
        input_["parameters"] = parameters
    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

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