pydo.functions.delete_trigger()

Description

Deletes the given trigger. To delete trigger, send a DELETE request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME. A successful deletion returns a 204 response.

Parameters

Name Type Required Description Default Value
namespace_id string True The ID of the namespace to be managed.
trigger_name string True The name of the trigger to be managed.

Request Sample

import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

resp = client.functions.delete_trigger(namespace_id="aff93af3", trigger_name="trig_name")

Responses

See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.

The action was successful and the response body is empty.

Unauthorized

Click to expand an example response.
{
  "id": "unauthorized",
  "message": "Unable to authenticate you."
}

Bad Request.

Click to expand an example response for namespace not found.
{
  "value": {
    "id": "not_found",
    "message": "namespace not found",
    "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4"
  }
}
Click to expand an example response for trigger not found.
{
  "value": {
    "id": "not_found",
    "message": "trigger not found",
    "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4"
  }
}

API Rate limit exceeded

Click to expand an example response.
{
  "id": "too_many_requests",
  "message": "API Rate limit exceeded."
}

Server error.

Click to expand an example response.
{
  "id": "server_error",
  "message": "Unexpected server-side error"
}

Unexpected error

Click to expand an example response.
{
  "id": "example_error",
  "message": "some error message"
}