Skip to content

update_analysis async

update_analysis(
    aws_account_id: AwsAccountId,
    analysis_id: ShortRestrictiveResourceId,
    name: AnalysisName,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    parameters: Optional[Parameters] = None,
    source_entity: Optional[AnalysisSourceEntity] = None,
    theme_arn: Optional[Arn] = None,
    definition: Optional[AnalysisDefinition] = None,
    validation_strategy: Optional[ValidationStrategy] = None,
) -> UpdateAnalysisResponse

Updates an analysis in Amazon Quick Sight

Parameters:

  • aws_account_id (AwsAccountId) –

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

  • analysis_id (ShortRestrictiveResourceId) –

    The ID for the analysis that you're updating. This ID displays in the URL of the analysis.

  • name (AnalysisName) –

    A descriptive name for the analysis that you're updating. This name displays for the analysis in the Amazon Quick Sight console.

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

    The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values.

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

    A source entity to use for the analysis that you're updating. This metadata structure contains details that describe a source template and one or more datasets or topics.

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

    The Amazon Resource Name (ARN) for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.

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

    The definition of an analysis.

    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 an analysis with definition objects. This skips the validation step for specific errors.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def update_analysis(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    analysis_id: "capo_quicksight.types.short_restrictive_resource_id.ShortRestrictiveResourceId",
    name: "capo_quicksight.types.analysis_name.AnalysisName",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    parameters: Optional["capo_quicksight.types.parameters.Parameters"] = None,
    source_entity: Optional[
        "capo_quicksight.types.analysis_source_entity.AnalysisSourceEntity"
    ] = None,
    theme_arn: Optional["capo_quicksight.types.arn.Arn"] = None,
    definition: Optional[
        "capo_quicksight.types.analysis_definition.AnalysisDefinition"
    ] = None,
    validation_strategy: Optional[
        "capo_quicksight.types.validation_strategy.ValidationStrategy"
    ] = None,
) -> "capo_quicksight.types.update_analysis_response.UpdateAnalysisResponse":
    """<p>Updates an analysis in Amazon Quick Sight</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that contains the analysis that you're updating.</p>
        analysis_id: <p>The ID for the analysis that you're updating. This ID displays in the URL of the analysis.</p>
        name: <p>A descriptive name for the analysis that you're updating. This name displays for the analysis in the Amazon Quick Sight console.</p>
        parameters: <p>The parameter names and override values that you want to use. An analysis can have any parameter type, and some parameters might accept multiple values. </p>
        source_entity: <p>A source entity to use for the analysis that you're updating. This metadata structure contains details that describe a source template and one or more datasets or topics.</p>
        theme_arn: <p>The Amazon Resource Name (ARN) for the theme to apply to the analysis that you're creating. To see the theme in the Amazon Quick Sight console, make sure that you have access to it.</p>
        definition: <p>The definition of an analysis.</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 an analysis 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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.update_analysis_request.UpdateAnalysisRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.update_analysis_response.UpdateAnalysisResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.update_analysis

        (
            output,
            http_response,
        ) = await capo_quicksight._operations.quick_sight_20180401.update_analysis.async_update_analysis(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_quicksight.types.update_analysis_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateAnalysis", redact_input=_redact_input),
    )
    input_: capo_quicksight.types.update_analysis_request.UpdateAnalysisRequest = {
        "aws_account_id": aws_account_id,
        "analysis_id": analysis_id,
        "name": name,
    }
    if parameters is not None:
        input_["parameters"] = parameters
    if source_entity is not None:
        input_["source_entity"] = source_entity
    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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output