Skip to content

update_knowledge_base_refresh_schedule async

update_knowledge_base_refresh_schedule(
    aws_account_id: KbAwsAccountId,
    knowledge_base_id: KnowledgeBaseId,
    schedule_id: ScheduleId,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    schedule_frequency: Optional[KnowledgeBaseRefreshFrequency] = None,
    start_time: Optional[datetime] = None,
    state: Optional[ScheduleState] = None,
) -> UpdateKnowledgeBaseRefreshScheduleResponse

Updates the refresh schedule for an Amazon Quick Sight knowledge base. Use this operation to change how often the knowledge base refreshes, or to enable or disable the schedule. Specify the schedule by its ScheduleId. The operation changes only the fields that you provide. Any field that you omit keeps its existing value.

Parameters:

  • aws_account_id (KbAwsAccountId) –

    The ID of the Amazon Web Services account that contains the knowledge base.

  • knowledge_base_id (KnowledgeBaseId) –

    The unique identifier for the knowledge base.

  • schedule_id (ScheduleId) –

    The unique identifier for the refresh schedule to update.

  • schedule_frequency (Optional[KnowledgeBaseRefreshFrequency], default: None ) –

    The frequency configuration for the refresh schedule. The frequency configuration specifies how often the schedule runs and, for weekly or monthly schedules, the day on which it runs. If you don't specify this parameter, the schedule keeps its existing frequency.

  • start_time (Optional[datetime], default: None ) –

    The date and time, in ISO 8601 format, after which the schedule can start refreshing the knowledge base. The first refresh runs at the next scheduled time after this date and time. If you don't specify this parameter, the schedule keeps its existing start time.

  • state (Optional[ScheduleState], default: None ) –

    The state of the refresh schedule. A schedule that isn't ENABLED doesn't run refreshes. If you don't specify this parameter, the schedule keeps its existing state.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def update_knowledge_base_refresh_schedule(
    self,
    aws_account_id: "capo_quicksight.types.kb_aws_account_id.KbAwsAccountId",
    knowledge_base_id: "capo_quicksight.types.knowledge_base_id.KnowledgeBaseId",
    schedule_id: "capo_quicksight.types.schedule_id.ScheduleId",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    schedule_frequency: Optional[
        "capo_quicksight.types.knowledge_base_refresh_frequency.KnowledgeBaseRefreshFrequency"
    ] = None,
    start_time: Optional[datetime.datetime] = None,
    state: Optional["capo_quicksight.types.schedule_state.ScheduleState"] = None,
) -> "capo_quicksight.types.update_knowledge_base_refresh_schedule_response.UpdateKnowledgeBaseRefreshScheduleResponse":
    """<p>Updates the refresh schedule for an Amazon Quick Sight knowledge base. Use this operation to change how often the knowledge base refreshes, or to enable or disable the schedule. Specify the schedule by its <code>ScheduleId</code>. The operation changes only the fields that you provide. Any field that you omit keeps its existing value.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that contains the knowledge base.</p>
        knowledge_base_id: <p>The unique identifier for the knowledge base.</p>
        schedule_id: <p>The unique identifier for the refresh schedule to update.</p>
        schedule_frequency: <p>The frequency configuration for the refresh schedule. The frequency configuration specifies how often the schedule runs and, for weekly or monthly schedules, the day on which it runs. If you don't specify this parameter, the schedule keeps its existing frequency.</p>
        start_time: <p>The date and time, in ISO 8601 format, after which the schedule can start refreshing the knowledge base. The first refresh runs at the next scheduled time after this date and time. If you don't specify this parameter, the schedule keeps its existing start time.</p>
        state: <p>The state of the refresh schedule. A schedule that isn't <code>ENABLED</code> doesn't run refreshes. If you don't specify this parameter, the schedule keeps its existing state.</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.precondition_not_met_exception.PreconditionNotMetException: <p>One or more preconditions aren't met.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.update_knowledge_base_refresh_schedule_request.UpdateKnowledgeBaseRefreshScheduleRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.update_knowledge_base_refresh_schedule_response.UpdateKnowledgeBaseRefreshScheduleResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.update_knowledge_base_refresh_schedule

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateKnowledgeBaseRefreshSchedule")
    )
    input_: capo_quicksight.types.update_knowledge_base_refresh_schedule_request.UpdateKnowledgeBaseRefreshScheduleRequest = {
        "aws_account_id": aws_account_id,
        "knowledge_base_id": knowledge_base_id,
        "schedule_id": schedule_id,
    }
    if schedule_frequency is not None:
        input_["schedule_frequency"] = schedule_frequency
    if start_time is not None:
        input_["start_time"] = start_time
    if state is not None:
        input_["state"] = state

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output