Skip to content

update_trigger

update_trigger(
    name: NameString,
    trigger_update: TriggerUpdate,
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> UpdateTriggerResponse

Updates a trigger definition.

Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Amazon Web Services Secrets Manager or other secret management mechanism if you intend to keep them within the Job.

Parameters:

  • name (NameString) –

    The name of the trigger to update.

  • trigger_update (TriggerUpdate) –

    The new values with which to update the trigger.

Raises:

Source code in docs_src/capo_glue/_services/glue.py
def update_trigger(
    self,
    name: "capo_glue.types.name_string.NameString",
    trigger_update: "capo_glue.types.trigger_update.TriggerUpdate",
    *,
    config_overrides: Optional[GlueClientConfig] = None,
) -> "capo_glue.types.update_trigger_response.UpdateTriggerResponse":
    """<p>Updates a trigger definition.</p> <p>Job arguments may be logged. Do not pass plaintext secrets as arguments. Retrieve secrets from a Glue Connection, Amazon Web Services Secrets Manager or other secret management mechanism if you intend to keep them within the Job.</p>

    Args:
        name: <p>The name of the trigger to update.</p>
        trigger_update: <p>The new values with which to update the trigger.</p>

    Raises:
        capo_glue.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</p>
        capo_glue.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist</p>
        capo_glue.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
        capo_glue.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
        capo_glue.errors.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</p>
        capo_glue.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_glue.types.update_trigger_request.UpdateTriggerRequest]",
    ) -> OperationResponse[
        "capo_glue.types.update_trigger_response.UpdateTriggerResponse"
    ]:
        import capo_glue._operations.aws_glue.update_trigger

        output, http_response = (
            capo_glue._operations.aws_glue.update_trigger.update_trigger(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTrigger")
    )
    input_: capo_glue.types.update_trigger_request.UpdateTriggerRequest = {
        "name": name,
        "trigger_update": trigger_update,
    }

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