Skip to content

update_flow

update_flow(
    aws_account_id: AccountId,
    flow_id: FlowId,
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    name: Optional[TitleInput] = None,
    description: Optional[FlowDescriptionInput] = None,
    flow_definition: Optional[SensitiveDocument] = None,
    client_token: Optional[UpdateFlowRequestClientTokenString] = None,
) -> UpdateFlowResponse

Updates an existing flow. Supply only the fields you want to change. Updates both DRAFT and PUBLISHED versions. When FlowDefinition is provided, all existing steps are replaced with the new definition.

Parameters:

  • aws_account_id (AccountId) –

    The ID of the Amazon Web Services account that contains the flow that you are updating.

  • flow_id (FlowId) –

    The unique identifier of the flow to update.

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

    Updated display name for the flow. Omit to preserve the existing name.

  • description (Optional[FlowDescriptionInput], default: None ) –

    Updated description for the flow. Omit to preserve the existing description.

  • flow_definition (Optional[SensitiveDocument], default: None ) –

    The definition of the flow, specifying the steps and configurations. This is the flow definition in Quick Flow's internal format. The format is subject to change. When provided, all existing steps are replaced. Omit to preserve the existing definition.

    Always derive or depend on the flow definition from the DescribeFlow operation to ensure you are working with the latest format.

  • client_token (Optional[UpdateFlowRequestClientTokenString], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_quicksight/_services/quick_sight.py
def update_flow(
    self,
    aws_account_id: "capo_quicksight.types.account_id.AccountId",
    flow_id: "capo_quicksight.types.flow_id.FlowId",
    *,
    config_overrides: Optional[QuickSightClientConfig] = None,
    name: Optional["capo_quicksight.types.title_input.TitleInput"] = None,
    description: Optional[
        "capo_quicksight.types.flow_description_input.FlowDescriptionInput"
    ] = None,
    flow_definition: Optional[
        "capo_quicksight.types.sensitive_document.SensitiveDocument"
    ] = None,
    client_token: Optional[
        "capo_quicksight.types.update_flow_request_client_token_string.UpdateFlowRequestClientTokenString"
    ] = None,
) -> "capo_quicksight.types.update_flow_response.UpdateFlowResponse":
    """<p>Updates an existing flow. Supply only the fields you want to change. Updates both DRAFT and PUBLISHED versions. When <code>FlowDefinition</code> is provided, all existing steps are replaced with the new definition.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that contains the flow that you are updating.</p>
        flow_id: <p>The unique identifier of the flow to update.</p>
        name: <p>Updated display name for the flow. Omit to preserve the existing name.</p>
        description: <p>Updated description for the flow. Omit to preserve the existing description.</p>
        flow_definition: <p>The definition of the flow, specifying the steps and configurations. This is the flow definition in Quick Flow's internal format. The format is subject to change. When provided, all existing steps are replaced. Omit to preserve the existing definition.</p> <note> <p>Always derive or depend on the flow definition from the <code>DescribeFlow</code> operation to ensure you are working with the latest format.</p> </note>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>

    Raises:
        capo_quicksight.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.</p>
        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.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_quicksight.types.update_flow_request.UpdateFlowRequest]",
    ) -> OperationResponse[
        "capo_quicksight.types.update_flow_response.UpdateFlowResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.update_flow

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

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

        return capo_quicksight.types.update_flow_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFlow", redact_input=_redact_input)
    )
    input_: capo_quicksight.types.update_flow_request.UpdateFlowRequest = {
        "aws_account_id": aws_account_id,
        "flow_id": flow_id,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if flow_definition is not None:
        input_["flow_definition"] = flow_definition
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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