Skip to content

update_template async

update_template(
    aws_account_id: AwsAccountId,
    template_id: ShortRestrictiveResourceId,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    source_entity: Optional[TemplateSourceEntity] = None,
    version_description: Optional[VersionDescription] = None,
    name: Optional[TemplateName] = None,
    definition: Optional[TemplateVersionDefinition] = None,
    validation_strategy: Optional[ValidationStrategy] = None,
) -> UpdateTemplateResponse

Updates a template from an existing Amazon Quick Sight analysis or another template.

Parameters:

  • aws_account_id (AwsAccountId) –

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

  • template_id (ShortRestrictiveResourceId) –

    The ID for the template.

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

    The entity that you are using as a source when you update the template. In SourceEntity, you specify the type of object you're using as source: SourceTemplate for a template or SourceAnalysis for an analysis. Both of these require an Amazon Resource Name (ARN). For SourceTemplate, specify the ARN of the source template. For SourceAnalysis, specify the ARN of the source analysis. The SourceTemplate ARN can contain any Amazon Web Services account and any Quick Sight-supported Amazon Web Services Region;.

    Use the DataSetReferences entity within SourceTemplate or SourceAnalysis 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.

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

    A description of the current template version that is being updated. Every time you call UpdateTemplate, you create a new version of the template. Each version of the template maintains a description of the version in the VersionDescription field.

  • name (Optional[TemplateName], default: None ) –

    The name for the template.

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

    The definition of a template.

    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 template 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_template(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    template_id: "capo_quicksight.types.short_restrictive_resource_id.ShortRestrictiveResourceId",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    source_entity: Optional[
        "capo_quicksight.types.template_source_entity.TemplateSourceEntity"
    ] = None,
    version_description: Optional[
        "capo_quicksight.types.version_description.VersionDescription"
    ] = None,
    name: Optional["capo_quicksight.types.template_name.TemplateName"] = None,
    definition: Optional[
        "capo_quicksight.types.template_version_definition.TemplateVersionDefinition"
    ] = None,
    validation_strategy: Optional[
        "capo_quicksight.types.validation_strategy.ValidationStrategy"
    ] = None,
) -> "capo_quicksight.types.update_template_response.UpdateTemplateResponse":
    """<p>Updates a template from an existing Amazon Quick Sight analysis or another template.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that contains the template that you're updating.</p>
        template_id: <p>The ID for the template.</p>
        source_entity: <p>The entity that you are using as a source when you update the template. In <code>SourceEntity</code>, you specify the type of object you're using as source: <code>SourceTemplate</code> for a template or <code>SourceAnalysis</code> for an analysis. Both of these require an Amazon Resource Name (ARN). For <code>SourceTemplate</code>, specify the ARN of the source template. For <code>SourceAnalysis</code>, specify the ARN of the source analysis. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Quick Sight-supported Amazon Web Services Region;. </p> <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> or <code>SourceAnalysis</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>
        version_description: <p>A description of the current template version that is being updated. Every time you call <code>UpdateTemplate</code>, you create a new version of the template. Each version of the template maintains a description of the version in the <code>VersionDescription</code> field.</p>
        name: <p>The name for the template.</p>
        definition: <p>The definition of a template.</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 template 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_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_template_request.UpdateTemplateRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.update_template_response.UpdateTemplateResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.update_template

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

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

        return capo_quicksight.types.update_template_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateTemplate", redact_input=_redact_input),
    )
    input_: capo_quicksight.types.update_template_request.UpdateTemplateRequest = {
        "aws_account_id": aws_account_id,
        "template_id": template_id,
    }
    if source_entity is not None:
        input_["source_entity"] = source_entity
    if version_description is not None:
        input_["version_description"] = version_description
    if name is not None:
        input_["name"] = name
    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