pydo.operations package

Module contents

class pydo.operations.AccountOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s account attribute.

get(**kwargs: Any) MutableMapping[str, Any]

Get User Information.

To show information about the current user account, send a GET request to /v2/account.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "account": {
        "droplet_limit": 0,  # The total number of Droplets current user or
          team may have active at one time. :code:`<br>`:code:`<br>`Requires
          ``droplet:read`` scope. Required.
        "email": "str",  # The email address used by the current user to
          register for DigitalOcean. Required.
        "email_verified": False,  # Default value is False. If true, the user
          has verified their account via email. False otherwise. Required.
        "floating_ip_limit": 0,  # The total number of Floating IPs the
          current user or team may have. :code:`<br>`:code:`<br>`Requires
          ``reserved_ip:read`` scope. Required.
        "status": "active",  # Default value is "active". This value is one
          of "active", "warning" or "locked". Known values are: "active", "warning",
          and "locked".
        "status_message": "str",  # A human-readable message giving more
          details about the status of the account. Required.
        "uuid": "str",  # The unique universal identifier for the current
          user. Required.
        "name": "str",  # Optional. The display name for the current user.
        "team": {
            "name": "str",  # Optional. The name for the current team.
            "uuid": "str"  # Optional. The unique universal identifier
              for the current team.
        }
    }
}
class pydo.operations.ActionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s actions attribute.

get(action_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Action.

To retrieve a specific action object, send a GET request to /v2/actions/$ACTION_ID.

Parameters:

action_id (int) – A unique numeric ID that can be used to identify and reference an action. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional. A unique identifier for the resource
          that the action is associated with.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "transfer" to represent the state of
          an image transfer action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Actions.

This will be the entire list of actions taken on your account, so it will be quite large. As with any large collection returned by the API, the results will be paginated with only 20 on each page by default.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "actions": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was completed.
            "id": 0,  # Optional. A unique numeric ID that can be used to
              identify and reference an action.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": "str",  # Optional. A human-readable string
              that is used as a unique identifier for each region.
            "resource_id": 0,  # Optional. A unique identifier for the
              resource that the action is associated with.
            "resource_type": "str",  # Optional. The type of resource
              that the action is associated with.
            "started_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was initiated.
            "status": "in-progress",  # Optional. Default value is
              "in-progress". The current status of the action. This can be
              "in-progress", "completed", or "errored". Known values are:
              "in-progress", "completed", and "errored".
            "type": "str"  # Optional. This is the type of action that
              the object represents. For example, this could be "transfer" to represent
              the state of an image transfer action.
        }
    ],
    "links": {
        "pages": {}
    }
}
class pydo.operations.AddonsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s addons attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create/Provision a New Add-on Resource.

To create an add-on resource, send a POST request to /v2/add-ons/saas with required parameters. Some add-ons require additional metadata to be provided in the request body. To find out what metadata is required for a specific add-on, send a GET request to /v2/add-ons/apps/{app_slug}/metadata.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "app_slug": "str",  # The slug identifier for the application associated with
      the resource. Required.
    "metadata": [
        {
            "name": "str",  # The name of the metadata item to be set.
              Required.
            "value": {}
        }
    ],
    "name": "str",  # The name of the addon resource. Required.
    "plan_slug": "str",  # The slug identifier for the plan associated with the
      resource. Required.
    "fleet_uuid": "str",  # Optional. UUID of the fleet/project to which this
      resource will belong.
    "linked_droplet_id": 0  # Optional. ID of the droplet to be linked to this
      resource, if applicable.
}

# response body for status code(s): 200
response == {
    "resource": {
        "app_slug": "str",  # The slug identifier for the application
          associated with the resource. Required.
        "has_config": bool,  # Indicates if the resource has configuration
          values set by the vendor. Required.
        "name": "str",  # The name of the addon resource. Required.
        "plan_slug": "str",  # The slug identifier for the plan associated
          with the resource. Required.
        "state": "str",  # The state the resource is currently in. Required.
          Known values are: "pending", "provisioning", "provisioned", "deprovisioning",
          "deprovisioned", "provisioning-failed", "deprovisioning-failed", and
          "suspended".
        "uuid": "str",  # The unique identifier for the addon resource.
          Required.
        "app_name": "str",  # Optional. The name of the application
          associated with the resource.
        "message": "str",  # Optional. A message related to the resource, if
          applicable.
        "metadata": [
            {
                "name": "str",  # The name of the metadata item to be
                  set. Required.
                "value": {}
            }
        ],
        "plan_name": "str",  # Optional. The name of the plan associated with
          the resource.
        "plan_price_per_month": 0,  # Optional. The price of the plan per
          month in US dollars.
        "sso_url": "str"  # Optional. The Single Sign-On URL for the
          resource, if applicable.
    }
}
delete(resource_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete/Deprovision an Add-on Resource.

To delete an add-on resource, send a DELETE request to /v2/add-ons/saas/{resource_uuid} with the UUID of the resource to delete. You cannot retrieve the resource after it has been deleted. The response indicates a request was sent to the 3rd party add-on provider to delete the resource. You will no longer be billed for this resource.

Parameters:

resource_uuid (str) – A unique identifier for the add-on resource. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(resource_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get details on an Add-On Resource.

To fetch details of a specific Add-On Resource, send a GET request to /v2/add-ons/saas/{resource_uuid}. Replace {resource_uuid} with the UUID of the resource you want to retrieve.

Parameters:

resource_uuid (str) – The UUID of the add-on resource to retrieve. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "resource": {
        "app_slug": "str",  # The slug identifier for the application
          associated with the resource. Required.
        "has_config": bool,  # Indicates if the resource has configuration
          values set by the vendor. Required.
        "name": "str",  # The name of the addon resource. Required.
        "plan_slug": "str",  # The slug identifier for the plan associated
          with the resource. Required.
        "state": "str",  # The state the resource is currently in. Required.
          Known values are: "pending", "provisioning", "provisioned", "deprovisioning",
          "deprovisioned", "provisioning-failed", "deprovisioning-failed", and
          "suspended".
        "uuid": "str",  # The unique identifier for the addon resource.
          Required.
        "app_name": "str",  # Optional. The name of the application
          associated with the resource.
        "message": "str",  # Optional. A message related to the resource, if
          applicable.
        "metadata": [
            {
                "name": "str",  # The name of the metadata item to be
                  set. Required.
                "value": {}
            }
        ],
        "plan_name": "str",  # Optional. The name of the plan associated with
          the resource.
        "plan_price_per_month": 0,  # Optional. The price of the plan per
          month in US dollars.
        "sso_url": "str"  # Optional. The Single Sign-On URL for the
          resource, if applicable.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_app(**kwargs: Any) MutableMapping[str, Any]

List Available Add-On Applications.

To fetch details of all available Add-On Applications, send a GET request to /v2/add-ons/apps.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "apps": [
        {
            "app_slug": "str",  # The slug identifier for the application
              associated with the resource. Required.
            "eula": "str",  # The End User License Agreement URL for the
              resource. Required.
            "plans": [
                {
                    "active": bool,  # Indicates if the plan is
                      currently active. Required.
                    "app_id": 0,  # ID of the app associated with
                      this plan. Required.
                    "available": bool,  # Indicates if the plan
                      is available for selection. Required.
                    "by_default": bool,  # Indicates if this plan
                      is the default option for the app. Required.
                    "created_at": "2020-02-20 00:00:00",  #
                      Timestamp when the plan was created. Required.
                    "display_name": "str",  # Display name for a
                      given plan. Required.
                    "id": 0,  # ID of a given plan. Required.
                    "price_per_month": 0,  # Price of a month's
                      usage of the plan in US dollars. Required.
                    "slug": "str",  # Slug identifier for the
                      plan. Required.
                    "state": "str",  # Current state of the plan.
                      Required. Known values are: "unknown", "draft", "in_review",
                      "approved", "suspended", and "archived".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Timestamp when the plan was last updated. Required.
                    "uuid": "str",  # Unique identifier for the
                      plan. Required.
                    "description": "str",  # Optional.
                      Description of an app plan.
                    "dimensions": [
                        {
                            "display_name": "str",  #
                              Display name for the dimension. Required.
                            "feature_name": "str",  #
                              Name of the feature associated with the dimension.
                              Required.
                            "id": 0,  # Unique identifier
                              for the dimension. Required.
                            "sku": "str",  # Unique
                              string identifier for the dimension, tied to a price.
                              Required.
                            "slug": "str",  # Slug
                              identifier for the dimension. Required.
                            "volumes": [
                                {
                                    "id": 0,  #
                                      Unique identifier for the addon. Required.
                                    "low_volume":
                                      0,  # The minimum volume for the volume pricing
                                      tier. Required.
                                    "max_volume":
                                      0,  # The maximum volume for the volume pricing
                                      tier. Required.
"price_per_unit": "str"  # The price per unit for
                                      the volume tier in US dollars. Required.
                                }
                            ]
                        }
                    ],
                    "features": [
                        {
                            "created_at": "2020-02-20
                              00:00:00",  # Timestamp when the feature was created.
                              Required.
                            "id": 0,  # Unique identifier
                              for the app feature. Required.
                            "name": "str",  # Name of the
                              feature. Required.
                            "type": "str",  # Feature
                              type, indicating the kind of data it holds. Required.
                              Known values are: "unknown", "string", "boolean", and
                              "allowance".
                            "updated_at": "2020-02-20
                              00:00:00",  # Timestamp when the feature was last
                              updated. Required.
                            "value": {},
                            "unit": "str"  # Optional.
                              Unit of measurement for the feature, if applicable. Units
                              apply to allowance features. Known values are:
                              "unit_unknown", "GB", "GIB", "count", "byte", and
                              "byte_second".
                        }
                    ]
                }
            ],
            "tos": "str"  # The Terms of Service URL for the resource.
              Required.
        }
    ]
}
get_app_metadata(app_slug: str, **kwargs: Any) MutableMapping[str, Any]

Get Metadata for an Add-On Application.

To find out what metadata is required for a specific add-on, send a GET request to /v2/add-ons/apps/{app_slug}/metadata. Metadata varies by application.

Parameters:

app_slug (str) – The slug identifier for the application whose metadata is being requested. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "metadata": [
        {
            "description": "str",  # A brief description of the metadata
              item. Required.
            "display_name": "str",  # The display name of the metadata
              item. Required.
            "id": 0,  # Unique identifier for the addon metadata item.
              Required.
            "name": "str",  # The name of the metadata item. Required.
            "type": "str",  # The data type of the metadata value.
              Required. Known values are: "string" and "boolean".
            "options": [
                "str"  # Optional. options.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(**kwargs: Any) MutableMapping[str, Any]

List all Add-On Resources.

To fetch all Add-On Resources under your team, send a GET request to /v2/add-ons/saas.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "resources": [
        {
            "app_slug": "str",  # The slug identifier for the application
              associated with the resource. Required.
            "has_config": bool,  # Indicates if the resource has
              configuration values set by the vendor. Required.
            "name": "str",  # The name of the addon resource. Required.
            "plan_slug": "str",  # The slug identifier for the plan
              associated with the resource. Required.
            "state": "str",  # The state the resource is currently in.
              Required. Known values are: "pending", "provisioning", "provisioned",
              "deprovisioning", "deprovisioned", "provisioning-failed",
              "deprovisioning-failed", and "suspended".
            "uuid": "str",  # The unique identifier for the addon
              resource. Required.
            "app_name": "str",  # Optional. The name of the application
              associated with the resource.
            "message": "str",  # Optional. A message related to the
              resource, if applicable.
            "metadata": [
                {
                    "name": "str",  # The name of the metadata
                      item to be set. Required.
                    "value": {}
                }
            ],
            "plan_name": "str",  # Optional. The name of the plan
              associated with the resource.
            "plan_price_per_month": 0,  # Optional. The price of the plan
              per month in US dollars.
            "sso_url": "str"  # Optional. The Single Sign-On URL for the
              resource, if applicable.
        }
    ]
}
patch(resource_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(resource_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update the name for an Add-On Resource.

To change the name of an Add-On Resource, send a PATCH request to /v2/add-ons/saas/{resource_uuid}. Replace {resource_uuid} with the UUID of the resource for which you want to change the name.

Parameters:
  • resource_uuid (str) – The UUID of the add-on resource to rename. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # The new name for the add-on resource. Required.
}

# response body for status code(s): 200
response == {
    "resource": {
        "app_slug": "str",  # The slug identifier for the application
          associated with the resource. Required.
        "has_config": bool,  # Indicates if the resource has configuration
          values set by the vendor. Required.
        "name": "str",  # The name of the addon resource. Required.
        "plan_slug": "str",  # The slug identifier for the plan associated
          with the resource. Required.
        "state": "str",  # The state the resource is currently in. Required.
          Known values are: "pending", "provisioning", "provisioned", "deprovisioning",
          "deprovisioned", "provisioning-failed", "deprovisioning-failed", and
          "suspended".
        "uuid": "str",  # The unique identifier for the addon resource.
          Required.
        "app_name": "str",  # Optional. The name of the application
          associated with the resource.
        "message": "str",  # Optional. A message related to the resource, if
          applicable.
        "metadata": [
            {
                "name": "str",  # The name of the metadata item to be
                  set. Required.
                "value": {}
            }
        ],
        "plan_name": "str",  # Optional. The name of the plan associated with
          the resource.
        "plan_price_per_month": 0,  # Optional. The price of the plan per
          month in US dollars.
        "sso_url": "str"  # Optional. The Single Sign-On URL for the
          resource, if applicable.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch_plan(resource_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch_plan(resource_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update the plan for an Add-On Resource.

To change the plan associated with an Add-On Resource, send a PATCH request to /v2/add-ons/saas/{resource_uuid}/plan. Replace {resource_uuid} with the UUID of the resource for which you want to change the plan.

Parameters:
  • resource_uuid (str) – The UUID of the add-on resource to update. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "plan_slug": "str"  # The slug identifier for the new plan to apply to the
      add-on resource. Required.
}

# response body for status code(s): 200
response == {
    "resource": {
        "app_slug": "str",  # The slug identifier for the application
          associated with the resource. Required.
        "has_config": bool,  # Indicates if the resource has configuration
          values set by the vendor. Required.
        "name": "str",  # The name of the addon resource. Required.
        "plan_slug": "str",  # The slug identifier for the plan associated
          with the resource. Required.
        "state": "str",  # The state the resource is currently in. Required.
          Known values are: "pending", "provisioning", "provisioned", "deprovisioning",
          "deprovisioned", "provisioning-failed", "deprovisioning-failed", and
          "suspended".
        "uuid": "str",  # The unique identifier for the addon resource.
          Required.
        "app_name": "str",  # Optional. The name of the application
          associated with the resource.
        "message": "str",  # Optional. A message related to the resource, if
          applicable.
        "metadata": [
            {
                "name": "str",  # The name of the metadata item to be
                  set. Required.
                "value": {}
            }
        ],
        "plan_name": "str",  # Optional. The name of the plan associated with
          the resource.
        "plan_price_per_month": 0,  # Optional. The price of the plan per
          month in US dollars.
        "sso_url": "str"  # Optional. The Single Sign-On URL for the
          resource, if applicable.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.AgentInferenceOperations(*args, **kwargs)

Bases: StreamingMixin, AgentInferenceOperations

AgentInferenceOperations with fully automatic streaming support.

Same auto-wrapping strategy as InferenceOperations. The builder prefix is derived from the class name (agent_inference), so builders named build_agent_inference_<method>_request are discovered automatically.

class pydo.operations.AppsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s apps attribute.

assign_alert_destinations(app_id: str, alert_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
assign_alert_destinations(app_id: str, alert_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update destinations for alerts.

Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app.

Parameters:
  • app_id (str) – The app ID. Required.

  • alert_id (str) – The alert ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "emails": [
        ""  # Optional. Default value is "".
    ],
    "slack_webhooks": [
        {
            "channel": "str",  # Optional. Name of the Slack Webhook
              Channel.
            "url": "str"  # Optional. URL of the Slack webhook.
        }
    ]
}

# response body for status code(s): 200
response == {
    "alert": {
        "component_name": "str",  # Optional. Name of component the alert
          belongs to.
        "emails": [
            ""  # Optional. Default value is "". Emails for alerts to go
              to.
        ],
        "id": "str",  # Optional. The ID of the alert.
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING", "CONFIGURING", "ACTIVE", and "ERROR".
        "progress": {
            "steps": [
                {
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN"  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                }
            ]
        },
        "slack_webhooks": [
            {
                "channel": "str",  # Optional. Name of the Slack
                  Webhook Channel.
                "url": "str"  # Optional. URL of the Slack webhook.
            }
        ],
        "spec": {
            "disabled": bool,  # Optional. Is the alert disabled?.
            "operator": "UNSPECIFIED_OPERATOR",  # Optional. Default
              value is "UNSPECIFIED_OPERATOR". Known values are:
              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
            "rule": "UNSPECIFIED_RULE",  # Optional. Default value is
              "UNSPECIFIED_RULE". Known values are: "UNSPECIFIED_RULE",
              "CPU_UTILIZATION", "MEM_UTILIZATION", "RESTART_COUNT",
              "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
              "FUNCTIONS_AVERAGE_DURATION_MS", "FUNCTIONS_ERROR_RATE_PER_MINUTE",
              "FUNCTIONS_AVERAGE_WAIT_TIME_MS", "FUNCTIONS_ERROR_COUNT",
              "FUNCTIONS_GB_RATE_PER_SECOND", "REQUESTS_PER_SECOND", and
              "REQUEST_DURATION_P95_MS".
            "value": 0.0,  # Optional. Threshold value for alert.
            "window": "UNSPECIFIED_WINDOW"  # Optional. Default value is
              "UNSPECIFIED_WINDOW". Known values are: "UNSPECIFIED_WINDOW",
              "FIVE_MINUTES", "TEN_MINUTES", "THIRTY_MINUTES", and "ONE_HOUR".
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
cancel_deployment(app_id: str, deployment_id: str, **kwargs: Any) MutableMapping[str, Any]

Cancel a Deployment.

Immediately cancel an in-progress deployment.

Parameters:
  • app_id (str) – The app ID. Required.

  • deployment_id (str) – The deployment ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "deployment": {
        "cause": "str",  # Optional. What caused this deployment to be
          created.
        "cloned_from": "str",  # Optional. The ID of a previous deployment
          that this deployment was cloned from.
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the deployment.
        "functions": [
            {
                "name": "str",  # Optional. The name of this
                  functions component.
                "namespace": "str",  # Optional. The namespace where
                  the functions are deployed.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this functions
                  component.
            }
        ],
        "id": "str",  # Optional. The ID of the deployment.
        "jobs": [
            {
                "name": "str",  # Optional. The name of this job.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this job.
            }
        ],
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING_BUILD", "BUILDING", "PENDING_DEPLOY",
          "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and "CANCELED".
        "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional. When the
          deployment phase was last updated.
        "progress": {
            "error_steps": 0,  # Optional. Number of unsuccessful steps.
            "pending_steps": 0,  # Optional. Number of pending steps.
            "running_steps": 0,  # Optional. Number of currently running
              steps.
            "steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "success_steps": 0,  # Optional. Number of successful steps.
            "summary_steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "total_steps": 0  # Optional. Total number of steps.
        },
        "services": [
            {
                "name": "str",  # Optional. The name of this service.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this service.
            }
        ],
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "static_sites": [
            {
                "name": "str",  # Optional. The name of this static
                  site.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this static site.
            }
        ],
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          deployment.
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the deployment
          was last updated.
        "workers": [
            {
                "name": "str",  # Optional. The name of this worker.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this worker.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
cancel_event(app_id: str, event_id: str, **kwargs: Any) MutableMapping[str, Any]

Cancel an Event.

Cancel an in-progress autoscaling event.

Parameters:
  • app_id (str) – The app ID. Required.

  • event_id (str) – The event ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "event": {
        "autoscaling": {
            "components": {
                "str": {
                    "from": 0,  # Optional. The number of
                      replicas before scaling.
                    "to": 0,  # Optional. The number of replicas
                      after scaling.
                    "triggering_metric": "str"  # Optional. The
                      metric that triggered the scale change. Known values are "cpu",
                      "requests_per_second", "request_duration". For inactivity sleep,
                      "scale_from_zero" and "scale_to_zero" are used.
                }
            },
            "phase": "str"  # Optional. The current phase of the
              autoscaling event. Known values are: "UNKNOWN", "PENDING", "IN_PROGRESS",
              "SUCCEEDED", "FAILED", and "CANCELED".
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. When the event was
          created.
        "deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "deployment_id": "str",  # Optional. For deployment events, this is
          the same as the deployment's ID. For autoscaling events, this is the
          deployment that was autoscaled.
        "id": "str",  # Optional. The ID of the event (UUID).
        "type": "str"  # Optional. The type of event. Known values are:
          "UNKNOWN", "DEPLOYMENT", and "AUTOSCALING".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
cancel_job_invocation(app_id: str, job_invocation_id: str, *, job_name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Cancel Job Invocation.

Cancel a specific job invocation for an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • job_invocation_id (str) – The ID of the job invocation to retrieve. Required.

  • job_name (str) – The job name to list job invocations for. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "completed_at": "2020-02-20 00:00:00",  # Optional. The time when the job
      invocation completed.
    "created_at": "2020-02-20 00:00:00",  # Optional. The time when the job
      invocation was created.
    "deployment_id": "str",  # Optional. The deployment ID this job invocation
      belongs to.
    "id": "str",  # Optional. The ID of the job invocation.
    "job_name": "str",  # Optional. The name of the job this invocation belongs
      to.
    "phase": "str",  # Optional. The phase of the job invocation. Known values
      are: "UNKNOWN", "PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", and
      "SKIPPED".
    "started_at": "2020-02-20 00:00:00",  # Optional. The time when the job
      invocation started.
    "trigger": {
        "manual": {
            "user": {
                "email": "str",  # Optional. The email of the user
                  who triggered the job.
                "full_name": "str",  # Optional. The name of the user
                  who triggered the job.
                "uuid": "str"  # Optional. The ID of the user who
                  triggered the job.
            }
        },
        "scheduled": {
            "schedule": {
                "cron": "str",  # Optional. The cron expression
                  defining the schedule.
                "time_zone": "str"  # Optional. The time zone for the
                  schedule.
            }
        },
        "type": "UNKNOWN"  # Optional. Default value is "UNKNOWN". The type
          of trigger that initiated the job invocation. Known values are: "MANUAL",
          "SCHEDULE", and "UNKNOWN".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
commit_rollback(app_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Commit App Rollback.

Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments.

Parameters:

app_id (str) – The app ID. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New App.

Create a new app by submitting an app specification. For documentation on app specifications (AppSpec objects), please refer to the product documentation.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "spec": {
        "name": "str",  # The name of the app. Must be unique across all apps
          in the same account. Required.
        "databases": [
            {
                "name": "str",  # The database's name. The name must
                  be unique across all components within the same app and cannot use
                  capital letters. Required.
                "cluster_name": "str",  # Optional. The name of the
                  underlying DigitalOcean DBaaS cluster. This is required for
                  production databases. For dev databases, if cluster_name is not set,
                  a new cluster will be provisioned.
                "db_name": "str",  # Optional. The name of the MySQL
                  or PostgreSQL database to configure.
                "db_user": "str",  # Optional. The name of the MySQL
                  or PostgreSQL user to configure.
                "engine": "UNSET",  # Optional. Default value is
                  "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching * MONGODB:
                  MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey.
                  Known values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                  "KAFKA", "OPENSEARCH", and "VALKEY".
                "production": bool,  # Optional. Whether this is a
                  production or dev database.
                "version": "str"  # Optional. The version of the
                  database engine.
            }
        ],
        "disable_edge_cache": False,  # Optional. Default value is False. ..
          role:: raw-html-m2r(raw)    :format: html   If set to ``true``"" , the app
          will **not** be cached at the edge (CDN). Enable this option if you want to
          manage CDN configuration yourself"u2014whether by using an external CDN
          provider or by handling static content and caching within your app. This
          setting is also recommended for apps that require real-time data or serve
          dynamic content, such as those using Server-Sent Events (SSE) over GET, or
          hosting an MCP (Model Context Protocol) Server that utilizes SSE.""
          :raw-html-m2r:`<br>` **Note:** This feature is not available for static site
          components."" :raw-html-m2r:`<br>` For more information, see `Disable CDN
          Cache
          <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
        "disable_email_obfuscation": False,  # Optional. Default value is
          False. If set to ``true``"" , email addresses in the app will not be
          obfuscated. This is useful for apps that require email addresses to be
          visible (in the HTML markup).
        "domains": [
            {
                "domain": "str",  # The hostname for the domain.
                  Required.
                "minimum_tls_version": "str",  # Optional. The
                  minimum version of TLS a client application can use to access
                  resources for the domain.  Must be one of the following values
                  wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                  "1.2" and "1.3".
                "type": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * DEFAULT: The default ``.ondigitalocean.app`` domain
                  assigned to this app * PRIMARY: The primary domain for this app that
                  is displayed as the default in the control panel, used in bindable
                  environment variables, and any other places that reference an app's
                  live URL. Only one domain may be set as primary. * ALIAS: A
                  non-primary domain. Known values are: "UNSPECIFIED", "DEFAULT",
                  "PRIMARY", and "ALIAS".
                "wildcard": bool,  # Optional. Indicates whether the
                  domain includes all sub-domains, in addition to the given domain.
                "zone": "str"  # Optional. Optional. If the domain
                  uses DigitalOcean DNS and you would like App Platform to
                  automatically manage it for you, set this to the name of the domain
                  on your account.  For example, If the domain you are adding is
                  ``app.domain.com``"" , the zone could be ``domain.com``.
            }
        ],
        "egress": {
            "type": "AUTOASSIGN"  # Optional. Default value is
              "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
              "DEDICATED_IP".
        },
        "enhanced_threat_control_enabled": False,  # Optional. Default value
          is False. If set to ``true``"" , suspicious requests will go through
          additional security checks to help mitigate layer 7 DDoS attacks.
        "functions": [
            {
                "name": "str",  # The name. Must be unique across all
                  components within the same app. Required.
                "alerts": [
                    {
                        "disabled": bool,  # Optional. Is the
                          alert disabled?.
                        "operator": "UNSPECIFIED_OPERATOR",
                          # Optional. Default value is "UNSPECIFIED_OPERATOR". Known
                          values are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                          "LESS_THAN".
                        "rule": "UNSPECIFIED_RULE",  #
                          Optional. Default value is "UNSPECIFIED_RULE". Known values
                          are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                          "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                          "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                          "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                          "FUNCTIONS_ACTIVATION_COUNT",
                          "FUNCTIONS_AVERAGE_DURATION_MS",
                          "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                          "FUNCTIONS_AVERAGE_WAIT_TIME_MS", "FUNCTIONS_ERROR_COUNT",
                          "FUNCTIONS_GB_RATE_PER_SECOND", "REQUESTS_PER_SECOND", and
                          "REQUEST_DURATION_P95_MS".
                        "value": 0.0,  # Optional. Threshold
                          value for alert.
                        "window": "UNSPECIFIED_WINDOW"  #
                          Optional. Default value is "UNSPECIFIED_WINDOW". Known values
                          are: "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                          "THIRTY_MINUTES", and "ONE_HOUR".
                    }
                ],
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "ingress": {
            "rules": [
                {
                    "component": {
                        "name": "str",  # The name of the
                          component to route to. Required.
                        "preserve_path_prefix": "str",  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``. Note: this is not applicable for Functions
                          Components and is mutually exclusive with ``rewrite``.
                        "rewrite": "str"  # Optional. An
                          optional field that will rewrite the path of the component to
                          be what is specified here. By default, the HTTP request path
                          will be trimmed from the left when forwarded to the
                          component. For example, a component with ``path=/api`` will
                          have requests to ``/api/list`` trimmed to ``/list``. If you
                          specified the rewrite to be ``/v1/``"" , requests to
                          ``/api/list`` would be rewritten to ``/v1/list``. Note: this
                          is mutually exclusive with ``preserve_path_prefix``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "match": {
                        "authority": {
                            "exact": "str"  # Exact
                              string match. An empty string is a valid value and will
                              be serialized explicitly rather than being omitted from
                              the payload. Required.
                        },
                        "path": {
                            "prefix": "str"  #
                              Prefix-based match. For example, ``/api`` will match
                              ``/api``"" , ``/api/``"" , and any nested paths such as
                              ``/api/v1/endpoint``. Required.
                        }
                    },
                    "redirect": {
                        "authority": "str",  # Optional. The
                          authority/host to redirect to. This can be a hostname or IP
                          address. Note: use ``port`` to set the port.
                        "port": 0,  # Optional. The port to
                          redirect to.
                        "redirect_code": 0,  # Optional. The
                          redirect code to use. Defaults to ``302``. Supported values
                          are 300, 301, 302, 303, 304, 307, 308.
                        "scheme": "str",  # Optional. The
                          scheme to redirect to. Supported values are ``http`` or
                          ``https``. Default: ``https``.
                        "uri": "str"  # Optional. An optional
                          URI path to redirect to. Note: if this is specified the whole
                          URI of the original request will be overwritten to this
                          value, irrespective of the original request URI being
                          matched.
                    }
                }
            ]
        },
        "jobs": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "kind": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * UNSPECIFIED: Default job type, will auto-complete to
                  POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job that runs before an
                  app deployment. * POST_DEPLOY: Indicates a job that runs after an app
                  deployment. * FAILED_DEPLOY: Indicates a job that runs after a
                  component fails to deploy. Known values are: "UNSPECIFIED",
                  "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "maintenance": {
            "archive": bool,  # Optional. Indicates whether the app
              should be archived. Setting this to true implies that enabled is set to
              true.
            "enabled": bool,  # Optional. Indicates whether maintenance
              mode should be enabled for the app.
            "offline_page_url": "str"  # Optional. A custom offline page
              to display when maintenance mode is enabled or the app is archived.
        },
        "region": "str",  # Optional. The slug form of the geographical
          origin of the app. Default: ``nearest available``. Known values are: "atl",
          "nyc", "sfo", "tor", "ams", "fra", "lon", "blr", "sgp", and "syd".
        "services": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "request_duration": {
                            "p95_milliseconds": 0  #
                              Optional. The p95 target request duration in milliseconds
                              for the component.
                        },
                        "requests_per_second": {
                            "per_instance": 0  #
                              Optional. The target number of requests per second per
                              instance for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed. If not set, the health check will
                      be performed on the component's http_port.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "http_port": 0,  # Optional. The internal port on
                  which this service's run command will listen. Default: 8080 If there
                  is not an environment variable with the name ``PORT``"" , one will be
                  automatically added with its value set to the value of this field.
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "internal_ports": [
                    0  # Optional. The ports on which this
                      service will listen for internal traffic.
                ],
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "protocol": "str",  # Optional. The protocol which
                  the service uses to serve traffic on the http_port.   * ``HTTP``"" :
                  The app is serving the HTTP protocol. Default. * ``HTTP2``"" : The
                  app is serving the HTTP/2 protocol. Currently, this needs to be
                  implemented in the service by serving HTTP/2 cleartext (h2c). Known
                  values are: "HTTP" and "HTTP2".
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "drain_seconds": 0,  # Optional. The number
                      of seconds to wait between selecting a container instance for
                      termination and issuing the TERM signal. Selecting a container
                      instance for termination begins an asynchronous drain of new
                      requests on upstream load-balancers. (Default 15).
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "static_sites": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "catchall_document": "str",  # Optional. The name of
                  the document to use as the fallback for any requests to documents
                  that are not found when serving this static site. Only 1 of
                  ``catchall_document`` or ``error_document`` can be set.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "error_document": "404.html",  # Optional. Default
                  value is "404.html". The name of the error document to use when
                  serving this static site. Default: 404.html. If no such file exists
                  within the built assets, App Platform will supply one.
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "index_document": "index.html",  # Optional. Default
                  value is "index.html". The name of the index document to use when
                  serving this static site. Default: index.html.
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "output_dir": "str",  # Optional. An optional path to
                  where the built assets will be located, relative to the build
                  context. If not set, App Platform will automatically scan for these
                  directory names: ``_static``"" , ``dist``"" , ``public``"" ,
                  ``build``.
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        },
        "workers": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "cpu": {
                            "percent": 80  # Optional.
                              Default value is 80. The average target CPU utilization
                              for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ]
    },
    "project_id": "str"  # Optional. The ID of the project the app should be
      assigned to. If omitted, it will be assigned to your default project.
      :code:`<br>`:code:`<br>`Requires ``project:update`` scope.
}

# response body for status code(s): 200
response == {
    "app": {
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "active_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the app.
        "dedicated_ips": [
            {
                "id": "str",  # Optional. The ID of the dedicated
                  egress IP.
                "ip": "str",  # Optional. The IP address of the
                  dedicated egress IP.
                "status": "UNKNOWN"  # Optional. Default value is
                  "UNKNOWN". The status of the dedicated egress IP. Known values are:
                  "UNKNOWN", "ASSIGNING", "ASSIGNED", and "REMOVED".
            }
        ],
        "default_ingress": "str",  # Optional. The default hostname on which
          the app is accessible.
        "domains": [
            {
                "certificate_expires_at": "2020-02-20 00:00:00",  #
                  Optional. Current SSL certificate expiration time.
                "id": "str",  # Optional. The ID of the domain.
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING", "CONFIGURING",
                  "ACTIVE", and "ERROR".
                "progress": {
                    "steps": [
                        {}  # Optional. The steps of the
                          domain's progress.
                    ]
                },
                "rotate_validation_records": bool,  # Optional.
                  Validation values have changed and require manual intervention.
                "spec": {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                },
                "validations": [
                    {
                        "txt_name": "str",  # Optional. TXT
                          record name.
                        "txt_value": "str"  # Optional. TXT
                          record value.
                    }
                ]
            }
        ],
        "id": "str",  # Optional. The ID of the application.
        "in_progress_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "last_deployment_created_at": "2020-02-20 00:00:00",  # Optional. The
          creation time of the last deployment.
        "live_domain": "str",  # Optional. The live domain of the app.
        "live_url": "str",  # Optional. The live URL of the app.
        "live_url_base": "str",  # Optional. The live URL base of the app,
          the URL excluding the path.
        "owner_uuid": "str",  # Optional. The ID of the account to which the
          application belongs.
        "pending_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "pinned_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "project_id": "str",  # Optional. Requires ``project:read`` scope.
        "region": {
            "continent": "str",  # Optional. The continent that this
              region is in.
            "data_centers": [
                "str"  # Optional. Data centers that are in this
                  region.
            ],
            "default": bool,  # Optional. Whether or not the region is
              presented as the default.
            "disabled": bool,  # Optional. Whether or not the region is
              open for new apps.
            "flag": "str",  # Optional. The flag of this region.
            "label": "str",  # Optional. A human-readable name of the
              region.
            "reason": "str",  # Optional. Reason that this region is not
              available.
            "slug": "str"  # Optional. The slug form of the region name.
        },
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          app.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Time of the app's
          last configuration update.
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        }
    }
}
create_deployment(app_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_deployment(app_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create an App Deployment.

Creating an app deployment will pull the latest changes from your repository and schedule a new deployment for your app.

Parameters:
  • app_id (str) – The app ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "force_build": bool  # Optional. Indicates whether to force a build of app
      from source even if an existing cached build is suitable for re-use.
}

# response body for status code(s): 200
response == {
    "deployment": {
        "cause": "str",  # Optional. What caused this deployment to be
          created.
        "cloned_from": "str",  # Optional. The ID of a previous deployment
          that this deployment was cloned from.
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the deployment.
        "functions": [
            {
                "name": "str",  # Optional. The name of this
                  functions component.
                "namespace": "str",  # Optional. The namespace where
                  the functions are deployed.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this functions
                  component.
            }
        ],
        "id": "str",  # Optional. The ID of the deployment.
        "jobs": [
            {
                "name": "str",  # Optional. The name of this job.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this job.
            }
        ],
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING_BUILD", "BUILDING", "PENDING_DEPLOY",
          "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and "CANCELED".
        "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional. When the
          deployment phase was last updated.
        "progress": {
            "error_steps": 0,  # Optional. Number of unsuccessful steps.
            "pending_steps": 0,  # Optional. Number of pending steps.
            "running_steps": 0,  # Optional. Number of currently running
              steps.
            "steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "success_steps": 0,  # Optional. Number of successful steps.
            "summary_steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "total_steps": 0  # Optional. Total number of steps.
        },
        "services": [
            {
                "name": "str",  # Optional. The name of this service.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this service.
            }
        ],
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "static_sites": [
            {
                "name": "str",  # Optional. The name of this static
                  site.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this static site.
            }
        ],
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          deployment.
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the deployment
          was last updated.
        "workers": [
            {
                "name": "str",  # Optional. The name of this worker.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this worker.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_rollback(app_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_rollback(app_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Rollback App.

Rollback an app to a previous deployment. A new deployment will be created to perform the rollback. The app will be pinned to the rollback deployment preventing any new deployments from being created, either manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be either committed or reverted.

It is recommended to use the Validate App Rollback endpoint to double check if the rollback is valid and if there are any warnings.

Parameters:
  • app_id (str) – The app ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "deployment_id": "str",  # Optional. The ID of the deployment to rollback to.
    "skip_pin": bool  # Optional. Whether to skip pinning the rollback
      deployment. If false, the rollback deployment will be pinned and any new
      deployments including Auto Deploy on Push hooks will be disabled until the
      rollback is either manually committed or reverted via the CommitAppRollback or
      RevertAppRollback endpoints respectively. If true, the rollback will be
      immediately committed and the app will remain unpinned.
}

# response body for status code(s): 200
response == {
    "deployment": {
        "cause": "str",  # Optional. What caused this deployment to be
          created.
        "cloned_from": "str",  # Optional. The ID of a previous deployment
          that this deployment was cloned from.
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the deployment.
        "functions": [
            {
                "name": "str",  # Optional. The name of this
                  functions component.
                "namespace": "str",  # Optional. The namespace where
                  the functions are deployed.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this functions
                  component.
            }
        ],
        "id": "str",  # Optional. The ID of the deployment.
        "jobs": [
            {
                "name": "str",  # Optional. The name of this job.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this job.
            }
        ],
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING_BUILD", "BUILDING", "PENDING_DEPLOY",
          "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and "CANCELED".
        "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional. When the
          deployment phase was last updated.
        "progress": {
            "error_steps": 0,  # Optional. Number of unsuccessful steps.
            "pending_steps": 0,  # Optional. Number of pending steps.
            "running_steps": 0,  # Optional. Number of currently running
              steps.
            "steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "success_steps": 0,  # Optional. Number of successful steps.
            "summary_steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "total_steps": 0  # Optional. Total number of steps.
        },
        "services": [
            {
                "name": "str",  # Optional. The name of this service.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this service.
            }
        ],
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "static_sites": [
            {
                "name": "str",  # Optional. The name of this static
                  site.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this static site.
            }
        ],
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          deployment.
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the deployment
          was last updated.
        "workers": [
            {
                "name": "str",  # Optional. The name of this worker.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this worker.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(id: str, **kwargs: Any) MutableMapping[str, Any]

Delete an App.

Delete an existing app. Once deleted, all active deployments will be permanently shut down and the app deleted. If needed, be sure to back up your app specification so that you may re-create it at a later time.

Parameters:

id (str) – The ID of the app. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "id": "str"  # Optional. The ID of the app that was deleted.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(id: str, *, name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing App.

Retrieve details about an existing app by either its ID or name. To retrieve an app by its name, do not include an ID in the request path. Information about the current active deployment as well as any in progress ones will also be included in the response.

Parameters:
  • id (str) – The ID of the app. Required.

  • name (str) – The name of the app to retrieve. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "app": {
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "active_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the app.
        "dedicated_ips": [
            {
                "id": "str",  # Optional. The ID of the dedicated
                  egress IP.
                "ip": "str",  # Optional. The IP address of the
                  dedicated egress IP.
                "status": "UNKNOWN"  # Optional. Default value is
                  "UNKNOWN". The status of the dedicated egress IP. Known values are:
                  "UNKNOWN", "ASSIGNING", "ASSIGNED", and "REMOVED".
            }
        ],
        "default_ingress": "str",  # Optional. The default hostname on which
          the app is accessible.
        "domains": [
            {
                "certificate_expires_at": "2020-02-20 00:00:00",  #
                  Optional. Current SSL certificate expiration time.
                "id": "str",  # Optional. The ID of the domain.
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING", "CONFIGURING",
                  "ACTIVE", and "ERROR".
                "progress": {
                    "steps": [
                        {}  # Optional. The steps of the
                          domain's progress.
                    ]
                },
                "rotate_validation_records": bool,  # Optional.
                  Validation values have changed and require manual intervention.
                "spec": {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                },
                "validations": [
                    {
                        "txt_name": "str",  # Optional. TXT
                          record name.
                        "txt_value": "str"  # Optional. TXT
                          record value.
                    }
                ]
            }
        ],
        "id": "str",  # Optional. The ID of the application.
        "in_progress_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "last_deployment_created_at": "2020-02-20 00:00:00",  # Optional. The
          creation time of the last deployment.
        "live_domain": "str",  # Optional. The live domain of the app.
        "live_url": "str",  # Optional. The live URL of the app.
        "live_url_base": "str",  # Optional. The live URL base of the app,
          the URL excluding the path.
        "owner_uuid": "str",  # Optional. The ID of the account to which the
          application belongs.
        "pending_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "pinned_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "project_id": "str",  # Optional. Requires ``project:read`` scope.
        "region": {
            "continent": "str",  # Optional. The continent that this
              region is in.
            "data_centers": [
                "str"  # Optional. Data centers that are in this
                  region.
            ],
            "default": bool,  # Optional. Whether or not the region is
              presented as the default.
            "disabled": bool,  # Optional. Whether or not the region is
              open for new apps.
            "flag": "str",  # Optional. The flag of this region.
            "label": "str",  # Optional. A human-readable name of the
              region.
            "reason": "str",  # Optional. Reason that this region is not
              available.
            "slug": "str"  # Optional. The slug form of the region name.
        },
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          app.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Time of the app's
          last configuration update.
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_deployment(app_id: str, deployment_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an App Deployment.

Retrieve information about an app deployment.

Parameters:
  • app_id (str) – The app ID. Required.

  • deployment_id (str) – The deployment ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "deployment": {
        "cause": "str",  # Optional. What caused this deployment to be
          created.
        "cloned_from": "str",  # Optional. The ID of a previous deployment
          that this deployment was cloned from.
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the deployment.
        "functions": [
            {
                "name": "str",  # Optional. The name of this
                  functions component.
                "namespace": "str",  # Optional. The namespace where
                  the functions are deployed.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this functions
                  component.
            }
        ],
        "id": "str",  # Optional. The ID of the deployment.
        "jobs": [
            {
                "name": "str",  # Optional. The name of this job.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this job.
            }
        ],
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING_BUILD", "BUILDING", "PENDING_DEPLOY",
          "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and "CANCELED".
        "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional. When the
          deployment phase was last updated.
        "progress": {
            "error_steps": 0,  # Optional. Number of unsuccessful steps.
            "pending_steps": 0,  # Optional. Number of pending steps.
            "running_steps": 0,  # Optional. Number of currently running
              steps.
            "steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "success_steps": 0,  # Optional. Number of successful steps.
            "summary_steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "total_steps": 0  # Optional. Total number of steps.
        },
        "services": [
            {
                "name": "str",  # Optional. The name of this service.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this service.
            }
        ],
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "static_sites": [
            {
                "name": "str",  # Optional. The name of this static
                  site.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this static site.
            }
        ],
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          deployment.
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the deployment
          was last updated.
        "workers": [
            {
                "name": "str",  # Optional. The name of this worker.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this worker.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_event(app_id: str, event_id: str, **kwargs: Any) MutableMapping[str, Any]

Get an Event.

Get a single event for an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • event_id (str) – The event ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "event": {
        "autoscaling": {
            "components": {
                "str": {
                    "from": 0,  # Optional. The number of
                      replicas before scaling.
                    "to": 0,  # Optional. The number of replicas
                      after scaling.
                    "triggering_metric": "str"  # Optional. The
                      metric that triggered the scale change. Known values are "cpu",
                      "requests_per_second", "request_duration". For inactivity sleep,
                      "scale_from_zero" and "scale_to_zero" are used.
                }
            },
            "phase": "str"  # Optional. The current phase of the
              autoscaling event. Known values are: "UNKNOWN", "PENDING", "IN_PROGRESS",
              "SUCCEEDED", "FAILED", and "CANCELED".
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. When the event was
          created.
        "deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "deployment_id": "str",  # Optional. For deployment events, this is
          the same as the deployment's ID. For autoscaling events, this is the
          deployment that was autoscaled.
        "id": "str",  # Optional. The ID of the event (UUID).
        "type": "str"  # Optional. The type of event. Known values are:
          "UNKNOWN", "DEPLOYMENT", and "AUTOSCALING".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_event_logs(app_id: str, event_id: str, *, follow: Optional[bool] = None, type: str = 'UNSPECIFIED', pod_connection_timeout: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Event Logs.

Retrieve the logs of an autoscaling event for an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • event_id (str) – The event ID. Required.

  • follow (bool) – Whether the logs should follow live updates. Default value is None.

  • type (str) –

    The type of logs to retrieve

    • BUILD: Build-time logs

    • DEPLOY: Deploy-time logs

    • RUN: Live run-time logs

    • RUN_RESTARTED: Logs of crashed/restarted instances during runtime

    • AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id). Known values are:

    ”UNSPECIFIED”, “BUILD”, “DEPLOY”, “RUN”, “RUN_RESTARTED”, and “AUTOSCALE_EVENT”. Default value is “UNSPECIFIED”.

  • pod_connection_timeout (str) – An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "historic_urls": [
        "str"  # Optional. A list of URLs to archived log files.
    ],
    "live_url": "str"  # Optional. A URL of the real-time live logs. This URL may
      use either the ``https://`` or ``wss://`` protocols and will keep pushing live
      logs as they become available.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_exec(app_id: str, deployment_id: str, component_name: str, *, instance_name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Exec URL for Deployment.

Returns a websocket URL that allows sending/receiving console input and output to a component of the specified deployment if one exists. Optionally, the instance_name parameter can be provided to retrieve the exec URL for a specific instance. Note that instances are ephemeral; therefore, we recommended to avoid making persistent changes or such scripting around them.

Parameters:
  • app_id (str) – The app ID. Required.

  • deployment_id (str) – The deployment ID. Required.

  • component_name (str) – An optional component name. If set, logs will be limited to this component only. Required.

  • instance_name (str) – The name of the actively running ephemeral compute instance. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "url": "str"  # Optional. A websocket URL that allows sending/receiving
      console input and receiving console output.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_exec_active_deployment(app_id: str, component_name: str, *, instance_name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Exec URL.

Returns a websocket URL that allows sending/receiving console input and output to a component of the active deployment if one exists.

Parameters:
  • app_id (str) – The app ID. Required.

  • component_name (str) – An optional component name. If set, logs will be limited to this component only. Required.

  • instance_name (str) – The name of the actively running ephemeral compute instance. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "url": "str"  # Optional. A websocket URL that allows sending/receiving
      console input and receiving console output.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_health(app_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve App Health.

Retrieve information like health status, cpu and memory utilization of app components.

Parameters:

app_id (str) – The app ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "app_health": {
        "components": [
            {
                "cpu_usage_percent": 0.0,  # Optional.
                "memory_usage_percent": 0.0,  # Optional.
                "name": "str",  # Optional.
                "replicas_desired": 0,  # Optional.
                "replicas_ready": 0,  # Optional.
                "state": "UNKNOWN"  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "HEALTHY", and "UNHEALTHY".
            }
        ],
        "functions_components": [
            {
                "functions_component_health_metrics": [
                    {
                        "metric_label": "str",  # Optional.
                        "metric_value": 0.0,  # Optional.
                        "time_window": "str"  # Optional.
                    }
                ],
                "name": "str"  # Optional.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_instance_size(slug: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Instance Size.

Retrieve information about a specific instance size for service, worker, and job components.

Parameters:

slug (str) – The slug of the instance size. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "instance_size": {
        "bandwidth_allowance_gib": "str",  # Optional. The bandwidth
          allowance in GiB for the instance size.
        "cpu_type": "UNSPECIFIED",  # Optional. Default value is
          "UNSPECIFIED". * SHARED: Shared vCPU cores    * DEDICATED: Dedicated vCPU
          cores. Known values are: "UNSPECIFIED", "SHARED", and "DEDICATED".
        "cpus": "str",  # Optional. The number of allotted vCPU cores.
        "deprecation_intent": bool,  # Optional. Indicates if the instance
          size is intended for deprecation.
        "memory_bytes": "str",  # Optional. The allotted memory in bytes.
        "name": "str",  # Optional. A human-readable name of the instance
          size.
        "scalable": bool,  # Optional. Indicates if the instance size can
          enable autoscaling.
        "single_instance_only": bool,  # Optional. Indicates if the instance
          size allows more than one instance.
        "slug": "str",  # Optional. The slug of the instance size.
        "tier_downgrade_to": "str",  # Optional. The slug of the
          corresponding downgradable instance size on the lower tier.
        "tier_slug": "str",  # Optional. The slug of the tier to which this
          instance size belongs.
        "tier_upgrade_to": "str",  # Optional. The slug of the corresponding
          upgradable instance size on the higher tier.
        "usd_per_month": "str",  # Optional. The cost of this instance size
          in USD per month.
        "usd_per_second": "str"  # Optional. The cost of this instance size
          in USD per second.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_instances(app_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve App Instances.

Retrieve the list of running instances for a given application, including instance names and component types. Please note that these instances are ephemeral and may change over time. It is recommended not to make persistent changes or develop scripts that rely on their persistence.

Parameters:

app_id (str) – The app ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "instances": [
        {
            "component_name": "str",  # Optional. Name of the component,
              from the app spec.
            "component_type": "str",  # Optional. Supported compute
              component by DigitalOcean App Platform. Known values are: "SERVICE",
              "WORKER", and "JOB".
            "instance_alias": "str",  # Optional. Readable identifier, an
              alias of the instance name, reference for mapping insights to instance
              names.
            "instance_name": "str"  # Optional. Name of the instance,
              which is a unique identifier for the instance.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_job_invocation(app_id: str, job_invocation_id: str, *, job_name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get Job Invocations.

Get a specific job invocation for an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • job_invocation_id (str) – The ID of the job invocation to retrieve. Required.

  • job_name (str) – The job name to list job invocations for. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "completed_at": "2020-02-20 00:00:00",  # Optional. The time when the job
      invocation completed.
    "created_at": "2020-02-20 00:00:00",  # Optional. The time when the job
      invocation was created.
    "deployment_id": "str",  # Optional. The deployment ID this job invocation
      belongs to.
    "id": "str",  # Optional. The ID of the job invocation.
    "job_name": "str",  # Optional. The name of the job this invocation belongs
      to.
    "phase": "str",  # Optional. The phase of the job invocation. Known values
      are: "UNKNOWN", "PENDING", "RUNNING", "SUCCEEDED", "FAILED", "CANCELED", and
      "SKIPPED".
    "started_at": "2020-02-20 00:00:00",  # Optional. The time when the job
      invocation started.
    "trigger": {
        "manual": {
            "user": {
                "email": "str",  # Optional. The email of the user
                  who triggered the job.
                "full_name": "str",  # Optional. The name of the user
                  who triggered the job.
                "uuid": "str"  # Optional. The ID of the user who
                  triggered the job.
            }
        },
        "scheduled": {
            "schedule": {
                "cron": "str",  # Optional. The cron expression
                  defining the schedule.
                "time_zone": "str"  # Optional. The time zone for the
                  schedule.
            }
        },
        "type": "UNKNOWN"  # Optional. Default value is "UNKNOWN". The type
          of trigger that initiated the job invocation. Known values are: "MANUAL",
          "SCHEDULE", and "UNKNOWN".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_job_invocation_logs(app_id: str, job_name: str, job_invocation_id: str, *, type: str, deployment_id: Optional[str] = None, follow: Optional[bool] = None, pod_connection_timeout: Optional[str] = None, tail_lines: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Job Invocation Logs.

Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. If deployment is omitted the active deployment will be selected (if available). The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.

Parameters:
  • app_id (str) – The app ID. Required.

  • job_name (str) – The job name to list job invocations for. Required.

  • job_invocation_id (str) – The ID of the job invocation to retrieve. Required.

  • type (str) – The type of logs to retrieve. “JOB_INVOCATION” Required.

  • deployment_id (str) – The deployment ID. Default value is None.

  • follow (bool) – Whether the logs should follow live updates. Default value is None.

  • pod_connection_timeout (str) – An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. Default value is None.

  • tail_lines (str) – The number of lines from the end of the logs to retrieve. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "historic_urls": [
        "str"  # Optional. A list of URLs to archived log files.
    ],
    "live_url": "str"  # Optional. A URL of the real-time live logs. This URL may
      use either the ``https://`` or ``wss://`` protocols and will keep pushing live
      logs as they become available.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_logs(app_id: str, deployment_id: str, component_name: str, *, follow: Optional[bool] = None, type: str = 'UNSPECIFIED', pod_connection_timeout: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Deployment Logs.

Retrieve the logs of a past, in-progress, or active deployment. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.

Parameters:
  • app_id (str) – The app ID. Required.

  • deployment_id (str) – The deployment ID. Required.

  • component_name (str) – An optional component name. If set, logs will be limited to this component only. Required.

  • follow (bool) – Whether the logs should follow live updates. Default value is None.

  • type (str) –

    The type of logs to retrieve

    • BUILD: Build-time logs

    • DEPLOY: Deploy-time logs

    • RUN: Live run-time logs

    • RUN_RESTARTED: Logs of crashed/restarted instances during runtime

    • AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id). Known values are:

    ”UNSPECIFIED”, “BUILD”, “DEPLOY”, “RUN”, “RUN_RESTARTED”, and “AUTOSCALE_EVENT”. Default value is “UNSPECIFIED”.

  • pod_connection_timeout (str) – An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "historic_urls": [
        "str"  # Optional. A list of URLs to archived log files.
    ],
    "live_url": "str"  # Optional. A URL of the real-time live logs. This URL may
      use either the ``https://`` or ``wss://`` protocols and will keep pushing live
      logs as they become available.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_logs_active_deployment(app_id: str, component_name: str, *, follow: Optional[bool] = None, type: str = 'UNSPECIFIED', pod_connection_timeout: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Active Deployment Logs.

Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.

Parameters:
  • app_id (str) – The app ID. Required.

  • component_name (str) – An optional component name. If set, logs will be limited to this component only. Required.

  • follow (bool) – Whether the logs should follow live updates. Default value is None.

  • type (str) –

    The type of logs to retrieve

    • BUILD: Build-time logs

    • DEPLOY: Deploy-time logs

    • RUN: Live run-time logs

    • RUN_RESTARTED: Logs of crashed/restarted instances during runtime

    • AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id). Known values are:

    ”UNSPECIFIED”, “BUILD”, “DEPLOY”, “RUN”, “RUN_RESTARTED”, and “AUTOSCALE_EVENT”. Default value is “UNSPECIFIED”.

  • pod_connection_timeout (str) – An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "historic_urls": [
        "str"  # Optional. A list of URLs to archived log files.
    ],
    "live_url": "str"  # Optional. A URL of the real-time live logs. This URL may
      use either the ``https://`` or ``wss://`` protocols and will keep pushing live
      logs as they become available.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_logs_active_deployment_aggregate(app_id: str, *, follow: Optional[bool] = None, type: str = 'UNSPECIFIED', pod_connection_timeout: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Active Deployment Aggregate Logs.

Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.

Parameters:
  • app_id (str) – The app ID. Required.

  • follow (bool) – Whether the logs should follow live updates. Default value is None.

  • type (str) –

    The type of logs to retrieve

    • BUILD: Build-time logs

    • DEPLOY: Deploy-time logs

    • RUN: Live run-time logs

    • RUN_RESTARTED: Logs of crashed/restarted instances during runtime

    • AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id). Known values are:

    ”UNSPECIFIED”, “BUILD”, “DEPLOY”, “RUN”, “RUN_RESTARTED”, and “AUTOSCALE_EVENT”. Default value is “UNSPECIFIED”.

  • pod_connection_timeout (str) – An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "historic_urls": [
        "str"  # Optional. A list of URLs to archived log files.
    ],
    "live_url": "str"  # Optional. A URL of the real-time live logs. This URL may
      use either the ``https://`` or ``wss://`` protocols and will keep pushing live
      logs as they become available.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_logs_aggregate(app_id: str, deployment_id: str, *, follow: Optional[bool] = None, type: str = 'UNSPECIFIED', pod_connection_timeout: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Aggregate Deployment Logs.

Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.

Parameters:
  • app_id (str) – The app ID. Required.

  • deployment_id (str) – The deployment ID. Required.

  • follow (bool) – Whether the logs should follow live updates. Default value is None.

  • type (str) –

    The type of logs to retrieve

    • BUILD: Build-time logs

    • DEPLOY: Deploy-time logs

    • RUN: Live run-time logs

    • RUN_RESTARTED: Logs of crashed/restarted instances during runtime

    • AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id). Known values are:

    ”UNSPECIFIED”, “BUILD”, “DEPLOY”, “RUN”, “RUN_RESTARTED”, and “AUTOSCALE_EVENT”. Default value is “UNSPECIFIED”.

  • pod_connection_timeout (str) – An optional time duration to wait if the underlying component instance is not immediately available. Default: 3m. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "historic_urls": [
        "str"  # Optional. A list of URLs to archived log files.
    ],
    "live_url": "str"  # Optional. A URL of the real-time live logs. This URL may
      use either the ``https://`` or ``wss://`` protocols and will keep pushing live
      logs as they become available.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_metrics_bandwidth_daily(app_id: str, *, date: Optional[datetime] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve App Daily Bandwidth Metrics.

Retrieve daily bandwidth usage metrics for a single app.

Parameters:
  • app_id (str) – The app ID. Required.

  • date (datetime) – Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "app_bandwidth_usage": [
        {
            "app_id": "str",  # Optional. The ID of the app.
            "bandwidth_bytes": "str"  # Optional. The used bandwidth
              amount in bytes.
        }
    ],
    "date": "2020-02-20 00:00:00"  # Optional. The date for the metrics data.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, page: int = 1, per_page: int = 20, with_projects: Optional[bool] = None, **kwargs: Any) MutableMapping[str, Any]

List All Apps.

List all apps on your account. Information about the current active deployment as well as any in progress ones will also be included for each app.

Parameters:
  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • with_projects (bool) – Whether the project_id of listed apps should be fetched and included. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "apps": [
        {
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "active_deployment": {
                "cause": "str",  # Optional. What caused this
                  deployment to be created.
                "cloned_from": "str",  # Optional. The ID of a
                  previous deployment that this deployment was cloned from.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  creation time of the deployment.
                "functions": [
                    {
                        "name": "str",  # Optional. The name
                          of this functions component.
                        "namespace": "str",  # Optional. The
                          namespace where the functions are deployed.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this functions component.
                    }
                ],
                "id": "str",  # Optional. The ID of the deployment.
                "jobs": [
                    {
                        "name": "str",  # Optional. The name
                          of this job.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this job.
                    }
                ],
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
                  "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
                  "CANCELED".
                "phase_last_updated_at": "2020-02-20 00:00:00",  #
                  Optional. When the deployment phase was last updated.
                "progress": {
                    "error_steps": 0,  # Optional. Number of
                      unsuccessful steps.
                    "pending_steps": 0,  # Optional. Number of
                      pending steps.
                    "running_steps": 0,  # Optional. Number of
                      currently running steps.
                    "steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "success_steps": 0,  # Optional. Number of
                      successful steps.
                    "summary_steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "total_steps": 0  # Optional. Total number of
                      steps.
                },
                "services": [
                    {
                        "name": "str",  # Optional. The name
                          of this service.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this service.
                    }
                ],
                "spec": {
                    "name": "str",  # The name of the app. Must
                      be unique across all apps in the same account. Required.
                    "databases": [
                        {
                            "name": "str",  # The
                              database's name. The name must be unique across all
                              components within the same app and cannot use capital
                              letters. Required.
                            "cluster_name": "str",  #
                              Optional. The name of the underlying DigitalOcean DBaaS
                              cluster. This is required for production databases. For
                              dev databases, if cluster_name is not set, a new cluster
                              will be provisioned.
                            "db_name": "str",  #
                              Optional. The name of the MySQL or PostgreSQL database to
                              configure.
                            "db_user": "str",  #
                              Optional. The name of the MySQL or PostgreSQL user to
                              configure.
                            "engine": "UNSET",  #
                              Optional. Default value is "UNSET". * MYSQL: MySQL * PG:
                              PostgreSQL * REDIS: Caching * MONGODB: MongoDB * KAFKA:
                              Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey. Known
                              values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                              "KAFKA", "OPENSEARCH", and "VALKEY".
                            "production": bool,  #
                              Optional. Whether this is a production or dev database.
                            "version": "str"  # Optional.
                              The version of the database engine.
                        }
                    ],
                    "disable_edge_cache": False,  # Optional.
                      Default value is False. .. role:: raw-html-m2r(raw)    :format:
                      html   If set to ``true``"" , the app will **not** be cached at
                      the edge (CDN). Enable this option if you want to manage CDN
                      configuration yourself"u2014whether by using an external CDN
                      provider or by handling static content and caching within your
                      app. This setting is also recommended for apps that require
                      real-time data or serve dynamic content, such as those using
                      Server-Sent Events (SSE) over GET, or hosting an MCP (Model
                      Context Protocol) Server that utilizes SSE.""
                      :raw-html-m2r:`<br>` **Note:** This feature is not available for
                      static site components."" :raw-html-m2r:`<br>` For more
                      information, see `Disable CDN Cache
                      <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                    "disable_email_obfuscation": False,  #
                      Optional. Default value is False. If set to ``true``"" , email
                      addresses in the app will not be obfuscated. This is useful for
                      apps that require email addresses to be visible (in the HTML
                      markup).
                    "domains": [
                        {
                            "domain": "str",  # The
                              hostname for the domain. Required.
                            "minimum_tls_version": "str",
                              # Optional. The minimum version of TLS a client
                              application can use to access resources for the domain.
                              Must be one of the following values wrapped within
                              quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                              "1.2" and "1.3".
                            "type": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * DEFAULT: The
                              default ``.ondigitalocean.app`` domain assigned to this
                              app * PRIMARY: The primary domain for this app that is
                              displayed as the default in the control panel, used in
                              bindable environment variables, and any other places that
                              reference an app's live URL. Only one domain may be set
                              as primary. * ALIAS: A non-primary domain. Known values
                              are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and "ALIAS".
                            "wildcard": bool,  #
                              Optional. Indicates whether the domain includes all
                              sub-domains, in addition to the given domain.
                            "zone": "str"  # Optional.
                              Optional. If the domain uses DigitalOcean DNS and you
                              would like App Platform to automatically manage it for
                              you, set this to the name of the domain on your account.
                              For example, If the domain you are adding is
                              ``app.domain.com``"" , the zone could be ``domain.com``.
                        }
                    ],
                    "egress": {
                        "type": "AUTOASSIGN"  # Optional.
                          Default value is "AUTOASSIGN". The app egress type. Known
                          values are: "AUTOASSIGN" and "DEDICATED_IP".
                    },
                    "enhanced_threat_control_enabled": False,  #
                      Optional. Default value is False. If set to ``true``"" ,
                      suspicious requests will go through additional security checks to
                      help mitigate layer 7 DDoS attacks.
                    "functions": [
                        {
                            "name": "str",  # The name.
                              Must be unique across all components within the same app.
                              Required.
                            "alerts": [
                                {
                                    "disabled":
                                      bool,  # Optional. Is the alert disabled?.
                                    "operator":
                                      "UNSPECIFIED_OPERATOR",  # Optional. Default
                                      value is "UNSPECIFIED_OPERATOR". Known values
                                      are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                      "LESS_THAN".
                                    "rule":
                                      "UNSPECIFIED_RULE",  # Optional. Default value is
                                      "UNSPECIFIED_RULE". Known values are:
                                      "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                      "MEM_UTILIZATION", "RESTART_COUNT",
                                      "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                      "DOMAIN_FAILED", "DOMAIN_LIVE",
                                      "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                                      "FUNCTIONS_ACTIVATION_COUNT",
                                      "FUNCTIONS_AVERAGE_DURATION_MS",
                                      "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                      "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                      "FUNCTIONS_ERROR_COUNT",
                                      "FUNCTIONS_GB_RATE_PER_SECOND",
                                      "REQUESTS_PER_SECOND", and
                                      "REQUEST_DURATION_P95_MS".
                                    "value": 0.0,
                                      # Optional. Threshold value for alert.
                                    "window":
                                      "UNSPECIFIED_WINDOW"  # Optional. Default value
                                      is "UNSPECIFIED_WINDOW". Known values are:
                                      "UNSPECIFIED_WINDOW", "FIVE_MINUTES",
                                      "TEN_MINUTES", "THIRTY_MINUTES", and "ONE_HOUR".
                                }
                            ],
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "ingress": {
                        "rules": [
                            {
                                "component": {
                                    "name":
                                      "str",  # The name of the component to route to.
                                      Required.
"preserve_path_prefix": "str",  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``. Note: this is not applicable for
                                      Functions Components and is mutually exclusive
                                      with ``rewrite``.
                                    "rewrite":
                                      "str"  # Optional. An optional field that will
                                      rewrite the path of the component to be what is
                                      specified here. By default, the HTTP request path
                                      will be trimmed from the left when forwarded to
                                      the component. For example, a component with
                                      ``path=/api`` will have requests to ``/api/list``
                                      trimmed to ``/list``. If you specified the
                                      rewrite to be ``/v1/``"" , requests to
                                      ``/api/list`` would be rewritten to ``/v1/list``.
                                      Note: this is mutually exclusive with
                                      ``preserve_path_prefix``.
                                },
                                "cors": {
"allow_credentials": bool,  # Optional. Whether
                                      browsers should expose the response to the
                                      client-side JavaScript code when the
                                      request"u2019s credentials mode is include. This
                                      configures the
                                      ``Access-Control-Allow-Credentials`` header.
"allow_headers": [
                                        "str"
                                          # Optional. The set of allowed HTTP request
                                          headers. This configures the
                                          ``Access-Control-Allow-Headers`` header.
                                    ],
"allow_methods": [
                                        "str"
                                          # Optional. The set of allowed HTTP methods.
                                          This configures the
                                          ``Access-Control-Allow-Methods`` header.
                                    ],
"allow_origins": [
                                        {
"exact": "str",  # Optional. Exact string
                                              match. Only 1 of ``exact``"" ,
                                              ``prefix``"" , or ``regex`` must be set.
                                              An empty string is a valid value and will
                                              be serialized explicitly rather than
                                              being omitted from the payload.
"prefix": "str",  # Optional.
                                              Prefix-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set.
"regex": "str"  # Optional. RE2 style
                                              regex-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set. For more information about RE2
                                              syntax, see:
                                              https://github.com/google/re2/wiki/Syntax.
                                        }
                                    ],
"expose_headers": [
                                        "str"
                                          # Optional. The set of HTTP response headers
                                          that browsers are allowed to access. This
                                          configures the
                                          ``Access-Control-Expose-Headers`` header.
                                    ],
                                    "max_age":
                                      "str"  # Optional. An optional duration
                                      specifying how long browsers can cache the
                                      results of a preflight request. This configures
                                      the ``Access-Control-Max-Age`` header.
                                },
                                "match": {
                                    "authority":
                                      {
"exact": "str"  # Exact string match. An
                                          empty string is a valid value and will be
                                          serialized explicitly rather than being
                                          omitted from the payload. Required.
                                    },
                                    "path": {
"prefix": "str"  # Prefix-based match. For
                                          example, ``/api`` will match ``/api``"" ,
                                          ``/api/``"" , and any nested paths such as
                                          ``/api/v1/endpoint``. Required.
                                    }
                                },
                                "redirect": {
                                    "authority":
                                      "str",  # Optional. The authority/host to
                                      redirect to. This can be a hostname or IP
                                      address. Note: use ``port`` to set the port.
                                    "port": 0,  #
                                      Optional. The port to redirect to.
"redirect_code": 0,  # Optional. The redirect
                                      code to use. Defaults to ``302``. Supported
                                      values are 300, 301, 302, 303, 304, 307, 308.
                                    "scheme":
                                      "str",  # Optional. The scheme to redirect to.
                                      Supported values are ``http`` or ``https``.
                                      Default: ``https``.
                                    "uri": "str"
                                      # Optional. An optional URI path to redirect to.
                                      Note: if this is specified the whole URI of the
                                      original request will be overwritten to this
                                      value, irrespective of the original request URI
                                      being matched.
                                }
                            }
                        ]
                    },
                    "jobs": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "kind": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * UNSPECIFIED:
                              Default job type, will auto-complete to POST_DEPLOY kind.
                              * PRE_DEPLOY: Indicates a job that runs before an app
                              deployment. * POST_DEPLOY: Indicates a job that runs
                              after an app deployment. * FAILED_DEPLOY: Indicates a job
                              that runs after a component fails to deploy. Known values
                              are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                              "FAILED_DEPLOY".
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "maintenance": {
                        "archive": bool,  # Optional.
                          Indicates whether the app should be archived. Setting this to
                          true implies that enabled is set to true.
                        "enabled": bool,  # Optional.
                          Indicates whether maintenance mode should be enabled for the
                          app.
                        "offline_page_url": "str"  #
                          Optional. A custom offline page to display when maintenance
                          mode is enabled or the app is archived.
                    },
                    "region": "str",  # Optional. The slug form
                      of the geographical origin of the app. Default: ``nearest
                      available``. Known values are: "atl", "nyc", "sfo", "tor", "ams",
                      "fra", "lon", "blr", "sgp", and "syd".
                    "services": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
"request_duration": {
"p95_milliseconds": 0  # Optional. The p95
                                          target request duration in milliseconds for
                                          the component.
                                    },
"requests_per_second": {
"per_instance": 0  # Optional. The target
                                          number of requests per second per instance
                                          for the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed. If not set, the health check will be
                                  performed on the component's http_port.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "http_port": 0,  # Optional.
                              The internal port on which this service's run command
                              will listen. Default: 8080 If there is not an environment
                              variable with the name ``PORT``"" , one will be
                              automatically added with its value set to the value of
                              this field.
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "internal_ports": [
                                0  # Optional. The
                                  ports on which this service will listen for internal
                                  traffic.
                            ],
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "protocol": "str",  #
                              Optional. The protocol which the service uses to serve
                              traffic on the http_port.   * ``HTTP``"" : The app is
                              serving the HTTP protocol. Default. * ``HTTP2``"" : The
                              app is serving the HTTP/2 protocol. Currently, this needs
                              to be implemented in the service by serving HTTP/2
                              cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
                                "drain_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  selecting a container instance for termination and
                                  issuing the TERM signal. Selecting a container
                                  instance for termination begins an asynchronous drain
                                  of new requests on upstream load-balancers. (Default
                                  15).
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "static_sites": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "catchall_document": "str",
                              # Optional. The name of the document to use as the
                              fallback for any requests to documents that are not found
                              when serving this static site. Only 1 of
                              ``catchall_document`` or ``error_document`` can be set.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "error_document": "404.html",
                              # Optional. Default value is "404.html". The name of the
                              error document to use when serving this static site.
                              Default: 404.html. If no such file exists within the
                              built assets, App Platform will supply one.
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "index_document":
                              "index.html",  # Optional. Default value is "index.html".
                              The name of the index document to use when serving this
                              static site. Default: index.html.
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "output_dir": "str",  #
                              Optional. An optional path to where the built assets will
                              be located, relative to the build context. If not set,
                              App Platform will automatically scan for these directory
                              names: ``_static``"" , ``dist``"" , ``public``"" ,
                              ``build``.
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "vpc": {
                        "egress_ips": [
                            {
                                "ip": "str"  #
                                  Optional. The egress ips associated with the VPC.
                            }
                        ],
                        "id": "str"  # Optional. The ID of
                          the VPC.
                    },
                    "workers": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
                                    "cpu": {
"percent": 80  # Optional. Default value is
                                          80. The average target CPU utilization for
                                          the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ]
                },
                "static_sites": [
                    {
                        "name": "str",  # Optional. The name
                          of this static site.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this static site.
                    }
                ],
                "tier_slug": "str",  # Optional. The current pricing
                  tier slug of the deployment.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  When the deployment was last updated.
                "workers": [
                    {
                        "name": "str",  # Optional. The name
                          of this worker.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this worker.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the app.
            "dedicated_ips": [
                {
                    "id": "str",  # Optional. The ID of the
                      dedicated egress IP.
                    "ip": "str",  # Optional. The IP address of
                      the dedicated egress IP.
                    "status": "UNKNOWN"  # Optional. Default
                      value is "UNKNOWN". The status of the dedicated egress IP. Known
                      values are: "UNKNOWN", "ASSIGNING", "ASSIGNED", and "REMOVED".
                }
            ],
            "default_ingress": "str",  # Optional. The default hostname
              on which the app is accessible.
            "domains": [
                {
                    "certificate_expires_at": "2020-02-20
                      00:00:00",  # Optional. Current SSL certificate expiration time.
                    "id": "str",  # Optional. The ID of the
                      domain.
                    "phase": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "CONFIGURING", "ACTIVE", and "ERROR".
                    "progress": {
                        "steps": [
                            {}  # Optional. The steps of
                              the domain's progress.
                        ]
                    },
                    "rotate_validation_records": bool,  #
                      Optional. Validation values have changed and require manual
                      intervention.
                    "spec": {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    },
                    "validations": [
                        {
                            "txt_name": "str",  #
                              Optional. TXT record name.
                            "txt_value": "str"  #
                              Optional. TXT record value.
                        }
                    ]
                }
            ],
            "id": "str",  # Optional. The ID of the application.
            "in_progress_deployment": {
                "cause": "str",  # Optional. What caused this
                  deployment to be created.
                "cloned_from": "str",  # Optional. The ID of a
                  previous deployment that this deployment was cloned from.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  creation time of the deployment.
                "functions": [
                    {
                        "name": "str",  # Optional. The name
                          of this functions component.
                        "namespace": "str",  # Optional. The
                          namespace where the functions are deployed.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this functions component.
                    }
                ],
                "id": "str",  # Optional. The ID of the deployment.
                "jobs": [
                    {
                        "name": "str",  # Optional. The name
                          of this job.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this job.
                    }
                ],
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
                  "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
                  "CANCELED".
                "phase_last_updated_at": "2020-02-20 00:00:00",  #
                  Optional. When the deployment phase was last updated.
                "progress": {
                    "error_steps": 0,  # Optional. Number of
                      unsuccessful steps.
                    "pending_steps": 0,  # Optional. Number of
                      pending steps.
                    "running_steps": 0,  # Optional. Number of
                      currently running steps.
                    "steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "success_steps": 0,  # Optional. Number of
                      successful steps.
                    "summary_steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "total_steps": 0  # Optional. Total number of
                      steps.
                },
                "services": [
                    {
                        "name": "str",  # Optional. The name
                          of this service.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this service.
                    }
                ],
                "spec": {
                    "name": "str",  # The name of the app. Must
                      be unique across all apps in the same account. Required.
                    "databases": [
                        {
                            "name": "str",  # The
                              database's name. The name must be unique across all
                              components within the same app and cannot use capital
                              letters. Required.
                            "cluster_name": "str",  #
                              Optional. The name of the underlying DigitalOcean DBaaS
                              cluster. This is required for production databases. For
                              dev databases, if cluster_name is not set, a new cluster
                              will be provisioned.
                            "db_name": "str",  #
                              Optional. The name of the MySQL or PostgreSQL database to
                              configure.
                            "db_user": "str",  #
                              Optional. The name of the MySQL or PostgreSQL user to
                              configure.
                            "engine": "UNSET",  #
                              Optional. Default value is "UNSET". * MYSQL: MySQL * PG:
                              PostgreSQL * REDIS: Caching * MONGODB: MongoDB * KAFKA:
                              Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey. Known
                              values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                              "KAFKA", "OPENSEARCH", and "VALKEY".
                            "production": bool,  #
                              Optional. Whether this is a production or dev database.
                            "version": "str"  # Optional.
                              The version of the database engine.
                        }
                    ],
                    "disable_edge_cache": False,  # Optional.
                      Default value is False. .. role:: raw-html-m2r(raw)    :format:
                      html   If set to ``true``"" , the app will **not** be cached at
                      the edge (CDN). Enable this option if you want to manage CDN
                      configuration yourself"u2014whether by using an external CDN
                      provider or by handling static content and caching within your
                      app. This setting is also recommended for apps that require
                      real-time data or serve dynamic content, such as those using
                      Server-Sent Events (SSE) over GET, or hosting an MCP (Model
                      Context Protocol) Server that utilizes SSE.""
                      :raw-html-m2r:`<br>` **Note:** This feature is not available for
                      static site components."" :raw-html-m2r:`<br>` For more
                      information, see `Disable CDN Cache
                      <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                    "disable_email_obfuscation": False,  #
                      Optional. Default value is False. If set to ``true``"" , email
                      addresses in the app will not be obfuscated. This is useful for
                      apps that require email addresses to be visible (in the HTML
                      markup).
                    "domains": [
                        {
                            "domain": "str",  # The
                              hostname for the domain. Required.
                            "minimum_tls_version": "str",
                              # Optional. The minimum version of TLS a client
                              application can use to access resources for the domain.
                              Must be one of the following values wrapped within
                              quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                              "1.2" and "1.3".
                            "type": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * DEFAULT: The
                              default ``.ondigitalocean.app`` domain assigned to this
                              app * PRIMARY: The primary domain for this app that is
                              displayed as the default in the control panel, used in
                              bindable environment variables, and any other places that
                              reference an app's live URL. Only one domain may be set
                              as primary. * ALIAS: A non-primary domain. Known values
                              are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and "ALIAS".
                            "wildcard": bool,  #
                              Optional. Indicates whether the domain includes all
                              sub-domains, in addition to the given domain.
                            "zone": "str"  # Optional.
                              Optional. If the domain uses DigitalOcean DNS and you
                              would like App Platform to automatically manage it for
                              you, set this to the name of the domain on your account.
                              For example, If the domain you are adding is
                              ``app.domain.com``"" , the zone could be ``domain.com``.
                        }
                    ],
                    "egress": {
                        "type": "AUTOASSIGN"  # Optional.
                          Default value is "AUTOASSIGN". The app egress type. Known
                          values are: "AUTOASSIGN" and "DEDICATED_IP".
                    },
                    "enhanced_threat_control_enabled": False,  #
                      Optional. Default value is False. If set to ``true``"" ,
                      suspicious requests will go through additional security checks to
                      help mitigate layer 7 DDoS attacks.
                    "functions": [
                        {
                            "name": "str",  # The name.
                              Must be unique across all components within the same app.
                              Required.
                            "alerts": [
                                {
                                    "disabled":
                                      bool,  # Optional. Is the alert disabled?.
                                    "operator":
                                      "UNSPECIFIED_OPERATOR",  # Optional. Default
                                      value is "UNSPECIFIED_OPERATOR". Known values
                                      are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                      "LESS_THAN".
                                    "rule":
                                      "UNSPECIFIED_RULE",  # Optional. Default value is
                                      "UNSPECIFIED_RULE". Known values are:
                                      "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                      "MEM_UTILIZATION", "RESTART_COUNT",
                                      "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                      "DOMAIN_FAILED", "DOMAIN_LIVE",
                                      "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                                      "FUNCTIONS_ACTIVATION_COUNT",
                                      "FUNCTIONS_AVERAGE_DURATION_MS",
                                      "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                      "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                      "FUNCTIONS_ERROR_COUNT",
                                      "FUNCTIONS_GB_RATE_PER_SECOND",
                                      "REQUESTS_PER_SECOND", and
                                      "REQUEST_DURATION_P95_MS".
                                    "value": 0.0,
                                      # Optional. Threshold value for alert.
                                    "window":
                                      "UNSPECIFIED_WINDOW"  # Optional. Default value
                                      is "UNSPECIFIED_WINDOW". Known values are:
                                      "UNSPECIFIED_WINDOW", "FIVE_MINUTES",
                                      "TEN_MINUTES", "THIRTY_MINUTES", and "ONE_HOUR".
                                }
                            ],
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "ingress": {
                        "rules": [
                            {
                                "component": {
                                    "name":
                                      "str",  # The name of the component to route to.
                                      Required.
"preserve_path_prefix": "str",  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``. Note: this is not applicable for
                                      Functions Components and is mutually exclusive
                                      with ``rewrite``.
                                    "rewrite":
                                      "str"  # Optional. An optional field that will
                                      rewrite the path of the component to be what is
                                      specified here. By default, the HTTP request path
                                      will be trimmed from the left when forwarded to
                                      the component. For example, a component with
                                      ``path=/api`` will have requests to ``/api/list``
                                      trimmed to ``/list``. If you specified the
                                      rewrite to be ``/v1/``"" , requests to
                                      ``/api/list`` would be rewritten to ``/v1/list``.
                                      Note: this is mutually exclusive with
                                      ``preserve_path_prefix``.
                                },
                                "cors": {
"allow_credentials": bool,  # Optional. Whether
                                      browsers should expose the response to the
                                      client-side JavaScript code when the
                                      request"u2019s credentials mode is include. This
                                      configures the
                                      ``Access-Control-Allow-Credentials`` header.
"allow_headers": [
                                        "str"
                                          # Optional. The set of allowed HTTP request
                                          headers. This configures the
                                          ``Access-Control-Allow-Headers`` header.
                                    ],
"allow_methods": [
                                        "str"
                                          # Optional. The set of allowed HTTP methods.
                                          This configures the
                                          ``Access-Control-Allow-Methods`` header.
                                    ],
"allow_origins": [
                                        {
"exact": "str",  # Optional. Exact string
                                              match. Only 1 of ``exact``"" ,
                                              ``prefix``"" , or ``regex`` must be set.
                                              An empty string is a valid value and will
                                              be serialized explicitly rather than
                                              being omitted from the payload.
"prefix": "str",  # Optional.
                                              Prefix-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set.
"regex": "str"  # Optional. RE2 style
                                              regex-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set. For more information about RE2
                                              syntax, see:
                                              https://github.com/google/re2/wiki/Syntax.
                                        }
                                    ],
"expose_headers": [
                                        "str"
                                          # Optional. The set of HTTP response headers
                                          that browsers are allowed to access. This
                                          configures the
                                          ``Access-Control-Expose-Headers`` header.
                                    ],
                                    "max_age":
                                      "str"  # Optional. An optional duration
                                      specifying how long browsers can cache the
                                      results of a preflight request. This configures
                                      the ``Access-Control-Max-Age`` header.
                                },
                                "match": {
                                    "authority":
                                      {
"exact": "str"  # Exact string match. An
                                          empty string is a valid value and will be
                                          serialized explicitly rather than being
                                          omitted from the payload. Required.
                                    },
                                    "path": {
"prefix": "str"  # Prefix-based match. For
                                          example, ``/api`` will match ``/api``"" ,
                                          ``/api/``"" , and any nested paths such as
                                          ``/api/v1/endpoint``. Required.
                                    }
                                },
                                "redirect": {
                                    "authority":
                                      "str",  # Optional. The authority/host to
                                      redirect to. This can be a hostname or IP
                                      address. Note: use ``port`` to set the port.
                                    "port": 0,  #
                                      Optional. The port to redirect to.
"redirect_code": 0,  # Optional. The redirect
                                      code to use. Defaults to ``302``. Supported
                                      values are 300, 301, 302, 303, 304, 307, 308.
                                    "scheme":
                                      "str",  # Optional. The scheme to redirect to.
                                      Supported values are ``http`` or ``https``.
                                      Default: ``https``.
                                    "uri": "str"
                                      # Optional. An optional URI path to redirect to.
                                      Note: if this is specified the whole URI of the
                                      original request will be overwritten to this
                                      value, irrespective of the original request URI
                                      being matched.
                                }
                            }
                        ]
                    },
                    "jobs": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "kind": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * UNSPECIFIED:
                              Default job type, will auto-complete to POST_DEPLOY kind.
                              * PRE_DEPLOY: Indicates a job that runs before an app
                              deployment. * POST_DEPLOY: Indicates a job that runs
                              after an app deployment. * FAILED_DEPLOY: Indicates a job
                              that runs after a component fails to deploy. Known values
                              are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                              "FAILED_DEPLOY".
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "maintenance": {
                        "archive": bool,  # Optional.
                          Indicates whether the app should be archived. Setting this to
                          true implies that enabled is set to true.
                        "enabled": bool,  # Optional.
                          Indicates whether maintenance mode should be enabled for the
                          app.
                        "offline_page_url": "str"  #
                          Optional. A custom offline page to display when maintenance
                          mode is enabled or the app is archived.
                    },
                    "region": "str",  # Optional. The slug form
                      of the geographical origin of the app. Default: ``nearest
                      available``. Known values are: "atl", "nyc", "sfo", "tor", "ams",
                      "fra", "lon", "blr", "sgp", and "syd".
                    "services": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
"request_duration": {
"p95_milliseconds": 0  # Optional. The p95
                                          target request duration in milliseconds for
                                          the component.
                                    },
"requests_per_second": {
"per_instance": 0  # Optional. The target
                                          number of requests per second per instance
                                          for the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed. If not set, the health check will be
                                  performed on the component's http_port.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "http_port": 0,  # Optional.
                              The internal port on which this service's run command
                              will listen. Default: 8080 If there is not an environment
                              variable with the name ``PORT``"" , one will be
                              automatically added with its value set to the value of
                              this field.
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "internal_ports": [
                                0  # Optional. The
                                  ports on which this service will listen for internal
                                  traffic.
                            ],
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "protocol": "str",  #
                              Optional. The protocol which the service uses to serve
                              traffic on the http_port.   * ``HTTP``"" : The app is
                              serving the HTTP protocol. Default. * ``HTTP2``"" : The
                              app is serving the HTTP/2 protocol. Currently, this needs
                              to be implemented in the service by serving HTTP/2
                              cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
                                "drain_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  selecting a container instance for termination and
                                  issuing the TERM signal. Selecting a container
                                  instance for termination begins an asynchronous drain
                                  of new requests on upstream load-balancers. (Default
                                  15).
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "static_sites": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "catchall_document": "str",
                              # Optional. The name of the document to use as the
                              fallback for any requests to documents that are not found
                              when serving this static site. Only 1 of
                              ``catchall_document`` or ``error_document`` can be set.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "error_document": "404.html",
                              # Optional. Default value is "404.html". The name of the
                              error document to use when serving this static site.
                              Default: 404.html. If no such file exists within the
                              built assets, App Platform will supply one.
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "index_document":
                              "index.html",  # Optional. Default value is "index.html".
                              The name of the index document to use when serving this
                              static site. Default: index.html.
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "output_dir": "str",  #
                              Optional. An optional path to where the built assets will
                              be located, relative to the build context. If not set,
                              App Platform will automatically scan for these directory
                              names: ``_static``"" , ``dist``"" , ``public``"" ,
                              ``build``.
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "vpc": {
                        "egress_ips": [
                            {
                                "ip": "str"  #
                                  Optional. The egress ips associated with the VPC.
                            }
                        ],
                        "id": "str"  # Optional. The ID of
                          the VPC.
                    },
                    "workers": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
                                    "cpu": {
"percent": 80  # Optional. Default value is
                                          80. The average target CPU utilization for
                                          the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ]
                },
                "static_sites": [
                    {
                        "name": "str",  # Optional. The name
                          of this static site.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this static site.
                    }
                ],
                "tier_slug": "str",  # Optional. The current pricing
                  tier slug of the deployment.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  When the deployment was last updated.
                "workers": [
                    {
                        "name": "str",  # Optional. The name
                          of this worker.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this worker.
                    }
                ]
            },
            "last_deployment_created_at": "2020-02-20 00:00:00",  #
              Optional. The creation time of the last deployment.
            "live_domain": "str",  # Optional. The live domain of the
              app.
            "live_url": "str",  # Optional. The live URL of the app.
            "live_url_base": "str",  # Optional. The live URL base of the
              app, the URL excluding the path.
            "owner_uuid": "str",  # Optional. The ID of the account to
              which the application belongs.
            "pending_deployment": {
                "cause": "str",  # Optional. What caused this
                  deployment to be created.
                "cloned_from": "str",  # Optional. The ID of a
                  previous deployment that this deployment was cloned from.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  creation time of the deployment.
                "functions": [
                    {
                        "name": "str",  # Optional. The name
                          of this functions component.
                        "namespace": "str",  # Optional. The
                          namespace where the functions are deployed.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this functions component.
                    }
                ],
                "id": "str",  # Optional. The ID of the deployment.
                "jobs": [
                    {
                        "name": "str",  # Optional. The name
                          of this job.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this job.
                    }
                ],
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
                  "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
                  "CANCELED".
                "phase_last_updated_at": "2020-02-20 00:00:00",  #
                  Optional. When the deployment phase was last updated.
                "progress": {
                    "error_steps": 0,  # Optional. Number of
                      unsuccessful steps.
                    "pending_steps": 0,  # Optional. Number of
                      pending steps.
                    "running_steps": 0,  # Optional. Number of
                      currently running steps.
                    "steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "success_steps": 0,  # Optional. Number of
                      successful steps.
                    "summary_steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "total_steps": 0  # Optional. Total number of
                      steps.
                },
                "services": [
                    {
                        "name": "str",  # Optional. The name
                          of this service.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this service.
                    }
                ],
                "spec": {
                    "name": "str",  # The name of the app. Must
                      be unique across all apps in the same account. Required.
                    "databases": [
                        {
                            "name": "str",  # The
                              database's name. The name must be unique across all
                              components within the same app and cannot use capital
                              letters. Required.
                            "cluster_name": "str",  #
                              Optional. The name of the underlying DigitalOcean DBaaS
                              cluster. This is required for production databases. For
                              dev databases, if cluster_name is not set, a new cluster
                              will be provisioned.
                            "db_name": "str",  #
                              Optional. The name of the MySQL or PostgreSQL database to
                              configure.
                            "db_user": "str",  #
                              Optional. The name of the MySQL or PostgreSQL user to
                              configure.
                            "engine": "UNSET",  #
                              Optional. Default value is "UNSET". * MYSQL: MySQL * PG:
                              PostgreSQL * REDIS: Caching * MONGODB: MongoDB * KAFKA:
                              Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey. Known
                              values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                              "KAFKA", "OPENSEARCH", and "VALKEY".
                            "production": bool,  #
                              Optional. Whether this is a production or dev database.
                            "version": "str"  # Optional.
                              The version of the database engine.
                        }
                    ],
                    "disable_edge_cache": False,  # Optional.
                      Default value is False. .. role:: raw-html-m2r(raw)    :format:
                      html   If set to ``true``"" , the app will **not** be cached at
                      the edge (CDN). Enable this option if you want to manage CDN
                      configuration yourself"u2014whether by using an external CDN
                      provider or by handling static content and caching within your
                      app. This setting is also recommended for apps that require
                      real-time data or serve dynamic content, such as those using
                      Server-Sent Events (SSE) over GET, or hosting an MCP (Model
                      Context Protocol) Server that utilizes SSE.""
                      :raw-html-m2r:`<br>` **Note:** This feature is not available for
                      static site components."" :raw-html-m2r:`<br>` For more
                      information, see `Disable CDN Cache
                      <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                    "disable_email_obfuscation": False,  #
                      Optional. Default value is False. If set to ``true``"" , email
                      addresses in the app will not be obfuscated. This is useful for
                      apps that require email addresses to be visible (in the HTML
                      markup).
                    "domains": [
                        {
                            "domain": "str",  # The
                              hostname for the domain. Required.
                            "minimum_tls_version": "str",
                              # Optional. The minimum version of TLS a client
                              application can use to access resources for the domain.
                              Must be one of the following values wrapped within
                              quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                              "1.2" and "1.3".
                            "type": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * DEFAULT: The
                              default ``.ondigitalocean.app`` domain assigned to this
                              app * PRIMARY: The primary domain for this app that is
                              displayed as the default in the control panel, used in
                              bindable environment variables, and any other places that
                              reference an app's live URL. Only one domain may be set
                              as primary. * ALIAS: A non-primary domain. Known values
                              are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and "ALIAS".
                            "wildcard": bool,  #
                              Optional. Indicates whether the domain includes all
                              sub-domains, in addition to the given domain.
                            "zone": "str"  # Optional.
                              Optional. If the domain uses DigitalOcean DNS and you
                              would like App Platform to automatically manage it for
                              you, set this to the name of the domain on your account.
                              For example, If the domain you are adding is
                              ``app.domain.com``"" , the zone could be ``domain.com``.
                        }
                    ],
                    "egress": {
                        "type": "AUTOASSIGN"  # Optional.
                          Default value is "AUTOASSIGN". The app egress type. Known
                          values are: "AUTOASSIGN" and "DEDICATED_IP".
                    },
                    "enhanced_threat_control_enabled": False,  #
                      Optional. Default value is False. If set to ``true``"" ,
                      suspicious requests will go through additional security checks to
                      help mitigate layer 7 DDoS attacks.
                    "functions": [
                        {
                            "name": "str",  # The name.
                              Must be unique across all components within the same app.
                              Required.
                            "alerts": [
                                {
                                    "disabled":
                                      bool,  # Optional. Is the alert disabled?.
                                    "operator":
                                      "UNSPECIFIED_OPERATOR",  # Optional. Default
                                      value is "UNSPECIFIED_OPERATOR". Known values
                                      are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                      "LESS_THAN".
                                    "rule":
                                      "UNSPECIFIED_RULE",  # Optional. Default value is
                                      "UNSPECIFIED_RULE". Known values are:
                                      "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                      "MEM_UTILIZATION", "RESTART_COUNT",
                                      "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                      "DOMAIN_FAILED", "DOMAIN_LIVE",
                                      "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                                      "FUNCTIONS_ACTIVATION_COUNT",
                                      "FUNCTIONS_AVERAGE_DURATION_MS",
                                      "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                      "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                      "FUNCTIONS_ERROR_COUNT",
                                      "FUNCTIONS_GB_RATE_PER_SECOND",
                                      "REQUESTS_PER_SECOND", and
                                      "REQUEST_DURATION_P95_MS".
                                    "value": 0.0,
                                      # Optional. Threshold value for alert.
                                    "window":
                                      "UNSPECIFIED_WINDOW"  # Optional. Default value
                                      is "UNSPECIFIED_WINDOW". Known values are:
                                      "UNSPECIFIED_WINDOW", "FIVE_MINUTES",
                                      "TEN_MINUTES", "THIRTY_MINUTES", and "ONE_HOUR".
                                }
                            ],
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "ingress": {
                        "rules": [
                            {
                                "component": {
                                    "name":
                                      "str",  # The name of the component to route to.
                                      Required.
"preserve_path_prefix": "str",  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``. Note: this is not applicable for
                                      Functions Components and is mutually exclusive
                                      with ``rewrite``.
                                    "rewrite":
                                      "str"  # Optional. An optional field that will
                                      rewrite the path of the component to be what is
                                      specified here. By default, the HTTP request path
                                      will be trimmed from the left when forwarded to
                                      the component. For example, a component with
                                      ``path=/api`` will have requests to ``/api/list``
                                      trimmed to ``/list``. If you specified the
                                      rewrite to be ``/v1/``"" , requests to
                                      ``/api/list`` would be rewritten to ``/v1/list``.
                                      Note: this is mutually exclusive with
                                      ``preserve_path_prefix``.
                                },
                                "cors": {
"allow_credentials": bool,  # Optional. Whether
                                      browsers should expose the response to the
                                      client-side JavaScript code when the
                                      request"u2019s credentials mode is include. This
                                      configures the
                                      ``Access-Control-Allow-Credentials`` header.
"allow_headers": [
                                        "str"
                                          # Optional. The set of allowed HTTP request
                                          headers. This configures the
                                          ``Access-Control-Allow-Headers`` header.
                                    ],
"allow_methods": [
                                        "str"
                                          # Optional. The set of allowed HTTP methods.
                                          This configures the
                                          ``Access-Control-Allow-Methods`` header.
                                    ],
"allow_origins": [
                                        {
"exact": "str",  # Optional. Exact string
                                              match. Only 1 of ``exact``"" ,
                                              ``prefix``"" , or ``regex`` must be set.
                                              An empty string is a valid value and will
                                              be serialized explicitly rather than
                                              being omitted from the payload.
"prefix": "str",  # Optional.
                                              Prefix-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set.
"regex": "str"  # Optional. RE2 style
                                              regex-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set. For more information about RE2
                                              syntax, see:
                                              https://github.com/google/re2/wiki/Syntax.
                                        }
                                    ],
"expose_headers": [
                                        "str"
                                          # Optional. The set of HTTP response headers
                                          that browsers are allowed to access. This
                                          configures the
                                          ``Access-Control-Expose-Headers`` header.
                                    ],
                                    "max_age":
                                      "str"  # Optional. An optional duration
                                      specifying how long browsers can cache the
                                      results of a preflight request. This configures
                                      the ``Access-Control-Max-Age`` header.
                                },
                                "match": {
                                    "authority":
                                      {
"exact": "str"  # Exact string match. An
                                          empty string is a valid value and will be
                                          serialized explicitly rather than being
                                          omitted from the payload. Required.
                                    },
                                    "path": {
"prefix": "str"  # Prefix-based match. For
                                          example, ``/api`` will match ``/api``"" ,
                                          ``/api/``"" , and any nested paths such as
                                          ``/api/v1/endpoint``. Required.
                                    }
                                },
                                "redirect": {
                                    "authority":
                                      "str",  # Optional. The authority/host to
                                      redirect to. This can be a hostname or IP
                                      address. Note: use ``port`` to set the port.
                                    "port": 0,  #
                                      Optional. The port to redirect to.
"redirect_code": 0,  # Optional. The redirect
                                      code to use. Defaults to ``302``. Supported
                                      values are 300, 301, 302, 303, 304, 307, 308.
                                    "scheme":
                                      "str",  # Optional. The scheme to redirect to.
                                      Supported values are ``http`` or ``https``.
                                      Default: ``https``.
                                    "uri": "str"
                                      # Optional. An optional URI path to redirect to.
                                      Note: if this is specified the whole URI of the
                                      original request will be overwritten to this
                                      value, irrespective of the original request URI
                                      being matched.
                                }
                            }
                        ]
                    },
                    "jobs": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "kind": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * UNSPECIFIED:
                              Default job type, will auto-complete to POST_DEPLOY kind.
                              * PRE_DEPLOY: Indicates a job that runs before an app
                              deployment. * POST_DEPLOY: Indicates a job that runs
                              after an app deployment. * FAILED_DEPLOY: Indicates a job
                              that runs after a component fails to deploy. Known values
                              are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                              "FAILED_DEPLOY".
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "maintenance": {
                        "archive": bool,  # Optional.
                          Indicates whether the app should be archived. Setting this to
                          true implies that enabled is set to true.
                        "enabled": bool,  # Optional.
                          Indicates whether maintenance mode should be enabled for the
                          app.
                        "offline_page_url": "str"  #
                          Optional. A custom offline page to display when maintenance
                          mode is enabled or the app is archived.
                    },
                    "region": "str",  # Optional. The slug form
                      of the geographical origin of the app. Default: ``nearest
                      available``. Known values are: "atl", "nyc", "sfo", "tor", "ams",
                      "fra", "lon", "blr", "sgp", and "syd".
                    "services": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
"request_duration": {
"p95_milliseconds": 0  # Optional. The p95
                                          target request duration in milliseconds for
                                          the component.
                                    },
"requests_per_second": {
"per_instance": 0  # Optional. The target
                                          number of requests per second per instance
                                          for the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed. If not set, the health check will be
                                  performed on the component's http_port.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "http_port": 0,  # Optional.
                              The internal port on which this service's run command
                              will listen. Default: 8080 If there is not an environment
                              variable with the name ``PORT``"" , one will be
                              automatically added with its value set to the value of
                              this field.
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "internal_ports": [
                                0  # Optional. The
                                  ports on which this service will listen for internal
                                  traffic.
                            ],
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "protocol": "str",  #
                              Optional. The protocol which the service uses to serve
                              traffic on the http_port.   * ``HTTP``"" : The app is
                              serving the HTTP protocol. Default. * ``HTTP2``"" : The
                              app is serving the HTTP/2 protocol. Currently, this needs
                              to be implemented in the service by serving HTTP/2
                              cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
                                "drain_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  selecting a container instance for termination and
                                  issuing the TERM signal. Selecting a container
                                  instance for termination begins an asynchronous drain
                                  of new requests on upstream load-balancers. (Default
                                  15).
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "static_sites": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "catchall_document": "str",
                              # Optional. The name of the document to use as the
                              fallback for any requests to documents that are not found
                              when serving this static site. Only 1 of
                              ``catchall_document`` or ``error_document`` can be set.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "error_document": "404.html",
                              # Optional. Default value is "404.html". The name of the
                              error document to use when serving this static site.
                              Default: 404.html. If no such file exists within the
                              built assets, App Platform will supply one.
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "index_document":
                              "index.html",  # Optional. Default value is "index.html".
                              The name of the index document to use when serving this
                              static site. Default: index.html.
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "output_dir": "str",  #
                              Optional. An optional path to where the built assets will
                              be located, relative to the build context. If not set,
                              App Platform will automatically scan for these directory
                              names: ``_static``"" , ``dist``"" , ``public``"" ,
                              ``build``.
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "vpc": {
                        "egress_ips": [
                            {
                                "ip": "str"  #
                                  Optional. The egress ips associated with the VPC.
                            }
                        ],
                        "id": "str"  # Optional. The ID of
                          the VPC.
                    },
                    "workers": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
                                    "cpu": {
"percent": 80  # Optional. Default value is
                                          80. The average target CPU utilization for
                                          the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ]
                },
                "static_sites": [
                    {
                        "name": "str",  # Optional. The name
                          of this static site.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this static site.
                    }
                ],
                "tier_slug": "str",  # Optional. The current pricing
                  tier slug of the deployment.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  When the deployment was last updated.
                "workers": [
                    {
                        "name": "str",  # Optional. The name
                          of this worker.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this worker.
                    }
                ]
            },
            "pinned_deployment": {
                "cause": "str",  # Optional. What caused this
                  deployment to be created.
                "cloned_from": "str",  # Optional. The ID of a
                  previous deployment that this deployment was cloned from.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  creation time of the deployment.
                "functions": [
                    {
                        "name": "str",  # Optional. The name
                          of this functions component.
                        "namespace": "str",  # Optional. The
                          namespace where the functions are deployed.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this functions component.
                    }
                ],
                "id": "str",  # Optional. The ID of the deployment.
                "jobs": [
                    {
                        "name": "str",  # Optional. The name
                          of this job.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this job.
                    }
                ],
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
                  "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
                  "CANCELED".
                "phase_last_updated_at": "2020-02-20 00:00:00",  #
                  Optional. When the deployment phase was last updated.
                "progress": {
                    "error_steps": 0,  # Optional. Number of
                      unsuccessful steps.
                    "pending_steps": 0,  # Optional. Number of
                      pending steps.
                    "running_steps": 0,  # Optional. Number of
                      currently running steps.
                    "steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "success_steps": 0,  # Optional. Number of
                      successful steps.
                    "summary_steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "total_steps": 0  # Optional. Total number of
                      steps.
                },
                "services": [
                    {
                        "name": "str",  # Optional. The name
                          of this service.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this service.
                    }
                ],
                "spec": {
                    "name": "str",  # The name of the app. Must
                      be unique across all apps in the same account. Required.
                    "databases": [
                        {
                            "name": "str",  # The
                              database's name. The name must be unique across all
                              components within the same app and cannot use capital
                              letters. Required.
                            "cluster_name": "str",  #
                              Optional. The name of the underlying DigitalOcean DBaaS
                              cluster. This is required for production databases. For
                              dev databases, if cluster_name is not set, a new cluster
                              will be provisioned.
                            "db_name": "str",  #
                              Optional. The name of the MySQL or PostgreSQL database to
                              configure.
                            "db_user": "str",  #
                              Optional. The name of the MySQL or PostgreSQL user to
                              configure.
                            "engine": "UNSET",  #
                              Optional. Default value is "UNSET". * MYSQL: MySQL * PG:
                              PostgreSQL * REDIS: Caching * MONGODB: MongoDB * KAFKA:
                              Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey. Known
                              values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                              "KAFKA", "OPENSEARCH", and "VALKEY".
                            "production": bool,  #
                              Optional. Whether this is a production or dev database.
                            "version": "str"  # Optional.
                              The version of the database engine.
                        }
                    ],
                    "disable_edge_cache": False,  # Optional.
                      Default value is False. .. role:: raw-html-m2r(raw)    :format:
                      html   If set to ``true``"" , the app will **not** be cached at
                      the edge (CDN). Enable this option if you want to manage CDN
                      configuration yourself"u2014whether by using an external CDN
                      provider or by handling static content and caching within your
                      app. This setting is also recommended for apps that require
                      real-time data or serve dynamic content, such as those using
                      Server-Sent Events (SSE) over GET, or hosting an MCP (Model
                      Context Protocol) Server that utilizes SSE.""
                      :raw-html-m2r:`<br>` **Note:** This feature is not available for
                      static site components."" :raw-html-m2r:`<br>` For more
                      information, see `Disable CDN Cache
                      <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                    "disable_email_obfuscation": False,  #
                      Optional. Default value is False. If set to ``true``"" , email
                      addresses in the app will not be obfuscated. This is useful for
                      apps that require email addresses to be visible (in the HTML
                      markup).
                    "domains": [
                        {
                            "domain": "str",  # The
                              hostname for the domain. Required.
                            "minimum_tls_version": "str",
                              # Optional. The minimum version of TLS a client
                              application can use to access resources for the domain.
                              Must be one of the following values wrapped within
                              quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                              "1.2" and "1.3".
                            "type": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * DEFAULT: The
                              default ``.ondigitalocean.app`` domain assigned to this
                              app * PRIMARY: The primary domain for this app that is
                              displayed as the default in the control panel, used in
                              bindable environment variables, and any other places that
                              reference an app's live URL. Only one domain may be set
                              as primary. * ALIAS: A non-primary domain. Known values
                              are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and "ALIAS".
                            "wildcard": bool,  #
                              Optional. Indicates whether the domain includes all
                              sub-domains, in addition to the given domain.
                            "zone": "str"  # Optional.
                              Optional. If the domain uses DigitalOcean DNS and you
                              would like App Platform to automatically manage it for
                              you, set this to the name of the domain on your account.
                              For example, If the domain you are adding is
                              ``app.domain.com``"" , the zone could be ``domain.com``.
                        }
                    ],
                    "egress": {
                        "type": "AUTOASSIGN"  # Optional.
                          Default value is "AUTOASSIGN". The app egress type. Known
                          values are: "AUTOASSIGN" and "DEDICATED_IP".
                    },
                    "enhanced_threat_control_enabled": False,  #
                      Optional. Default value is False. If set to ``true``"" ,
                      suspicious requests will go through additional security checks to
                      help mitigate layer 7 DDoS attacks.
                    "functions": [
                        {
                            "name": "str",  # The name.
                              Must be unique across all components within the same app.
                              Required.
                            "alerts": [
                                {
                                    "disabled":
                                      bool,  # Optional. Is the alert disabled?.
                                    "operator":
                                      "UNSPECIFIED_OPERATOR",  # Optional. Default
                                      value is "UNSPECIFIED_OPERATOR". Known values
                                      are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                      "LESS_THAN".
                                    "rule":
                                      "UNSPECIFIED_RULE",  # Optional. Default value is
                                      "UNSPECIFIED_RULE". Known values are:
                                      "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                      "MEM_UTILIZATION", "RESTART_COUNT",
                                      "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                      "DOMAIN_FAILED", "DOMAIN_LIVE",
                                      "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                                      "FUNCTIONS_ACTIVATION_COUNT",
                                      "FUNCTIONS_AVERAGE_DURATION_MS",
                                      "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                      "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                      "FUNCTIONS_ERROR_COUNT",
                                      "FUNCTIONS_GB_RATE_PER_SECOND",
                                      "REQUESTS_PER_SECOND", and
                                      "REQUEST_DURATION_P95_MS".
                                    "value": 0.0,
                                      # Optional. Threshold value for alert.
                                    "window":
                                      "UNSPECIFIED_WINDOW"  # Optional. Default value
                                      is "UNSPECIFIED_WINDOW". Known values are:
                                      "UNSPECIFIED_WINDOW", "FIVE_MINUTES",
                                      "TEN_MINUTES", "THIRTY_MINUTES", and "ONE_HOUR".
                                }
                            ],
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "ingress": {
                        "rules": [
                            {
                                "component": {
                                    "name":
                                      "str",  # The name of the component to route to.
                                      Required.
"preserve_path_prefix": "str",  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``. Note: this is not applicable for
                                      Functions Components and is mutually exclusive
                                      with ``rewrite``.
                                    "rewrite":
                                      "str"  # Optional. An optional field that will
                                      rewrite the path of the component to be what is
                                      specified here. By default, the HTTP request path
                                      will be trimmed from the left when forwarded to
                                      the component. For example, a component with
                                      ``path=/api`` will have requests to ``/api/list``
                                      trimmed to ``/list``. If you specified the
                                      rewrite to be ``/v1/``"" , requests to
                                      ``/api/list`` would be rewritten to ``/v1/list``.
                                      Note: this is mutually exclusive with
                                      ``preserve_path_prefix``.
                                },
                                "cors": {
"allow_credentials": bool,  # Optional. Whether
                                      browsers should expose the response to the
                                      client-side JavaScript code when the
                                      request"u2019s credentials mode is include. This
                                      configures the
                                      ``Access-Control-Allow-Credentials`` header.
"allow_headers": [
                                        "str"
                                          # Optional. The set of allowed HTTP request
                                          headers. This configures the
                                          ``Access-Control-Allow-Headers`` header.
                                    ],
"allow_methods": [
                                        "str"
                                          # Optional. The set of allowed HTTP methods.
                                          This configures the
                                          ``Access-Control-Allow-Methods`` header.
                                    ],
"allow_origins": [
                                        {
"exact": "str",  # Optional. Exact string
                                              match. Only 1 of ``exact``"" ,
                                              ``prefix``"" , or ``regex`` must be set.
                                              An empty string is a valid value and will
                                              be serialized explicitly rather than
                                              being omitted from the payload.
"prefix": "str",  # Optional.
                                              Prefix-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set.
"regex": "str"  # Optional. RE2 style
                                              regex-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set. For more information about RE2
                                              syntax, see:
                                              https://github.com/google/re2/wiki/Syntax.
                                        }
                                    ],
"expose_headers": [
                                        "str"
                                          # Optional. The set of HTTP response headers
                                          that browsers are allowed to access. This
                                          configures the
                                          ``Access-Control-Expose-Headers`` header.
                                    ],
                                    "max_age":
                                      "str"  # Optional. An optional duration
                                      specifying how long browsers can cache the
                                      results of a preflight request. This configures
                                      the ``Access-Control-Max-Age`` header.
                                },
                                "match": {
                                    "authority":
                                      {
"exact": "str"  # Exact string match. An
                                          empty string is a valid value and will be
                                          serialized explicitly rather than being
                                          omitted from the payload. Required.
                                    },
                                    "path": {
"prefix": "str"  # Prefix-based match. For
                                          example, ``/api`` will match ``/api``"" ,
                                          ``/api/``"" , and any nested paths such as
                                          ``/api/v1/endpoint``. Required.
                                    }
                                },
                                "redirect": {
                                    "authority":
                                      "str",  # Optional. The authority/host to
                                      redirect to. This can be a hostname or IP
                                      address. Note: use ``port`` to set the port.
                                    "port": 0,  #
                                      Optional. The port to redirect to.
"redirect_code": 0,  # Optional. The redirect
                                      code to use. Defaults to ``302``. Supported
                                      values are 300, 301, 302, 303, 304, 307, 308.
                                    "scheme":
                                      "str",  # Optional. The scheme to redirect to.
                                      Supported values are ``http`` or ``https``.
                                      Default: ``https``.
                                    "uri": "str"
                                      # Optional. An optional URI path to redirect to.
                                      Note: if this is specified the whole URI of the
                                      original request will be overwritten to this
                                      value, irrespective of the original request URI
                                      being matched.
                                }
                            }
                        ]
                    },
                    "jobs": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "kind": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * UNSPECIFIED:
                              Default job type, will auto-complete to POST_DEPLOY kind.
                              * PRE_DEPLOY: Indicates a job that runs before an app
                              deployment. * POST_DEPLOY: Indicates a job that runs
                              after an app deployment. * FAILED_DEPLOY: Indicates a job
                              that runs after a component fails to deploy. Known values
                              are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                              "FAILED_DEPLOY".
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "maintenance": {
                        "archive": bool,  # Optional.
                          Indicates whether the app should be archived. Setting this to
                          true implies that enabled is set to true.
                        "enabled": bool,  # Optional.
                          Indicates whether maintenance mode should be enabled for the
                          app.
                        "offline_page_url": "str"  #
                          Optional. A custom offline page to display when maintenance
                          mode is enabled or the app is archived.
                    },
                    "region": "str",  # Optional. The slug form
                      of the geographical origin of the app. Default: ``nearest
                      available``. Known values are: "atl", "nyc", "sfo", "tor", "ams",
                      "fra", "lon", "blr", "sgp", and "syd".
                    "services": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
"request_duration": {
"p95_milliseconds": 0  # Optional. The p95
                                          target request duration in milliseconds for
                                          the component.
                                    },
"requests_per_second": {
"per_instance": 0  # Optional. The target
                                          number of requests per second per instance
                                          for the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed. If not set, the health check will be
                                  performed on the component's http_port.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "http_port": 0,  # Optional.
                              The internal port on which this service's run command
                              will listen. Default: 8080 If there is not an environment
                              variable with the name ``PORT``"" , one will be
                              automatically added with its value set to the value of
                              this field.
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "internal_ports": [
                                0  # Optional. The
                                  ports on which this service will listen for internal
                                  traffic.
                            ],
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "protocol": "str",  #
                              Optional. The protocol which the service uses to serve
                              traffic on the http_port.   * ``HTTP``"" : The app is
                              serving the HTTP protocol. Default. * ``HTTP2``"" : The
                              app is serving the HTTP/2 protocol. Currently, this needs
                              to be implemented in the service by serving HTTP/2
                              cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
                                "drain_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  selecting a container instance for termination and
                                  issuing the TERM signal. Selecting a container
                                  instance for termination begins an asynchronous drain
                                  of new requests on upstream load-balancers. (Default
                                  15).
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "static_sites": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "catchall_document": "str",
                              # Optional. The name of the document to use as the
                              fallback for any requests to documents that are not found
                              when serving this static site. Only 1 of
                              ``catchall_document`` or ``error_document`` can be set.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "error_document": "404.html",
                              # Optional. Default value is "404.html". The name of the
                              error document to use when serving this static site.
                              Default: 404.html. If no such file exists within the
                              built assets, App Platform will supply one.
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "index_document":
                              "index.html",  # Optional. Default value is "index.html".
                              The name of the index document to use when serving this
                              static site. Default: index.html.
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "output_dir": "str",  #
                              Optional. An optional path to where the built assets will
                              be located, relative to the build context. If not set,
                              App Platform will automatically scan for these directory
                              names: ``_static``"" , ``dist``"" , ``public``"" ,
                              ``build``.
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "vpc": {
                        "egress_ips": [
                            {
                                "ip": "str"  #
                                  Optional. The egress ips associated with the VPC.
                            }
                        ],
                        "id": "str"  # Optional. The ID of
                          the VPC.
                    },
                    "workers": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
                                    "cpu": {
"percent": 80  # Optional. Default value is
                                          80. The average target CPU utilization for
                                          the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ]
                },
                "static_sites": [
                    {
                        "name": "str",  # Optional. The name
                          of this static site.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this static site.
                    }
                ],
                "tier_slug": "str",  # Optional. The current pricing
                  tier slug of the deployment.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  When the deployment was last updated.
                "workers": [
                    {
                        "name": "str",  # Optional. The name
                          of this worker.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this worker.
                    }
                ]
            },
            "project_id": "str",  # Optional. Requires ``project:read``
              scope.
            "region": {
                "continent": "str",  # Optional. The continent that
                  this region is in.
                "data_centers": [
                    "str"  # Optional. Data centers that are in
                      this region.
                ],
                "default": bool,  # Optional. Whether or not the
                  region is presented as the default.
                "disabled": bool,  # Optional. Whether or not the
                  region is open for new apps.
                "flag": "str",  # Optional. The flag of this region.
                "label": "str",  # Optional. A human-readable name of
                  the region.
                "reason": "str",  # Optional. Reason that this region
                  is not available.
                "slug": "str"  # Optional. The slug form of the
                  region name.
            },
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the app.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Time of the
              app's last configuration update.
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            }
        }
    ],
    "links": {
        "pages": {}
    }
}
list_alerts(app_id: str, **kwargs: Any) MutableMapping[str, Any]

List all app alerts.

List alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions.

Parameters:

app_id (str) – The app ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "alerts": [
        {
            "component_name": "str",  # Optional. Name of component the
              alert belongs to.
            "emails": [
                ""  # Optional. Default value is "". Emails for
                  alerts to go to.
            ],
            "id": "str",  # Optional. The ID of the alert.
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING", "CONFIGURING", "ACTIVE", and
              "ERROR".
            "progress": {
                "steps": [
                    {
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The start time of this step.
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN"  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                    }
                ]
            },
            "slack_webhooks": [
                {
                    "channel": "str",  # Optional. Name of the
                      Slack Webhook Channel.
                    "url": "str"  # Optional. URL of the Slack
                      webhook.
                }
            ],
            "spec": {
                "disabled": bool,  # Optional. Is the alert
                  disabled?.
                "operator": "UNSPECIFIED_OPERATOR",  # Optional.
                  Default value is "UNSPECIFIED_OPERATOR". Known values are:
                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                "rule": "UNSPECIFIED_RULE",  # Optional. Default
                  value is "UNSPECIFIED_RULE". Known values are: "UNSPECIFIED_RULE",
                  "CPU_UTILIZATION", "MEM_UTILIZATION", "RESTART_COUNT",
                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE", "DOMAIN_FAILED",
                  "DOMAIN_LIVE", "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                  "FUNCTIONS_ACTIVATION_COUNT", "FUNCTIONS_AVERAGE_DURATION_MS",
                  "FUNCTIONS_ERROR_RATE_PER_MINUTE", "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                  "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                "value": 0.0,  # Optional. Threshold value for alert.
                "window": "UNSPECIFIED_WINDOW"  # Optional. Default
                  value is "UNSPECIFIED_WINDOW". Known values are:
                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                  "THIRTY_MINUTES", and "ONE_HOUR".
            }
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_deployments(app_id: str, *, page: int = 1, per_page: int = 20, deployment_types: Optional[List[str]] = None, **kwargs: Any) MutableMapping[str, Any]

List App Deployments.

List all deployments of an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • deployment_types (list[str]) –

    Optional. Filter deployments by deployment_type

    • MANUAL: manual deployment

    • DEPLOY_ON_PUSH: deployment triggered by a push to the app’s repository

    • MAINTENANCE: deployment for maintenance purposes

    • MANUAL_ROLLBACK: manual revert to a previous deployment

    • AUTO_ROLLBACK: automatic revert to a previous deployment

    • UPDATE_DATABASE_TRUSTED_SOURCES: update database trusted sources

    • AUTOSCALED: deployment that has been autoscaled. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "deployments": [
        {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_events(app_id: str, *, page: int = 1, per_page: int = 20, event_types: Optional[List[str]] = None, **kwargs: Any) MutableMapping[str, Any]

List App Events.

List all events for an app, including deployments and autoscaling events.

Parameters:
  • app_id (str) – The app ID. Required.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • event_types (list[str]) – Filter events by event type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "events": [
        {
            "autoscaling": {
                "components": {
                    "str": {
                        "from": 0,  # Optional. The number of
                          replicas before scaling.
                        "to": 0,  # Optional. The number of
                          replicas after scaling.
                        "triggering_metric": "str"  #
                          Optional. The metric that triggered the scale change. Known
                          values are "cpu", "requests_per_second", "request_duration".
                          For inactivity sleep, "scale_from_zero" and "scale_to_zero"
                          are used.
                    }
                },
                "phase": "str"  # Optional. The current phase of the
                  autoscaling event. Known values are: "UNKNOWN", "PENDING",
                  "IN_PROGRESS", "SUCCEEDED", "FAILED", and "CANCELED".
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. When the
              event was created.
            "deployment": {
                "cause": "str",  # Optional. What caused this
                  deployment to be created.
                "cloned_from": "str",  # Optional. The ID of a
                  previous deployment that this deployment was cloned from.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  creation time of the deployment.
                "functions": [
                    {
                        "name": "str",  # Optional. The name
                          of this functions component.
                        "namespace": "str",  # Optional. The
                          namespace where the functions are deployed.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this functions component.
                    }
                ],
                "id": "str",  # Optional. The ID of the deployment.
                "jobs": [
                    {
                        "name": "str",  # Optional. The name
                          of this job.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this job.
                    }
                ],
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
                  "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
                  "CANCELED".
                "phase_last_updated_at": "2020-02-20 00:00:00",  #
                  Optional. When the deployment phase was last updated.
                "progress": {
                    "error_steps": 0,  # Optional. Number of
                      unsuccessful steps.
                    "pending_steps": 0,  # Optional. Number of
                      pending steps.
                    "running_steps": 0,  # Optional. Number of
                      currently running steps.
                    "steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "success_steps": 0,  # Optional. Number of
                      successful steps.
                    "summary_steps": [
                        {
                            "component_name": "str",  #
                              Optional. The component name that this step is associated
                              with.
                            "ended_at": "2020-02-20
                              00:00:00",  # Optional. The end time of this step.
                            "message_base": "str",  #
                              Optional. The base of a human-readable description of the
                              step intended to be combined with the component name for
                              presentation. For example:  ``message_base`` = "Building
                              service" ``component_name`` = "api".
                            "name": "str",  # Optional.
                              The name of this step.
                            "reason": {
                                "code": "str",  #
                                  Optional. The error code.
                                "message": "str"  #
                                  Optional. The error message.
                            },
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. The start time of this step.
                            "status": "UNKNOWN",  #
                              Optional. Default value is "UNKNOWN". Known values are:
                              "UNKNOWN", "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                            "steps": [
                                {}  # Optional. Child
                                  steps of this step.
                            ]
                        }
                    ],
                    "total_steps": 0  # Optional. Total number of
                      steps.
                },
                "services": [
                    {
                        "name": "str",  # Optional. The name
                          of this service.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this service.
                    }
                ],
                "spec": {
                    "name": "str",  # The name of the app. Must
                      be unique across all apps in the same account. Required.
                    "databases": [
                        {
                            "name": "str",  # The
                              database's name. The name must be unique across all
                              components within the same app and cannot use capital
                              letters. Required.
                            "cluster_name": "str",  #
                              Optional. The name of the underlying DigitalOcean DBaaS
                              cluster. This is required for production databases. For
                              dev databases, if cluster_name is not set, a new cluster
                              will be provisioned.
                            "db_name": "str",  #
                              Optional. The name of the MySQL or PostgreSQL database to
                              configure.
                            "db_user": "str",  #
                              Optional. The name of the MySQL or PostgreSQL user to
                              configure.
                            "engine": "UNSET",  #
                              Optional. Default value is "UNSET". * MYSQL: MySQL * PG:
                              PostgreSQL * REDIS: Caching * MONGODB: MongoDB * KAFKA:
                              Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey. Known
                              values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                              "KAFKA", "OPENSEARCH", and "VALKEY".
                            "production": bool,  #
                              Optional. Whether this is a production or dev database.
                            "version": "str"  # Optional.
                              The version of the database engine.
                        }
                    ],
                    "disable_edge_cache": False,  # Optional.
                      Default value is False. .. role:: raw-html-m2r(raw)    :format:
                      html   If set to ``true``"" , the app will **not** be cached at
                      the edge (CDN). Enable this option if you want to manage CDN
                      configuration yourself"u2014whether by using an external CDN
                      provider or by handling static content and caching within your
                      app. This setting is also recommended for apps that require
                      real-time data or serve dynamic content, such as those using
                      Server-Sent Events (SSE) over GET, or hosting an MCP (Model
                      Context Protocol) Server that utilizes SSE.""
                      :raw-html-m2r:`<br>` **Note:** This feature is not available for
                      static site components."" :raw-html-m2r:`<br>` For more
                      information, see `Disable CDN Cache
                      <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                    "disable_email_obfuscation": False,  #
                      Optional. Default value is False. If set to ``true``"" , email
                      addresses in the app will not be obfuscated. This is useful for
                      apps that require email addresses to be visible (in the HTML
                      markup).
                    "domains": [
                        {
                            "domain": "str",  # The
                              hostname for the domain. Required.
                            "minimum_tls_version": "str",
                              # Optional. The minimum version of TLS a client
                              application can use to access resources for the domain.
                              Must be one of the following values wrapped within
                              quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                              "1.2" and "1.3".
                            "type": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * DEFAULT: The
                              default ``.ondigitalocean.app`` domain assigned to this
                              app * PRIMARY: The primary domain for this app that is
                              displayed as the default in the control panel, used in
                              bindable environment variables, and any other places that
                              reference an app's live URL. Only one domain may be set
                              as primary. * ALIAS: A non-primary domain. Known values
                              are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and "ALIAS".
                            "wildcard": bool,  #
                              Optional. Indicates whether the domain includes all
                              sub-domains, in addition to the given domain.
                            "zone": "str"  # Optional.
                              Optional. If the domain uses DigitalOcean DNS and you
                              would like App Platform to automatically manage it for
                              you, set this to the name of the domain on your account.
                              For example, If the domain you are adding is
                              ``app.domain.com``"" , the zone could be ``domain.com``.
                        }
                    ],
                    "egress": {
                        "type": "AUTOASSIGN"  # Optional.
                          Default value is "AUTOASSIGN". The app egress type. Known
                          values are: "AUTOASSIGN" and "DEDICATED_IP".
                    },
                    "enhanced_threat_control_enabled": False,  #
                      Optional. Default value is False. If set to ``true``"" ,
                      suspicious requests will go through additional security checks to
                      help mitigate layer 7 DDoS attacks.
                    "functions": [
                        {
                            "name": "str",  # The name.
                              Must be unique across all components within the same app.
                              Required.
                            "alerts": [
                                {
                                    "disabled":
                                      bool,  # Optional. Is the alert disabled?.
                                    "operator":
                                      "UNSPECIFIED_OPERATOR",  # Optional. Default
                                      value is "UNSPECIFIED_OPERATOR". Known values
                                      are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                      "LESS_THAN".
                                    "rule":
                                      "UNSPECIFIED_RULE",  # Optional. Default value is
                                      "UNSPECIFIED_RULE". Known values are:
                                      "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                      "MEM_UTILIZATION", "RESTART_COUNT",
                                      "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                      "DOMAIN_FAILED", "DOMAIN_LIVE",
                                      "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                                      "FUNCTIONS_ACTIVATION_COUNT",
                                      "FUNCTIONS_AVERAGE_DURATION_MS",
                                      "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                      "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                      "FUNCTIONS_ERROR_COUNT",
                                      "FUNCTIONS_GB_RATE_PER_SECOND",
                                      "REQUESTS_PER_SECOND", and
                                      "REQUEST_DURATION_P95_MS".
                                    "value": 0.0,
                                      # Optional. Threshold value for alert.
                                    "window":
                                      "UNSPECIFIED_WINDOW"  # Optional. Default value
                                      is "UNSPECIFIED_WINDOW". Known values are:
                                      "UNSPECIFIED_WINDOW", "FIVE_MINUTES",
                                      "TEN_MINUTES", "THIRTY_MINUTES", and "ONE_HOUR".
                                }
                            ],
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "ingress": {
                        "rules": [
                            {
                                "component": {
                                    "name":
                                      "str",  # The name of the component to route to.
                                      Required.
"preserve_path_prefix": "str",  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``. Note: this is not applicable for
                                      Functions Components and is mutually exclusive
                                      with ``rewrite``.
                                    "rewrite":
                                      "str"  # Optional. An optional field that will
                                      rewrite the path of the component to be what is
                                      specified here. By default, the HTTP request path
                                      will be trimmed from the left when forwarded to
                                      the component. For example, a component with
                                      ``path=/api`` will have requests to ``/api/list``
                                      trimmed to ``/list``. If you specified the
                                      rewrite to be ``/v1/``"" , requests to
                                      ``/api/list`` would be rewritten to ``/v1/list``.
                                      Note: this is mutually exclusive with
                                      ``preserve_path_prefix``.
                                },
                                "cors": {
"allow_credentials": bool,  # Optional. Whether
                                      browsers should expose the response to the
                                      client-side JavaScript code when the
                                      request"u2019s credentials mode is include. This
                                      configures the
                                      ``Access-Control-Allow-Credentials`` header.
"allow_headers": [
                                        "str"
                                          # Optional. The set of allowed HTTP request
                                          headers. This configures the
                                          ``Access-Control-Allow-Headers`` header.
                                    ],
"allow_methods": [
                                        "str"
                                          # Optional. The set of allowed HTTP methods.
                                          This configures the
                                          ``Access-Control-Allow-Methods`` header.
                                    ],
"allow_origins": [
                                        {
"exact": "str",  # Optional. Exact string
                                              match. Only 1 of ``exact``"" ,
                                              ``prefix``"" , or ``regex`` must be set.
                                              An empty string is a valid value and will
                                              be serialized explicitly rather than
                                              being omitted from the payload.
"prefix": "str",  # Optional.
                                              Prefix-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set.
"regex": "str"  # Optional. RE2 style
                                              regex-based match. Only 1 of ``exact``""
                                              , ``prefix``"" , or ``regex`` must be
                                              set. For more information about RE2
                                              syntax, see:
                                              https://github.com/google/re2/wiki/Syntax.
                                        }
                                    ],
"expose_headers": [
                                        "str"
                                          # Optional. The set of HTTP response headers
                                          that browsers are allowed to access. This
                                          configures the
                                          ``Access-Control-Expose-Headers`` header.
                                    ],
                                    "max_age":
                                      "str"  # Optional. An optional duration
                                      specifying how long browsers can cache the
                                      results of a preflight request. This configures
                                      the ``Access-Control-Max-Age`` header.
                                },
                                "match": {
                                    "authority":
                                      {
"exact": "str"  # Exact string match. An
                                          empty string is a valid value and will be
                                          serialized explicitly rather than being
                                          omitted from the payload. Required.
                                    },
                                    "path": {
"prefix": "str"  # Prefix-based match. For
                                          example, ``/api`` will match ``/api``"" ,
                                          ``/api/``"" , and any nested paths such as
                                          ``/api/v1/endpoint``. Required.
                                    }
                                },
                                "redirect": {
                                    "authority":
                                      "str",  # Optional. The authority/host to
                                      redirect to. This can be a hostname or IP
                                      address. Note: use ``port`` to set the port.
                                    "port": 0,  #
                                      Optional. The port to redirect to.
"redirect_code": 0,  # Optional. The redirect
                                      code to use. Defaults to ``302``. Supported
                                      values are 300, 301, 302, 303, 304, 307, 308.
                                    "scheme":
                                      "str",  # Optional. The scheme to redirect to.
                                      Supported values are ``http`` or ``https``.
                                      Default: ``https``.
                                    "uri": "str"
                                      # Optional. An optional URI path to redirect to.
                                      Note: if this is specified the whole URI of the
                                      original request will be overwritten to this
                                      value, irrespective of the original request URI
                                      being matched.
                                }
                            }
                        ]
                    },
                    "jobs": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "kind": "UNSPECIFIED",  #
                              Optional. Default value is "UNSPECIFIED". * UNSPECIFIED:
                              Default job type, will auto-complete to POST_DEPLOY kind.
                              * PRE_DEPLOY: Indicates a job that runs before an app
                              deployment. * POST_DEPLOY: Indicates a job that runs
                              after an app deployment. * FAILED_DEPLOY: Indicates a job
                              that runs after a component fails to deploy. Known values
                              are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                              "FAILED_DEPLOY".
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "maintenance": {
                        "archive": bool,  # Optional.
                          Indicates whether the app should be archived. Setting this to
                          true implies that enabled is set to true.
                        "enabled": bool,  # Optional.
                          Indicates whether maintenance mode should be enabled for the
                          app.
                        "offline_page_url": "str"  #
                          Optional. A custom offline page to display when maintenance
                          mode is enabled or the app is archived.
                    },
                    "region": "str",  # Optional. The slug form
                      of the geographical origin of the app. Default: ``nearest
                      available``. Known values are: "atl", "nyc", "sfo", "tor", "ams",
                      "fra", "lon", "blr", "sgp", and "syd".
                    "services": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
"request_duration": {
"p95_milliseconds": 0  # Optional. The p95
                                          target request duration in milliseconds for
                                          the component.
                                    },
"requests_per_second": {
"per_instance": 0  # Optional. The target
                                          number of requests per second per instance
                                          for the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed. If not set, the health check will be
                                  performed on the component's http_port.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "http_port": 0,  # Optional.
                              The internal port on which this service's run command
                              will listen. Default: 8080 If there is not an environment
                              variable with the name ``PORT``"" , one will be
                              automatically added with its value set to the value of
                              this field.
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "internal_ports": [
                                0  # Optional. The
                                  ports on which this service will listen for internal
                                  traffic.
                            ],
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "protocol": "str",  #
                              Optional. The protocol which the service uses to serve
                              traffic on the http_port.   * ``HTTP``"" : The app is
                              serving the HTTP protocol. Default. * ``HTTP2``"" : The
                              app is serving the HTTP/2 protocol. Currently, this needs
                              to be implemented in the service by serving HTTP/2
                              cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
                                "drain_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  selecting a container instance for termination and
                                  issuing the TERM signal. Selecting a container
                                  instance for termination begins an asynchronous drain
                                  of new requests on upstream load-balancers. (Default
                                  15).
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ],
                    "static_sites": [
                        {
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "catchall_document": "str",
                              # Optional. The name of the document to use as the
                              fallback for any requests to documents that are not found
                              when serving this static site. Only 1 of
                              ``catchall_document`` or ``error_document`` can be set.
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "error_document": "404.html",
                              # Optional. Default value is "404.html". The name of the
                              error document to use when serving this static site.
                              Default: 404.html. If no such file exists within the
                              built assets, App Platform will supply one.
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "index_document":
                              "index.html",  # Optional. Default value is "index.html".
                              The name of the index document to use when serving this
                              static site. Default: index.html.
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "output_dir": "str",  #
                              Optional. An optional path to where the built assets will
                              be located, relative to the build context. If not set,
                              App Platform will automatically scan for these directory
                              names: ``_static``"" , ``dist``"" , ``public``"" ,
                              ``build``.
                            "routes": [
                                {
                                    "path":
                                      "str",  # Optional. (Deprecated - Use Ingress
                                      Rules instead). An HTTP path prefix. Paths must
                                      start with / and must be unique across all
                                      components within an app.
"preserve_path_prefix": bool  # Optional. An
                                      optional flag to preserve the path that is
                                      forwarded to the backend service. By default, the
                                      HTTP request path will be trimmed from the left
                                      when forwarded to the component. For example, a
                                      component with ``path=/api`` will have requests
                                      to ``/api/list`` trimmed to ``/list``. If this
                                      value is ``true``"" , the path will remain
                                      ``/api/list``.
                                }
                            ],
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str"  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                        }
                    ],
                    "vpc": {
                        "egress_ips": [
                            {
                                "ip": "str"  #
                                  Optional. The egress ips associated with the VPC.
                            }
                        ],
                        "id": "str"  # Optional. The ID of
                          the VPC.
                    },
                    "workers": [
                        {
                            "autoscaling": {
                                "max_instance_count":
                                  0,  # Optional. The maximum amount of instances for
                                  this component. Maximum 250. Consider using a larger
                                  instance size if your application requires more than
                                  250 instances.
                                "metrics": {
                                    "cpu": {
"percent": 80  # Optional. Default value is
                                          80. The average target CPU utilization for
                                          the component.
                                    }
                                },
                                "min_instance_count":
                                  0  # Optional. The minimum amount of instances for
                                  this component.
                            },
                            "bitbucket": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "build_command": "str",  #
                              Optional. An optional build command to run while building
                              this component from source.
                            "dockerfile_path": "str",  #
                              Optional. The path to the Dockerfile relative to the root
                              of the repo. If set, it will be used to build this
                              component. Otherwise, App Platform will attempt to build
                              it using buildpacks.
                            "environment_slug": "str",  #
                              Optional. An environment slug describing the type of this
                              app. For a full list, please refer to `the product
                              documentation
                              <https://docs.digitalocean.com/products/app-platform/>`_.
                            "envs": [
                                {
                                    "key": "str",
                                      # The variable name. Required.
                                    "scope":
                                      "RUN_AND_BUILD_TIME",  # Optional. Default value
                                      is "RUN_AND_BUILD_TIME". * RUN_TIME: Made
                                      available only at run-time * BUILD_TIME: Made
                                      available only at build-time *
                                      RUN_AND_BUILD_TIME: Made available at both build
                                      and run-time. Known values are: "UNSET",
                                      "RUN_TIME", "BUILD_TIME", and
                                      "RUN_AND_BUILD_TIME".
                                    "type":
                                      "GENERAL",  # Optional. Default value is
                                      "GENERAL". * GENERAL: A plain-text environment
                                      variable * SECRET: A secret encrypted environment
                                      variable. Known values are: "GENERAL" and
                                      "SECRET".
                                    "value":
                                      "str"  # Optional. The value. If the type is
                                      ``SECRET``"" , the value will be encrypted on
                                      first submission. On following submissions, the
                                      encrypted value should be used.
                                }
                            ],
                            "git": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "repo_clone_url":
                                  "str"  # Optional. The clone URL of the repo.
                                  Example:
                                  ``https://github.com/digitalocean/sample-golang.git``.
                            },
                            "github": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "gitlab": {
                                "branch": "str",  #
                                  Optional. The name of the branch to use.
                                "deploy_on_push":
                                  bool,  # Optional. Whether to automatically deploy
                                  new commits made to the repo.
                                "repo": "str"  #
                                  Optional. The name of the repo in the format
                                  owner/repo. Example: ``digitalocean/sample-golang``.
                            },
                            "image": {
                                "deploy_on_push": {
                                    "enabled":
                                      bool  # Optional. Whether to automatically deploy
                                      new images. Can only be used for images hosted in
                                      DOCR and can only be used with an image tag, not
                                      a specific digest.
                                },
                                "digest": "str",  #
                                  Optional. The image digest. Cannot be specified if
                                  tag is provided.
                                "registry": "str",  #
                                  Optional. The registry name. Must be left empty for
                                  the ``DOCR`` registry type.
"registry_credentials": "str",  # Optional. The
                                  credentials to be able to pull the image. The value
                                  will be encrypted on first submission. On following
                                  submissions, the encrypted value should be used.   *
                                  "$username:$access_token" for registries of type
                                  ``DOCKER_HUB``. * "$username:$access_token" for
                                  registries of type ``GHCR``.
                                "registry_type":
                                  "str",  # Optional. * DOCKER_HUB: The DockerHub
                                  container registry type. * DOCR: The DigitalOcean
                                  container registry type. * GHCR: The Github container
                                  registry type. Known values are: "DOCKER_HUB",
                                  "DOCR", and "GHCR".
                                "repository": "str",
                                  # Optional. The repository name.
                                "tag": "latest"  #
                                  Optional. Default value is "latest". The repository
                                  tag. Defaults to ``latest`` if not provided and no
                                  digest is provided. Cannot be specified if digest is
                                  provided.
                            },
                            "instance_count": 1,  #
                              Optional. Default value is 1. The amount of instances
                              that this component should be scaled to. Default: 1. Must
                              not be set if autoscaling is used.
                            "instance_size_slug": {},
                            "liveness_health_check": {
                                "failure_threshold":
                                  0,  # Optional. The number of failed health checks
                                  before considered unhealthy.
                                "http_path": "str",
                                  # Optional. The route path used for the HTTP health
                                  check ping. If not set, the HTTP health check will be
                                  disabled and a TCP health check used instead.
"initial_delay_seconds": 0,  # Optional. The number
                                  of seconds to wait before beginning health checks.
                                "period_seconds": 0,
                                  # Optional. The number of seconds to wait between
                                  health checks.
                                "port": 0,  #
                                  Optional. The port on which the health check will be
                                  performed.
                                "success_threshold":
                                  0,  # Optional. The number of successful health
                                  checks before considered healthy.
                                "timeout_seconds": 0
                                  # Optional. The number of seconds after which the
                                  check times out.
                            },
                            "log_destinations": [
                                {
                                    "name":
                                      "str",  # Required.
                                    "datadog": {
"api_key": "str",  # Datadog API key.
                                          Required.
"endpoint": "str"  # Optional. Datadog HTTP
                                          log intake endpoint.
                                    },
                                    "logtail": {
"token": "str"  # Optional. Logtail token.
                                    },
"open_search": {
"basic_auth": {
"password": "str",  # Optional. Password
                                              for user defined in User. Is required
                                              when ``endpoint`` is set. Cannot be set
                                              if using a DigitalOcean DBaaS OpenSearch
                                              cluster.
"user": "str"  # Optional. Username to
                                              authenticate with. Only required when
                                              ``endpoint`` is set. Defaults to
                                              ``doadmin`` when ``cluster_name`` is set.
                                        },
"cluster_name": "str",  # Optional. The name
                                          of a DigitalOcean DBaaS OpenSearch cluster to
                                          use as a log forwarding destination. Cannot
                                          be specified if ``endpoint`` is also
                                          specified.
"endpoint": "str",  # Optional. OpenSearch
                                          API Endpoint. Only HTTPS is supported.
                                          Format:
                                          https://:code:`<host>`::code:`<port>`. Cannot
                                          be specified if ``cluster_name`` is also
                                          specified.
"index_name": "logs"  # Optional. Default
                                          value is "logs". The index name to use for
                                          the logs. If not set, the default index name
                                          is "logs".
                                    },
                                    "papertrail":
                                      {
"endpoint": "str"  # Papertrail syslog
                                          endpoint. Required.
                                    }
                                }
                            ],
                            "name": "str",  # Optional.
                              The name. Must be unique across all components within the
                              same app.
                            "run_command": "str",  #
                              Optional. An optional run command to override the
                              component's default.
                            "source_dir": "str",  #
                              Optional. An optional path to the working directory to
                              use for the build. For Dockerfile builds, this will be
                              used as the build context. Must be relative to the root
                              of the repo.
                            "termination": {
"grace_period_seconds": 0  # Optional. The number of
                                  seconds to wait between sending a TERM signal to a
                                  container and issuing a KILL which causes immediate
                                  shutdown. (Default 120).
                            }
                        }
                    ]
                },
                "static_sites": [
                    {
                        "name": "str",  # Optional. The name
                          of this static site.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this static site.
                    }
                ],
                "tier_slug": "str",  # Optional. The current pricing
                  tier slug of the deployment.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  When the deployment was last updated.
                "workers": [
                    {
                        "name": "str",  # Optional. The name
                          of this worker.
                        "source_commit_hash": "str"  #
                          Optional. The commit hash of the repository that was used to
                          build this worker.
                    }
                ]
            },
            "deployment_id": "str",  # Optional. For deployment events,
              this is the same as the deployment's ID. For autoscaling events, this is
              the deployment that was autoscaled.
            "id": "str",  # Optional. The ID of the event (UUID).
            "type": "str"  # Optional. The type of event. Known values
              are: "UNKNOWN", "DEPLOYMENT", and "AUTOSCALING".
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_instance_sizes(**kwargs: Any) MutableMapping[str, Any]

List Instance Sizes.

List all instance sizes for service, worker, and job components.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "discount_percent": 0.0,  # Optional.
    "instance_sizes": [
        {
            "bandwidth_allowance_gib": "str",  # Optional. The bandwidth
              allowance in GiB for the instance size.
            "cpu_type": "UNSPECIFIED",  # Optional. Default value is
              "UNSPECIFIED". * SHARED: Shared vCPU cores    * DEDICATED: Dedicated vCPU
              cores. Known values are: "UNSPECIFIED", "SHARED", and "DEDICATED".
            "cpus": "str",  # Optional. The number of allotted vCPU
              cores.
            "deprecation_intent": bool,  # Optional. Indicates if the
              instance size is intended for deprecation.
            "memory_bytes": "str",  # Optional. The allotted memory in
              bytes.
            "name": "str",  # Optional. A human-readable name of the
              instance size.
            "scalable": bool,  # Optional. Indicates if the instance size
              can enable autoscaling.
            "single_instance_only": bool,  # Optional. Indicates if the
              instance size allows more than one instance.
            "slug": "str",  # Optional. The slug of the instance size.
            "tier_downgrade_to": "str",  # Optional. The slug of the
              corresponding downgradable instance size on the lower tier.
            "tier_slug": "str",  # Optional. The slug of the tier to
              which this instance size belongs.
            "tier_upgrade_to": "str",  # Optional. The slug of the
              corresponding upgradable instance size on the higher tier.
            "usd_per_month": "str",  # Optional. The cost of this
              instance size in USD per month.
            "usd_per_second": "str"  # Optional. The cost of this
              instance size in USD per second.
        }
    ]
}
list_job_invocations(app_id: str, *, job_names: Optional[List[str]] = None, deployment_id: Optional[str] = None, page: int = 1, per_page: int = 20, **kwargs: Any) MutableMapping[str, Any]

List Job Invocations.

List all job invocations for an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • job_names (list[str]) – The job names to list job invocations for. Default value is None.

  • deployment_id (str) – The deployment ID. Default value is None.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • per_page (int) – Number of items returned per page. Default value is 20.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "job_invocations": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. The time
              when the job invocation completed.
            "created_at": "2020-02-20 00:00:00",  # Optional. The time
              when the job invocation was created.
            "deployment_id": "str",  # Optional. The deployment ID this
              job invocation belongs to.
            "id": "str",  # Optional. The ID of the job invocation.
            "job_name": "str",  # Optional. The name of the job this
              invocation belongs to.
            "phase": "str",  # Optional. The phase of the job invocation.
              Known values are: "UNKNOWN", "PENDING", "RUNNING", "SUCCEEDED", "FAILED",
              "CANCELED", and "SKIPPED".
            "started_at": "2020-02-20 00:00:00",  # Optional. The time
              when the job invocation started.
            "trigger": {
                "manual": {
                    "user": {
                        "email": "str",  # Optional. The
                          email of the user who triggered the job.
                        "full_name": "str",  # Optional. The
                          name of the user who triggered the job.
                        "uuid": "str"  # Optional. The ID of
                          the user who triggered the job.
                    }
                },
                "scheduled": {
                    "schedule": {
                        "cron": "str",  # Optional. The cron
                          expression defining the schedule.
                        "time_zone": "str"  # Optional. The
                          time zone for the schedule.
                    }
                },
                "type": "UNKNOWN"  # Optional. Default value is
                  "UNKNOWN". The type of trigger that initiated the job invocation.
                  Known values are: "MANUAL", "SCHEDULE", and "UNKNOWN".
            }
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_metrics_bandwidth_daily(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
list_metrics_bandwidth_daily(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Retrieve Multiple Apps’ Daily Bandwidth Metrics.

Retrieve daily bandwidth usage metrics for multiple apps.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "app_ids": [
        "str"  # A list of app IDs to query bandwidth metrics for. Required.
    ],
    "date": "2020-02-20 00:00:00"  # Optional. Optional day to query. Only the
      date component of the timestamp will be considered. Default: yesterday.
}

# response body for status code(s): 200
response == {
    "app_bandwidth_usage": [
        {
            "app_id": "str",  # Optional. The ID of the app.
            "bandwidth_bytes": "str"  # Optional. The used bandwidth
              amount in bytes.
        }
    ],
    "date": "2020-02-20 00:00:00"  # Optional. The date for the metrics data.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_regions(**kwargs: Any) MutableMapping[str, Any]

List App Regions.

List all regions supported by App Platform.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "regions": [
        {
            "continent": "str",  # Optional. The continent that this
              region is in.
            "data_centers": [
                "str"  # Optional. Data centers that are in this
                  region.
            ],
            "default": bool,  # Optional. Whether or not the region is
              presented as the default.
            "disabled": bool,  # Optional. Whether or not the region is
              open for new apps.
            "flag": "str",  # Optional. The flag of this region.
            "label": "str",  # Optional. A human-readable name of the
              region.
            "reason": "str",  # Optional. Reason that this region is not
              available.
            "slug": "str"  # Optional. The slug form of the region name.
        }
    ]
}
restart(app_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
restart(app_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Restart an App.

Perform a rolling restart of all or specific components in an app.

Parameters:
  • app_id (str) – The app ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "components": [
        "str"  # Optional. Optional list of components to restart. If not
          provided, all components will be restarted.
    ]
}

# response body for status code(s): 200
response == {
    "deployment": {
        "cause": "str",  # Optional. What caused this deployment to be
          created.
        "cloned_from": "str",  # Optional. The ID of a previous deployment
          that this deployment was cloned from.
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the deployment.
        "functions": [
            {
                "name": "str",  # Optional. The name of this
                  functions component.
                "namespace": "str",  # Optional. The namespace where
                  the functions are deployed.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this functions
                  component.
            }
        ],
        "id": "str",  # Optional. The ID of the deployment.
        "jobs": [
            {
                "name": "str",  # Optional. The name of this job.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this job.
            }
        ],
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING_BUILD", "BUILDING", "PENDING_DEPLOY",
          "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and "CANCELED".
        "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional. When the
          deployment phase was last updated.
        "progress": {
            "error_steps": 0,  # Optional. Number of unsuccessful steps.
            "pending_steps": 0,  # Optional. Number of pending steps.
            "running_steps": 0,  # Optional. Number of currently running
              steps.
            "steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "success_steps": 0,  # Optional. Number of successful steps.
            "summary_steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "total_steps": 0  # Optional. Total number of steps.
        },
        "services": [
            {
                "name": "str",  # Optional. The name of this service.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this service.
            }
        ],
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "static_sites": [
            {
                "name": "str",  # Optional. The name of this static
                  site.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this static site.
            }
        ],
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          deployment.
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the deployment
          was last updated.
        "workers": [
            {
                "name": "str",  # Optional. The name of this worker.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this worker.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
revert_rollback(app_id: str, **kwargs: Any) MutableMapping[str, Any]

Revert App Rollback.

Revert an app rollback. This action reverts the active rollback by creating a new deployment from the latest app spec prior to the rollback and unpins the app to resume new deployments.

Parameters:

app_id (str) – The app ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "deployment": {
        "cause": "str",  # Optional. What caused this deployment to be
          created.
        "cloned_from": "str",  # Optional. The ID of a previous deployment
          that this deployment was cloned from.
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the deployment.
        "functions": [
            {
                "name": "str",  # Optional. The name of this
                  functions component.
                "namespace": "str",  # Optional. The namespace where
                  the functions are deployed.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this functions
                  component.
            }
        ],
        "id": "str",  # Optional. The ID of the deployment.
        "jobs": [
            {
                "name": "str",  # Optional. The name of this job.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this job.
            }
        ],
        "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN". Known
          values are: "UNKNOWN", "PENDING_BUILD", "BUILDING", "PENDING_DEPLOY",
          "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and "CANCELED".
        "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional. When the
          deployment phase was last updated.
        "progress": {
            "error_steps": 0,  # Optional. Number of unsuccessful steps.
            "pending_steps": 0,  # Optional. Number of pending steps.
            "running_steps": 0,  # Optional. Number of currently running
              steps.
            "steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "success_steps": 0,  # Optional. Number of successful steps.
            "summary_steps": [
                {
                    "component_name": "str",  # Optional. The
                      component name that this step is associated with.
                    "ended_at": "2020-02-20 00:00:00",  #
                      Optional. The end time of this step.
                    "message_base": "str",  # Optional. The base
                      of a human-readable description of the step intended to be
                      combined with the component name for presentation. For example:
                      ``message_base`` = "Building service" ``component_name`` = "api".
                    "name": "str",  # Optional. The name of this
                      step.
                    "reason": {
                        "code": "str",  # Optional. The error
                          code.
                        "message": "str"  # Optional. The
                          error message.
                    },
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. The start time of this step.
                    "status": "UNKNOWN",  # Optional. Default
                      value is "UNKNOWN". Known values are: "UNKNOWN", "PENDING",
                      "RUNNING", "ERROR", and "SUCCESS".
                    "steps": [
                        {}  # Optional. Child steps of this
                          step.
                    ]
                }
            ],
            "total_steps": 0  # Optional. Total number of steps.
        },
        "services": [
            {
                "name": "str",  # Optional. The name of this service.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this service.
            }
        ],
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "static_sites": [
            {
                "name": "str",  # Optional. The name of this static
                  site.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this static site.
            }
        ],
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          deployment.
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the deployment
          was last updated.
        "workers": [
            {
                "name": "str",  # Optional. The name of this worker.
                "source_commit_hash": "str"  # Optional. The commit
                  hash of the repository that was used to build this worker.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an App.

Update an existing app by submitting a new app specification. For documentation on app specifications (AppSpec objects), please refer to the product documentation.

Parameters:
  • id (str) – The ID of the app. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "spec": {
        "name": "str",  # The name of the app. Must be unique across all apps
          in the same account. Required.
        "databases": [
            {
                "name": "str",  # The database's name. The name must
                  be unique across all components within the same app and cannot use
                  capital letters. Required.
                "cluster_name": "str",  # Optional. The name of the
                  underlying DigitalOcean DBaaS cluster. This is required for
                  production databases. For dev databases, if cluster_name is not set,
                  a new cluster will be provisioned.
                "db_name": "str",  # Optional. The name of the MySQL
                  or PostgreSQL database to configure.
                "db_user": "str",  # Optional. The name of the MySQL
                  or PostgreSQL user to configure.
                "engine": "UNSET",  # Optional. Default value is
                  "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching * MONGODB:
                  MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey.
                  Known values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                  "KAFKA", "OPENSEARCH", and "VALKEY".
                "production": bool,  # Optional. Whether this is a
                  production or dev database.
                "version": "str"  # Optional. The version of the
                  database engine.
            }
        ],
        "disable_edge_cache": False,  # Optional. Default value is False. ..
          role:: raw-html-m2r(raw)    :format: html   If set to ``true``"" , the app
          will **not** be cached at the edge (CDN). Enable this option if you want to
          manage CDN configuration yourself"u2014whether by using an external CDN
          provider or by handling static content and caching within your app. This
          setting is also recommended for apps that require real-time data or serve
          dynamic content, such as those using Server-Sent Events (SSE) over GET, or
          hosting an MCP (Model Context Protocol) Server that utilizes SSE.""
          :raw-html-m2r:`<br>` **Note:** This feature is not available for static site
          components."" :raw-html-m2r:`<br>` For more information, see `Disable CDN
          Cache
          <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
        "disable_email_obfuscation": False,  # Optional. Default value is
          False. If set to ``true``"" , email addresses in the app will not be
          obfuscated. This is useful for apps that require email addresses to be
          visible (in the HTML markup).
        "domains": [
            {
                "domain": "str",  # The hostname for the domain.
                  Required.
                "minimum_tls_version": "str",  # Optional. The
                  minimum version of TLS a client application can use to access
                  resources for the domain.  Must be one of the following values
                  wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                  "1.2" and "1.3".
                "type": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * DEFAULT: The default ``.ondigitalocean.app`` domain
                  assigned to this app * PRIMARY: The primary domain for this app that
                  is displayed as the default in the control panel, used in bindable
                  environment variables, and any other places that reference an app's
                  live URL. Only one domain may be set as primary. * ALIAS: A
                  non-primary domain. Known values are: "UNSPECIFIED", "DEFAULT",
                  "PRIMARY", and "ALIAS".
                "wildcard": bool,  # Optional. Indicates whether the
                  domain includes all sub-domains, in addition to the given domain.
                "zone": "str"  # Optional. Optional. If the domain
                  uses DigitalOcean DNS and you would like App Platform to
                  automatically manage it for you, set this to the name of the domain
                  on your account.  For example, If the domain you are adding is
                  ``app.domain.com``"" , the zone could be ``domain.com``.
            }
        ],
        "egress": {
            "type": "AUTOASSIGN"  # Optional. Default value is
              "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
              "DEDICATED_IP".
        },
        "enhanced_threat_control_enabled": False,  # Optional. Default value
          is False. If set to ``true``"" , suspicious requests will go through
          additional security checks to help mitigate layer 7 DDoS attacks.
        "functions": [
            {
                "name": "str",  # The name. Must be unique across all
                  components within the same app. Required.
                "alerts": [
                    {
                        "disabled": bool,  # Optional. Is the
                          alert disabled?.
                        "operator": "UNSPECIFIED_OPERATOR",
                          # Optional. Default value is "UNSPECIFIED_OPERATOR". Known
                          values are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                          "LESS_THAN".
                        "rule": "UNSPECIFIED_RULE",  #
                          Optional. Default value is "UNSPECIFIED_RULE". Known values
                          are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                          "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                          "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                          "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                          "FUNCTIONS_ACTIVATION_COUNT",
                          "FUNCTIONS_AVERAGE_DURATION_MS",
                          "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                          "FUNCTIONS_AVERAGE_WAIT_TIME_MS", "FUNCTIONS_ERROR_COUNT",
                          "FUNCTIONS_GB_RATE_PER_SECOND", "REQUESTS_PER_SECOND", and
                          "REQUEST_DURATION_P95_MS".
                        "value": 0.0,  # Optional. Threshold
                          value for alert.
                        "window": "UNSPECIFIED_WINDOW"  #
                          Optional. Default value is "UNSPECIFIED_WINDOW". Known values
                          are: "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                          "THIRTY_MINUTES", and "ONE_HOUR".
                    }
                ],
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "ingress": {
            "rules": [
                {
                    "component": {
                        "name": "str",  # The name of the
                          component to route to. Required.
                        "preserve_path_prefix": "str",  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``. Note: this is not applicable for Functions
                          Components and is mutually exclusive with ``rewrite``.
                        "rewrite": "str"  # Optional. An
                          optional field that will rewrite the path of the component to
                          be what is specified here. By default, the HTTP request path
                          will be trimmed from the left when forwarded to the
                          component. For example, a component with ``path=/api`` will
                          have requests to ``/api/list`` trimmed to ``/list``. If you
                          specified the rewrite to be ``/v1/``"" , requests to
                          ``/api/list`` would be rewritten to ``/v1/list``. Note: this
                          is mutually exclusive with ``preserve_path_prefix``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "match": {
                        "authority": {
                            "exact": "str"  # Exact
                              string match. An empty string is a valid value and will
                              be serialized explicitly rather than being omitted from
                              the payload. Required.
                        },
                        "path": {
                            "prefix": "str"  #
                              Prefix-based match. For example, ``/api`` will match
                              ``/api``"" , ``/api/``"" , and any nested paths such as
                              ``/api/v1/endpoint``. Required.
                        }
                    },
                    "redirect": {
                        "authority": "str",  # Optional. The
                          authority/host to redirect to. This can be a hostname or IP
                          address. Note: use ``port`` to set the port.
                        "port": 0,  # Optional. The port to
                          redirect to.
                        "redirect_code": 0,  # Optional. The
                          redirect code to use. Defaults to ``302``. Supported values
                          are 300, 301, 302, 303, 304, 307, 308.
                        "scheme": "str",  # Optional. The
                          scheme to redirect to. Supported values are ``http`` or
                          ``https``. Default: ``https``.
                        "uri": "str"  # Optional. An optional
                          URI path to redirect to. Note: if this is specified the whole
                          URI of the original request will be overwritten to this
                          value, irrespective of the original request URI being
                          matched.
                    }
                }
            ]
        },
        "jobs": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "kind": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * UNSPECIFIED: Default job type, will auto-complete to
                  POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job that runs before an
                  app deployment. * POST_DEPLOY: Indicates a job that runs after an app
                  deployment. * FAILED_DEPLOY: Indicates a job that runs after a
                  component fails to deploy. Known values are: "UNSPECIFIED",
                  "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "maintenance": {
            "archive": bool,  # Optional. Indicates whether the app
              should be archived. Setting this to true implies that enabled is set to
              true.
            "enabled": bool,  # Optional. Indicates whether maintenance
              mode should be enabled for the app.
            "offline_page_url": "str"  # Optional. A custom offline page
              to display when maintenance mode is enabled or the app is archived.
        },
        "region": "str",  # Optional. The slug form of the geographical
          origin of the app. Default: ``nearest available``. Known values are: "atl",
          "nyc", "sfo", "tor", "ams", "fra", "lon", "blr", "sgp", and "syd".
        "services": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "request_duration": {
                            "p95_milliseconds": 0  #
                              Optional. The p95 target request duration in milliseconds
                              for the component.
                        },
                        "requests_per_second": {
                            "per_instance": 0  #
                              Optional. The target number of requests per second per
                              instance for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed. If not set, the health check will
                      be performed on the component's http_port.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "http_port": 0,  # Optional. The internal port on
                  which this service's run command will listen. Default: 8080 If there
                  is not an environment variable with the name ``PORT``"" , one will be
                  automatically added with its value set to the value of this field.
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "internal_ports": [
                    0  # Optional. The ports on which this
                      service will listen for internal traffic.
                ],
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "protocol": "str",  # Optional. The protocol which
                  the service uses to serve traffic on the http_port.   * ``HTTP``"" :
                  The app is serving the HTTP protocol. Default. * ``HTTP2``"" : The
                  app is serving the HTTP/2 protocol. Currently, this needs to be
                  implemented in the service by serving HTTP/2 cleartext (h2c). Known
                  values are: "HTTP" and "HTTP2".
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "drain_seconds": 0,  # Optional. The number
                      of seconds to wait between selecting a container instance for
                      termination and issuing the TERM signal. Selecting a container
                      instance for termination begins an asynchronous drain of new
                      requests on upstream load-balancers. (Default 15).
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "static_sites": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "catchall_document": "str",  # Optional. The name of
                  the document to use as the fallback for any requests to documents
                  that are not found when serving this static site. Only 1 of
                  ``catchall_document`` or ``error_document`` can be set.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "error_document": "404.html",  # Optional. Default
                  value is "404.html". The name of the error document to use when
                  serving this static site. Default: 404.html. If no such file exists
                  within the built assets, App Platform will supply one.
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "index_document": "index.html",  # Optional. Default
                  value is "index.html". The name of the index document to use when
                  serving this static site. Default: index.html.
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "output_dir": "str",  # Optional. An optional path to
                  where the built assets will be located, relative to the build
                  context. If not set, App Platform will automatically scan for these
                  directory names: ``_static``"" , ``dist``"" , ``public``"" ,
                  ``build``.
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        },
        "workers": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "cpu": {
                            "percent": 80  # Optional.
                              Default value is 80. The average target CPU utilization
                              for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ]
    },
    "update_all_source_versions": False  # Optional. Default value is False.
      Whether or not to update the source versions (for example fetching a new commit
      or image digest) of all components. By default (when this is false) only newly
      added sources will be updated to avoid changes like updating the scale of a
      component from also updating the respective code.
}

# response body for status code(s): 200
response == {
    "app": {
        "spec": {
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "databases": [
                {
                    "name": "str",  # The database's name. The
                      name must be unique across all components within the same app and
                      cannot use capital letters. Required.
                    "cluster_name": "str",  # Optional. The name
                      of the underlying DigitalOcean DBaaS cluster. This is required
                      for production databases. For dev databases, if cluster_name is
                      not set, a new cluster will be provisioned.
                    "db_name": "str",  # Optional. The name of
                      the MySQL or PostgreSQL database to configure.
                    "db_user": "str",  # Optional. The name of
                      the MySQL or PostgreSQL user to configure.
                    "engine": "UNSET",  # Optional. Default value
                      is "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching *
                      MONGODB: MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch *
                      VALKEY: ValKey. Known values are: "UNSET", "MYSQL", "PG",
                      "REDIS", "MONGODB", "KAFKA", "OPENSEARCH", and "VALKEY".
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "disable_edge_cache": False,  # Optional. Default value is
              False. .. role:: raw-html-m2r(raw)    :format: html   If set to
              ``true``"" , the app will **not** be cached at the edge (CDN). Enable
              this option if you want to manage CDN configuration yourself"u2014whether
              by using an external CDN provider or by handling static content and
              caching within your app. This setting is also recommended for apps that
              require real-time data or serve dynamic content, such as those using
              Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context
              Protocol) Server that utilizes SSE."" :raw-html-m2r:`<br>` **Note:** This
              feature is not available for static site components.""
              :raw-html-m2r:`<br>` For more information, see `Disable CDN Cache
              <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
            "disable_email_obfuscation": False,  # Optional. Default
              value is False. If set to ``true``"" , email addresses in the app will
              not be obfuscated. This is useful for apps that require email addresses
              to be visible (in the HTML markup).
            "domains": [
                {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                }
            ],
            "egress": {
                "type": "AUTOASSIGN"  # Optional. Default value is
                  "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
                  "DEDICATED_IP".
            },
            "enhanced_threat_control_enabled": False,  # Optional.
              Default value is False. If set to ``true``"" , suspicious requests will
              go through additional security checks to help mitigate layer 7 DDoS
              attacks.
            "functions": [
                {
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "alerts": [
                        {
                            "disabled": bool,  #
                              Optional. Is the alert disabled?.
                            "operator":
                              "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                              "UNSPECIFIED_OPERATOR". Known values are:
                              "UNSPECIFIED_OPERATOR", "GREATER_THAN", and "LESS_THAN".
                            "rule": "UNSPECIFIED_RULE",
                              # Optional. Default value is "UNSPECIFIED_RULE". Known
                              values are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                              "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                              "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                              "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", "FUNCTIONS_GB_RATE_PER_SECOND",
                              "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                            "value": 0.0,  # Optional.
                              Threshold value for alert.
                            "window":
                              "UNSPECIFIED_WINDOW"  # Optional. Default value is
                              "UNSPECIFIED_WINDOW". Known values are:
                              "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                              "THIRTY_MINUTES", and "ONE_HOUR".
                        }
                    ],
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "ingress": {
                "rules": [
                    {
                        "component": {
                            "name": "str",  # The name of
                              the component to route to. Required.
                            "preserve_path_prefix":
                              "str",  # Optional. An optional flag to preserve the path
                              that is forwarded to the backend service. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``. Note: this is not applicable for
                              Functions Components and is mutually exclusive with
                              ``rewrite``.
                            "rewrite": "str"  # Optional.
                              An optional field that will rewrite the path of the
                              component to be what is specified here. By default, the
                              HTTP request path will be trimmed from the left when
                              forwarded to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If you specified the rewrite to be
                              ``/v1/``"" , requests to ``/api/list`` would be rewritten
                              to ``/v1/list``. Note: this is mutually exclusive with
                              ``preserve_path_prefix``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "match": {
                            "authority": {
                                "exact": "str"  #
                                  Exact string match. An empty string is a valid value
                                  and will be serialized explicitly rather than being
                                  omitted from the payload. Required.
                            },
                            "path": {
                                "prefix": "str"  #
                                  Prefix-based match. For example, ``/api`` will match
                                  ``/api``"" , ``/api/``"" , and any nested paths such
                                  as ``/api/v1/endpoint``. Required.
                            }
                        },
                        "redirect": {
                            "authority": "str",  #
                              Optional. The authority/host to redirect to. This can be
                              a hostname or IP address. Note: use ``port`` to set the
                              port.
                            "port": 0,  # Optional. The
                              port to redirect to.
                            "redirect_code": 0,  #
                              Optional. The redirect code to use. Defaults to ``302``.
                              Supported values are 300, 301, 302, 303, 304, 307, 308.
                            "scheme": "str",  # Optional.
                              The scheme to redirect to. Supported values are ``http``
                              or ``https``. Default: ``https``.
                            "uri": "str"  # Optional. An
                              optional URI path to redirect to. Note: if this is
                              specified the whole URI of the original request will be
                              overwritten to this value, irrespective of the original
                              request URI being matched.
                        }
                    }
                ]
            },
            "jobs": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job
                      that runs before an app deployment. * POST_DEPLOY: Indicates a
                      job that runs after an app deployment. * FAILED_DEPLOY: Indicates
                      a job that runs after a component fails to deploy. Known values
                      are: "UNSPECIFIED", "PRE_DEPLOY", "POST_DEPLOY", and
                      "FAILED_DEPLOY".
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "maintenance": {
                "archive": bool,  # Optional. Indicates whether the
                  app should be archived. Setting this to true implies that enabled is
                  set to true.
                "enabled": bool,  # Optional. Indicates whether
                  maintenance mode should be enabled for the app.
                "offline_page_url": "str"  # Optional. A custom
                  offline page to display when maintenance mode is enabled or the app
                  is archived.
            },
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
              "sgp", and "syd".
            "services": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "request_duration": {
                                "p95_milliseconds": 0
                                  # Optional. The p95 target request duration in
                                  milliseconds for the component.
                            },
                            "requests_per_second": {
                                "per_instance": 0  #
                                  Optional. The target number of requests per second
                                  per instance for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed. If not set, the
                          health check will be performed on the component's http_port.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "http_port": 0,  # Optional. The internal
                      port on which this service's run command will listen. Default:
                      8080 If there is not an environment variable with the name
                      ``PORT``"" , one will be automatically added with its value set
                      to the value of this field.
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "protocol": "str",  # Optional. The protocol
                      which the service uses to serve traffic on the http_port.   *
                      ``HTTP``"" : The app is serving the HTTP protocol. Default. *
                      ``HTTP2``"" : The app is serving the HTTP/2 protocol. Currently,
                      this needs to be implemented in the service by serving HTTP/2
                      cleartext (h2c). Known values are: "HTTP" and "HTTP2".
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "drain_seconds": 0,  # Optional. The
                          number of seconds to wait between selecting a container
                          instance for termination and issuing the TERM signal.
                          Selecting a container instance for termination begins an
                          asynchronous drain of new requests on upstream
                          load-balancers. (Default 15).
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ],
            "static_sites": [
                {
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "catchall_document": "str",  # Optional. The
                      name of the document to use as the fallback for any requests to
                      documents that are not found when serving this static site. Only
                      1 of ``catchall_document`` or ``error_document`` can be set.
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "error_document": "404.html",  # Optional.
                      Default value is "404.html". The name of the error document to
                      use when serving this static site. Default: 404.html. If no such
                      file exists within the built assets, App Platform will supply
                      one.
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "index_document": "index.html",  # Optional.
                      Default value is "index.html". The name of the index document to
                      use when serving this static site. Default: index.html.
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "output_dir": "str",  # Optional. An optional
                      path to where the built assets will be located, relative to the
                      build context. If not set, App Platform will automatically scan
                      for these directory names: ``_static``"" , ``dist``"" ,
                      ``public``"" , ``build``.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              (Deprecated - Use Ingress Rules instead). An HTTP path
                              prefix. Paths must start with / and must be unique across
                              all components within an app.
                            "preserve_path_prefix": bool
                              # Optional. An optional flag to preserve the path that is
                              forwarded to the backend service. By default, the HTTP
                              request path will be trimmed from the left when forwarded
                              to the component. For example, a component with
                              ``path=/api`` will have requests to ``/api/list`` trimmed
                              to ``/list``. If this value is ``true``"" , the path will
                              remain ``/api/list``.
                        }
                    ],
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str"  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                }
            ],
            "vpc": {
                "egress_ips": [
                    {
                        "ip": "str"  # Optional. The egress
                          ips associated with the VPC.
                    }
                ],
                "id": "str"  # Optional. The ID of the VPC.
            },
            "workers": [
                {
                    "autoscaling": {
                        "max_instance_count": 0,  # Optional.
                          The maximum amount of instances for this component. Maximum
                          250. Consider using a larger instance size if your
                          application requires more than 250 instances.
                        "metrics": {
                            "cpu": {
                                "percent": 80  #
                                  Optional. Default value is 80. The average target CPU
                                  utilization for the component.
                            }
                        },
                        "min_instance_count": 0  # Optional.
                          The minimum amount of instances for this component.
                    },
                    "bitbucket": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "build_command": "str",  # Optional. An
                      optional build command to run while building this component from
                      source.
                    "dockerfile_path": "str",  # Optional. The
                      path to the Dockerfile relative to the root of the repo. If set,
                      it will be used to build this component. Otherwise, App Platform
                      will attempt to build it using buildpacks.
                    "environment_slug": "str",  # Optional. An
                      environment slug describing the type of this app. For a full
                      list, please refer to `the product documentation
                      <https://docs.digitalocean.com/products/app-platform/>`_.
                    "envs": [
                        {
                            "key": "str",  # The variable
                              name. Required.
                            "scope":
                              "RUN_AND_BUILD_TIME",  # Optional. Default value is
                              "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only at
                              run-time * BUILD_TIME: Made available only at build-time
                              * RUN_AND_BUILD_TIME: Made available at both build and
                              run-time. Known values are: "UNSET", "RUN_TIME",
                              "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                            "type": "GENERAL",  #
                              Optional. Default value is "GENERAL". * GENERAL: A
                              plain-text environment variable * SECRET: A secret
                              encrypted environment variable. Known values are:
                              "GENERAL" and "SECRET".
                            "value": "str"  # Optional.
                              The value. If the type is ``SECRET``"" , the value will
                              be encrypted on first submission. On following
                              submissions, the encrypted value should be used.
                        }
                    ],
                    "git": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "repo_clone_url": "str"  # Optional.
                          The clone URL of the repo. Example:
                          ``https://github.com/digitalocean/sample-golang.git``.
                    },
                    "github": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "gitlab": {
                        "branch": "str",  # Optional. The
                          name of the branch to use.
                        "deploy_on_push": bool,  # Optional.
                          Whether to automatically deploy new commits made to the repo.
                        "repo": "str"  # Optional. The name
                          of the repo in the format owner/repo. Example:
                          ``digitalocean/sample-golang``.
                    },
                    "image": {
                        "deploy_on_push": {
                            "enabled": bool  # Optional.
                              Whether to automatically deploy new images. Can only be
                              used for images hosted in DOCR and can only be used with
                              an image tag, not a specific digest.
                        },
                        "digest": "str",  # Optional. The
                          image digest. Cannot be specified if tag is provided.
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_credentials": "str",  #
                          Optional. The credentials to be able to pull the image. The
                          value will be encrypted on first submission. On following
                          submissions, the encrypted value should be used.   *
                          "$username:$access_token" for registries of type
                          ``DOCKER_HUB``. * "$username:$access_token" for registries of
                          type ``GHCR``.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type. * DOCR:
                          The DigitalOcean container registry type. * GHCR: The Github
                          container registry type. Known values are: "DOCKER_HUB",
                          "DOCR", and "GHCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided and no digest is provided. Cannot be
                          specified if digest is provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1. Must not be set if autoscaling is used.
                    "instance_size_slug": {},
                    "liveness_health_check": {
                        "failure_threshold": 0,  # Optional.
                          The number of failed health checks before considered
                          unhealthy.
                        "http_path": "str",  # Optional. The
                          route path used for the HTTP health check ping. If not set,
                          the HTTP health check will be disabled and a TCP health check
                          used instead.
                        "initial_delay_seconds": 0,  #
                          Optional. The number of seconds to wait before beginning
                          health checks.
                        "period_seconds": 0,  # Optional. The
                          number of seconds to wait between health checks.
                        "port": 0,  # Optional. The port on
                          which the health check will be performed.
                        "success_threshold": 0,  # Optional.
                          The number of successful health checks before considered
                          healthy.
                        "timeout_seconds": 0  # Optional. The
                          number of seconds after which the check times out.
                    },
                    "log_destinations": [
                        {
                            "name": "str",  # Required.
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "open_search": {
                                "basic_auth": {
                                    "password":
                                      "str",  # Optional. Password for user defined in
                                      User. Is required when ``endpoint`` is set.
                                      Cannot be set if using a DigitalOcean DBaaS
                                      OpenSearch cluster.
                                    "user": "str"
                                      # Optional. Username to authenticate with. Only
                                      required when ``endpoint`` is set. Defaults to
                                      ``doadmin`` when ``cluster_name`` is set.
                                },
                                "cluster_name":
                                  "str",  # Optional. The name of a DigitalOcean DBaaS
                                  OpenSearch cluster to use as a log forwarding
                                  destination. Cannot be specified if ``endpoint`` is
                                  also specified.
                                "endpoint": "str",  #
                                  Optional. OpenSearch API Endpoint. Only HTTPS is
                                  supported. Format:
                                  https://:code:`<host>`::code:`<port>`. Cannot be
                                  specified if ``cluster_name`` is also specified.
                                "index_name": "logs"
                                  # Optional. Default value is "logs". The index name
                                  to use for the logs. If not set, the default index
                                  name is "logs".
                            },
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        }
                    ],
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "run_command": "str",  # Optional. An
                      optional run command to override the component's default.
                    "source_dir": "str",  # Optional. An optional
                      path to the working directory to use for the build. For
                      Dockerfile builds, this will be used as the build context. Must
                      be relative to the root of the repo.
                    "termination": {
                        "grace_period_seconds": 0  #
                          Optional. The number of seconds to wait between sending a
                          TERM signal to a container and issuing a KILL which causes
                          immediate shutdown. (Default 120).
                    }
                }
            ]
        },
        "active_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. The creation time
          of the app.
        "dedicated_ips": [
            {
                "id": "str",  # Optional. The ID of the dedicated
                  egress IP.
                "ip": "str",  # Optional. The IP address of the
                  dedicated egress IP.
                "status": "UNKNOWN"  # Optional. Default value is
                  "UNKNOWN". The status of the dedicated egress IP. Known values are:
                  "UNKNOWN", "ASSIGNING", "ASSIGNED", and "REMOVED".
            }
        ],
        "default_ingress": "str",  # Optional. The default hostname on which
          the app is accessible.
        "domains": [
            {
                "certificate_expires_at": "2020-02-20 00:00:00",  #
                  Optional. Current SSL certificate expiration time.
                "id": "str",  # Optional. The ID of the domain.
                "phase": "UNKNOWN",  # Optional. Default value is
                  "UNKNOWN". Known values are: "UNKNOWN", "PENDING", "CONFIGURING",
                  "ACTIVE", and "ERROR".
                "progress": {
                    "steps": [
                        {}  # Optional. The steps of the
                          domain's progress.
                    ]
                },
                "rotate_validation_records": bool,  # Optional.
                  Validation values have changed and require manual intervention.
                "spec": {
                    "domain": "str",  # The hostname for the
                      domain. Required.
                    "minimum_tls_version": "str",  # Optional.
                      The minimum version of TLS a client application can use to access
                      resources for the domain.  Must be one of the following values
                      wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values
                      are: "1.2" and "1.3".
                    "type": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * DEFAULT: The default
                      ``.ondigitalocean.app`` domain assigned to this app * PRIMARY:
                      The primary domain for this app that is displayed as the default
                      in the control panel, used in bindable environment variables, and
                      any other places that reference an app's live URL. Only one
                      domain may be set as primary. * ALIAS: A non-primary domain.
                      Known values are: "UNSPECIFIED", "DEFAULT", "PRIMARY", and
                      "ALIAS".
                    "wildcard": bool,  # Optional. Indicates
                      whether the domain includes all sub-domains, in addition to the
                      given domain.
                    "zone": "str"  # Optional. Optional. If the
                      domain uses DigitalOcean DNS and you would like App Platform to
                      automatically manage it for you, set this to the name of the
                      domain on your account.  For example, If the domain you are
                      adding is ``app.domain.com``"" , the zone could be
                      ``domain.com``.
                },
                "validations": [
                    {
                        "txt_name": "str",  # Optional. TXT
                          record name.
                        "txt_value": "str"  # Optional. TXT
                          record value.
                    }
                ]
            }
        ],
        "id": "str",  # Optional. The ID of the application.
        "in_progress_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "last_deployment_created_at": "2020-02-20 00:00:00",  # Optional. The
          creation time of the last deployment.
        "live_domain": "str",  # Optional. The live domain of the app.
        "live_url": "str",  # Optional. The live URL of the app.
        "live_url_base": "str",  # Optional. The live URL base of the app,
          the URL excluding the path.
        "owner_uuid": "str",  # Optional. The ID of the account to which the
          application belongs.
        "pending_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "pinned_deployment": {
            "cause": "str",  # Optional. What caused this deployment to
              be created.
            "cloned_from": "str",  # Optional. The ID of a previous
              deployment that this deployment was cloned from.
            "created_at": "2020-02-20 00:00:00",  # Optional. The
              creation time of the deployment.
            "functions": [
                {
                    "name": "str",  # Optional. The name of this
                      functions component.
                    "namespace": "str",  # Optional. The
                      namespace where the functions are deployed.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      functions component.
                }
            ],
            "id": "str",  # Optional. The ID of the deployment.
            "jobs": [
                {
                    "name": "str",  # Optional. The name of this
                      job.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this job.
                }
            ],
            "phase": "UNKNOWN",  # Optional. Default value is "UNKNOWN".
              Known values are: "UNKNOWN", "PENDING_BUILD", "BUILDING",
              "PENDING_DEPLOY", "DEPLOYING", "ACTIVE", "SUPERSEDED", "ERROR", and
              "CANCELED".
            "phase_last_updated_at": "2020-02-20 00:00:00",  # Optional.
              When the deployment phase was last updated.
            "progress": {
                "error_steps": 0,  # Optional. Number of unsuccessful
                  steps.
                "pending_steps": 0,  # Optional. Number of pending
                  steps.
                "running_steps": 0,  # Optional. Number of currently
                  running steps.
                "steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "success_steps": 0,  # Optional. Number of successful
                  steps.
                "summary_steps": [
                    {
                        "component_name": "str",  # Optional.
                          The component name that this step is associated with.
                        "ended_at": "2020-02-20 00:00:00",  #
                          Optional. The end time of this step.
                        "message_base": "str",  # Optional.
                          The base of a human-readable description of the step intended
                          to be combined with the component name for presentation. For
                          example:  ``message_base`` = "Building service"
                          ``component_name`` = "api".
                        "name": "str",  # Optional. The name
                          of this step.
                        "reason": {
                            "code": "str",  # Optional.
                              The error code.
                            "message": "str"  # Optional.
                              The error message.
                        },
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. The start time of this step.
                        "status": "UNKNOWN",  # Optional.
                          Default value is "UNKNOWN". Known values are: "UNKNOWN",
                          "PENDING", "RUNNING", "ERROR", and "SUCCESS".
                        "steps": [
                            {}  # Optional. Child steps
                              of this step.
                        ]
                    }
                ],
                "total_steps": 0  # Optional. Total number of steps.
            },
            "services": [
                {
                    "name": "str",  # Optional. The name of this
                      service.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this
                      service.
                }
            ],
            "spec": {
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "databases": [
                    {
                        "name": "str",  # The database's
                          name. The name must be unique across all components within
                          the same app and cannot use capital letters. Required.
                        "cluster_name": "str",  # Optional.
                          The name of the underlying DigitalOcean DBaaS cluster. This
                          is required for production databases. For dev databases, if
                          cluster_name is not set, a new cluster will be provisioned.
                        "db_name": "str",  # Optional. The
                          name of the MySQL or PostgreSQL database to configure.
                        "db_user": "str",  # Optional. The
                          name of the MySQL or PostgreSQL user to configure.
                        "engine": "UNSET",  # Optional.
                          Default value is "UNSET". * MYSQL: MySQL * PG: PostgreSQL *
                          REDIS: Caching * MONGODB: MongoDB * KAFKA: Kafka *
                          OPENSEARCH: OpenSearch * VALKEY: ValKey. Known values are:
                          "UNSET", "MYSQL", "PG", "REDIS", "MONGODB", "KAFKA",
                          "OPENSEARCH", and "VALKEY".
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "disable_edge_cache": False,  # Optional. Default
                  value is False. .. role:: raw-html-m2r(raw)    :format: html   If set
                  to ``true``"" , the app will **not** be cached at the edge (CDN).
                  Enable this option if you want to manage CDN configuration
                  yourself"u2014whether by using an external CDN provider or by
                  handling static content and caching within your app. This setting is
                  also recommended for apps that require real-time data or serve
                  dynamic content, such as those using Server-Sent Events (SSE) over
                  GET, or hosting an MCP (Model Context Protocol) Server that utilizes
                  SSE."" :raw-html-m2r:`<br>` **Note:** This feature is not available
                  for static site components."" :raw-html-m2r:`<br>` For more
                  information, see `Disable CDN Cache
                  <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
                "disable_email_obfuscation": False,  # Optional.
                  Default value is False. If set to ``true``"" , email addresses in the
                  app will not be obfuscated. This is useful for apps that require
                  email addresses to be visible (in the HTML markup).
                "domains": [
                    {
                        "domain": "str",  # The hostname for
                          the domain. Required.
                        "minimum_tls_version": "str",  #
                          Optional. The minimum version of TLS a client application can
                          use to access resources for the domain.  Must be one of the
                          following values wrapped within quotations: ``"1.2"`` or
                          ``"1.3"``. Known values are: "1.2" and "1.3".
                        "type": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * DEFAULT: The default
                          ``.ondigitalocean.app`` domain assigned to this app *
                          PRIMARY: The primary domain for this app that is displayed as
                          the default in the control panel, used in bindable
                          environment variables, and any other places that reference an
                          app's live URL. Only one domain may be set as primary. *
                          ALIAS: A non-primary domain. Known values are: "UNSPECIFIED",
                          "DEFAULT", "PRIMARY", and "ALIAS".
                        "wildcard": bool,  # Optional.
                          Indicates whether the domain includes all sub-domains, in
                          addition to the given domain.
                        "zone": "str"  # Optional. Optional.
                          If the domain uses DigitalOcean DNS and you would like App
                          Platform to automatically manage it for you, set this to the
                          name of the domain on your account.  For example, If the
                          domain you are adding is ``app.domain.com``"" , the zone
                          could be ``domain.com``.
                    }
                ],
                "egress": {
                    "type": "AUTOASSIGN"  # Optional. Default
                      value is "AUTOASSIGN". The app egress type. Known values are:
                      "AUTOASSIGN" and "DEDICATED_IP".
                },
                "enhanced_threat_control_enabled": False,  #
                  Optional. Default value is False. If set to ``true``"" , suspicious
                  requests will go through additional security checks to help mitigate
                  layer 7 DDoS attacks.
                "functions": [
                    {
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "alerts": [
                            {
                                "disabled": bool,  #
                                  Optional. Is the alert disabled?.
                                "operator":
                                  "UNSPECIFIED_OPERATOR",  # Optional. Default value is
                                  "UNSPECIFIED_OPERATOR". Known values are:
                                  "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                                  "LESS_THAN".
                                "rule":
                                  "UNSPECIFIED_RULE",  # Optional. Default value is
                                  "UNSPECIFIED_RULE". Known values are:
                                  "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                                  "MEM_UTILIZATION", "RESTART_COUNT",
                                  "DEPLOYMENT_FAILED", "DEPLOYMENT_LIVE",
                                  "DOMAIN_FAILED", "DOMAIN_LIVE", "AUTOSCALE_FAILED",
                                  "AUTOSCALE_SUCCEEDED", "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT",
                                  "FUNCTIONS_GB_RATE_PER_SECOND",
                                  "REQUESTS_PER_SECOND", and "REQUEST_DURATION_P95_MS".
                                "value": 0.0,  #
                                  Optional. Threshold value for alert.
                                "window":
                                  "UNSPECIFIED_WINDOW"  # Optional. Default value is
                                  "UNSPECIFIED_WINDOW". Known values are:
                                  "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                                  "THIRTY_MINUTES", and "ONE_HOUR".
                            }
                        ],
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "ingress": {
                    "rules": [
                        {
                            "component": {
                                "name": "str",  # The
                                  name of the component to route to. Required.
"preserve_path_prefix": "str",  # Optional. An
                                  optional flag to preserve the path that is forwarded
                                  to the backend service. By default, the HTTP request
                                  path will be trimmed from the left when forwarded to
                                  the component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``. Note: this is not
                                  applicable for Functions Components and is mutually
                                  exclusive with ``rewrite``.
                                "rewrite": "str"  #
                                  Optional. An optional field that will rewrite the
                                  path of the component to be what is specified here.
                                  By default, the HTTP request path will be trimmed
                                  from the left when forwarded to the component. For
                                  example, a component with ``path=/api`` will have
                                  requests to ``/api/list`` trimmed to ``/list``. If
                                  you specified the rewrite to be ``/v1/``"" , requests
                                  to ``/api/list`` would be rewritten to ``/v1/list``.
                                  Note: this is mutually exclusive with
                                  ``preserve_path_prefix``.
                            },
                            "cors": {
                                "allow_credentials":
                                  bool,  # Optional. Whether browsers should expose the
                                  response to the client-side JavaScript code when the
                                  request"u2019s credentials mode is include. This
                                  configures the ``Access-Control-Allow-Credentials``
                                  header.
                                "allow_headers": [
                                    "str"  #
                                      Optional. The set of allowed HTTP request
                                      headers. This configures the
                                      ``Access-Control-Allow-Headers`` header.
                                ],
                                "allow_methods": [
                                    "str"  #
                                      Optional. The set of allowed HTTP methods. This
                                      configures the ``Access-Control-Allow-Methods``
                                      header.
                                ],
                                "allow_origins": [
                                    {
"exact": "str",  # Optional. Exact string
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set. An empty string is
                                          a valid value and will be serialized
                                          explicitly rather than being omitted from the
                                          payload.
"prefix": "str",  # Optional. Prefix-based
                                          match. Only 1 of ``exact``"" , ``prefix``"" ,
                                          or ``regex`` must be set.
"regex": "str"  # Optional. RE2 style
                                          regex-based match. Only 1 of ``exact``"" ,
                                          ``prefix``"" , or ``regex`` must be set. For
                                          more information about RE2 syntax, see:
                                          https://github.com/google/re2/wiki/Syntax.
                                    }
                                ],
                                "expose_headers": [
                                    "str"  #
                                      Optional. The set of HTTP response headers that
                                      browsers are allowed to access. This configures
                                      the ``Access-Control-Expose-Headers`` header.
                                ],
                                "max_age": "str"  #
                                  Optional. An optional duration specifying how long
                                  browsers can cache the results of a preflight
                                  request. This configures the
                                  ``Access-Control-Max-Age`` header.
                            },
                            "match": {
                                "authority": {
                                    "exact":
                                      "str"  # Exact string match. An empty string is a
                                      valid value and will be serialized explicitly
                                      rather than being omitted from the payload.
                                      Required.
                                },
                                "path": {
                                    "prefix":
                                      "str"  # Prefix-based match. For example,
                                      ``/api`` will match ``/api``"" , ``/api/``"" ,
                                      and any nested paths such as
                                      ``/api/v1/endpoint``. Required.
                                }
                            },
                            "redirect": {
                                "authority": "str",
                                  # Optional. The authority/host to redirect to. This
                                  can be a hostname or IP address. Note: use ``port``
                                  to set the port.
                                "port": 0,  #
                                  Optional. The port to redirect to.
                                "redirect_code": 0,
                                  # Optional. The redirect code to use. Defaults to
                                  ``302``. Supported values are 300, 301, 302, 303,
                                  304, 307, 308.
                                "scheme": "str",  #
                                  Optional. The scheme to redirect to. Supported values
                                  are ``http`` or ``https``. Default: ``https``.
                                "uri": "str"  #
                                  Optional. An optional URI path to redirect to. Note:
                                  if this is specified the whole URI of the original
                                  request will be overwritten to this value,
                                  irrespective of the original request URI being
                                  matched.
                            }
                        }
                    ]
                },
                "jobs": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind. * PRE_DEPLOY:
                          Indicates a job that runs before an app deployment. *
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment. * FAILED_DEPLOY: Indicates a job that runs after
                          a component fails to deploy. Known values are: "UNSPECIFIED",
                          "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "maintenance": {
                    "archive": bool,  # Optional. Indicates
                      whether the app should be archived. Setting this to true implies
                      that enabled is set to true.
                    "enabled": bool,  # Optional. Indicates
                      whether maintenance mode should be enabled for the app.
                    "offline_page_url": "str"  # Optional. A
                      custom offline page to display when maintenance mode is enabled
                      or the app is archived.
                },
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "atl", "nyc", "sfo", "tor", "ams", "fra", "lon", "blr",
                  "sgp", and "syd".
                "services": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "request_duration": {
"p95_milliseconds": 0  # Optional. The p95 target
                                      request duration in milliseconds for the
                                      component.
                                },
"requests_per_second": {
"per_instance": 0  # Optional. The target number
                                      of requests per second per instance for the
                                      component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed. If not
                              set, the health check will be performed on the
                              component's http_port.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "http_port": 0,  # Optional. The
                          internal port on which this service's run command will
                          listen. Default: 8080 If there is not an environment variable
                          with the name ``PORT``"" , one will be automatically added
                          with its value set to the value of this field.
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "protocol": "str",  # Optional. The
                          protocol which the service uses to serve traffic on the
                          http_port.   * ``HTTP``"" : The app is serving the HTTP
                          protocol. Default. * ``HTTP2``"" : The app is serving the
                          HTTP/2 protocol. Currently, this needs to be implemented in
                          the service by serving HTTP/2 cleartext (h2c). Known values
                          are: "HTTP" and "HTTP2".
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "drain_seconds": 0,  #
                              Optional. The number of seconds to wait between selecting
                              a container instance for termination and issuing the TERM
                              signal. Selecting a container instance for termination
                              begins an asynchronous drain of new requests on upstream
                              load-balancers. (Default 15).
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ],
                "static_sites": [
                    {
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "catchall_document": "str",  #
                          Optional. The name of the document to use as the fallback for
                          any requests to documents that are not found when serving
                          this static site. Only 1 of ``catchall_document`` or
                          ``error_document`` can be set.
                        "cors": {
                            "allow_credentials": bool,  #
                              Optional. Whether browsers should expose the response to
                              the client-side JavaScript code when the request"u2019s
                              credentials mode is include. This configures the
                              ``Access-Control-Allow-Credentials`` header.
                            "allow_headers": [
                                "str"  # Optional.
                                  The set of allowed HTTP request headers. This
                                  configures the ``Access-Control-Allow-Headers``
                                  header.
                            ],
                            "allow_methods": [
                                "str"  # Optional.
                                  The set of allowed HTTP methods. This configures the
                                  ``Access-Control-Allow-Methods`` header.
                            ],
                            "allow_origins": [
                                {
                                    "exact":
                                      "str",  # Optional. Exact string match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set. An empty string is a valid value and will be
                                      serialized explicitly rather than being omitted
                                      from the payload.
                                    "prefix":
                                      "str",  # Optional. Prefix-based match. Only 1 of
                                      ``exact``"" , ``prefix``"" , or ``regex`` must be
                                      set.
                                    "regex":
                                      "str"  # Optional. RE2 style regex-based match.
                                      Only 1 of ``exact``"" , ``prefix``"" , or
                                      ``regex`` must be set. For more information about
                                      RE2 syntax, see:
                                      https://github.com/google/re2/wiki/Syntax.
                                }
                            ],
                            "expose_headers": [
                                "str"  # Optional.
                                  The set of HTTP response headers that browsers are
                                  allowed to access. This configures the
                                  ``Access-Control-Expose-Headers`` header.
                            ],
                            "max_age": "str"  # Optional.
                              An optional duration specifying how long browsers can
                              cache the results of a preflight request. This configures
                              the ``Access-Control-Max-Age`` header.
                        },
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "error_document": "404.html",  #
                          Optional. Default value is "404.html". The name of the error
                          document to use when serving this static site. Default:
                          404.html. If no such file exists within the built assets, App
                          Platform will supply one.
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "index_document": "index.html",  #
                          Optional. Default value is "index.html". The name of the
                          index document to use when serving this static site. Default:
                          index.html.
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "output_dir": "str",  # Optional. An
                          optional path to where the built assets will be located,
                          relative to the build context. If not set, App Platform will
                          automatically scan for these directory names: ``_static``"" ,
                          ``dist``"" , ``public``"" , ``build``.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. (Deprecated - Use Ingress Rules instead).
                                  An HTTP path prefix. Paths must start with / and must
                                  be unique across all components within an app.
"preserve_path_prefix": bool  # Optional. An optional
                                  flag to preserve the path that is forwarded to the
                                  backend service. By default, the HTTP request path
                                  will be trimmed from the left when forwarded to the
                                  component. For example, a component with
                                  ``path=/api`` will have requests to ``/api/list``
                                  trimmed to ``/list``. If this value is ``true``"" ,
                                  the path will remain ``/api/list``.
                            }
                        ],
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str"  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                    }
                ],
                "vpc": {
                    "egress_ips": [
                        {
                            "ip": "str"  # Optional. The
                              egress ips associated with the VPC.
                        }
                    ],
                    "id": "str"  # Optional. The ID of the VPC.
                },
                "workers": [
                    {
                        "autoscaling": {
                            "max_instance_count": 0,  #
                              Optional. The maximum amount of instances for this
                              component. Maximum 250. Consider using a larger instance
                              size if your application requires more than 250
                              instances.
                            "metrics": {
                                "cpu": {
                                    "percent": 80
                                      # Optional. Default value is 80. The average
                                      target CPU utilization for the component.
                                }
                            },
                            "min_instance_count": 0  #
                              Optional. The minimum amount of instances for this
                              component.
                        },
                        "bitbucket": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "build_command": "str",  # Optional.
                          An optional build command to run while building this
                          component from source.
                        "dockerfile_path": "str",  #
                          Optional. The path to the Dockerfile relative to the root of
                          the repo. If set, it will be used to build this component.
                          Otherwise, App Platform will attempt to build it using
                          buildpacks.
                        "environment_slug": "str",  #
                          Optional. An environment slug describing the type of this
                          app. For a full list, please refer to `the product
                          documentation
                          <https://docs.digitalocean.com/products/app-platform/>`_.
                        "envs": [
                            {
                                "key": "str",  # The
                                  variable name. Required.
                                "scope":
                                  "RUN_AND_BUILD_TIME",  # Optional. Default value is
                                  "RUN_AND_BUILD_TIME". * RUN_TIME: Made available only
                                  at run-time * BUILD_TIME: Made available only at
                                  build-time * RUN_AND_BUILD_TIME: Made available at
                                  both build and run-time. Known values are: "UNSET",
                                  "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                                "type": "GENERAL",  #
                                  Optional. Default value is "GENERAL". * GENERAL: A
                                  plain-text environment variable * SECRET: A secret
                                  encrypted environment variable. Known values are:
                                  "GENERAL" and "SECRET".
                                "value": "str"  #
                                  Optional. The value. If the type is ``SECRET``"" ,
                                  the value will be encrypted on first submission. On
                                  following submissions, the encrypted value should be
                                  used.
                            }
                        ],
                        "git": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "repo_clone_url": "str"  #
                              Optional. The clone URL of the repo. Example:
                              ``https://github.com/digitalocean/sample-golang.git``.
                        },
                        "github": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "gitlab": {
                            "branch": "str",  # Optional.
                              The name of the branch to use.
                            "deploy_on_push": bool,  #
                              Optional. Whether to automatically deploy new commits
                              made to the repo.
                            "repo": "str"  # Optional.
                              The name of the repo in the format owner/repo. Example:
                              ``digitalocean/sample-golang``.
                        },
                        "image": {
                            "deploy_on_push": {
                                "enabled": bool  #
                                  Optional. Whether to automatically deploy new images.
                                  Can only be used for images hosted in DOCR and can
                                  only be used with an image tag, not a specific
                                  digest.
                            },
                            "digest": "str",  # Optional.
                              The image digest. Cannot be specified if tag is provided.
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_credentials":
                              "str",  # Optional. The credentials to be able to pull
                              the image. The value will be encrypted on first
                              submission. On following submissions, the encrypted value
                              should be used.   * "$username:$access_token" for
                              registries of type ``DOCKER_HUB``. *
                              "$username:$access_token" for registries of type
                              ``GHCR``.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type. * DOCR: The DigitalOcean container registry type. *
                              GHCR: The Github container registry type. Known values
                              are: "DOCKER_HUB", "DOCR", and "GHCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided and no digest is provided.
                              Cannot be specified if digest is provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1. Must not be set if
                          autoscaling is used.
                        "instance_size_slug": {},
                        "liveness_health_check": {
                            "failure_threshold": 0,  #
                              Optional. The number of failed health checks before
                              considered unhealthy.
                            "http_path": "str",  #
                              Optional. The route path used for the HTTP health check
                              ping. If not set, the HTTP health check will be disabled
                              and a TCP health check used instead.
                            "initial_delay_seconds": 0,
                              # Optional. The number of seconds to wait before
                              beginning health checks.
                            "period_seconds": 0,  #
                              Optional. The number of seconds to wait between health
                              checks.
                            "port": 0,  # Optional. The
                              port on which the health check will be performed.
                            "success_threshold": 0,  #
                              Optional. The number of successful health checks before
                              considered healthy.
                            "timeout_seconds": 0  #
                              Optional. The number of seconds after which the check
                              times out.
                        },
                        "log_destinations": [
                            {
                                "name": "str",  #
                                  Required.
                                "datadog": {
                                    "api_key":
                                      "str",  # Datadog API key. Required.
                                    "endpoint":
                                      "str"  # Optional. Datadog HTTP log intake
                                      endpoint.
                                },
                                "logtail": {
                                    "token":
                                      "str"  # Optional. Logtail token.
                                },
                                "open_search": {
                                    "basic_auth":
                                      {
"password": "str",  # Optional. Password for
                                          user defined in User. Is required when
                                          ``endpoint`` is set. Cannot be set if using a
                                          DigitalOcean DBaaS OpenSearch cluster.
"user": "str"  # Optional. Username to
                                          authenticate with. Only required when
                                          ``endpoint`` is set. Defaults to ``doadmin``
                                          when ``cluster_name`` is set.
                                    },
"cluster_name": "str",  # Optional. The name of a
                                      DigitalOcean DBaaS OpenSearch cluster to use as a
                                      log forwarding destination. Cannot be specified
                                      if ``endpoint`` is also specified.
                                    "endpoint":
                                      "str",  # Optional. OpenSearch API Endpoint. Only
                                      HTTPS is supported. Format:
                                      https://:code:`<host>`::code:`<port>`. Cannot be
                                      specified if ``cluster_name`` is also specified.
                                    "index_name":
                                      "logs"  # Optional. Default value is "logs". The
                                      index name to use for the logs. If not set, the
                                      default index name is "logs".
                                },
                                "papertrail": {
                                    "endpoint":
                                      "str"  # Papertrail syslog endpoint. Required.
                                }
                            }
                        ],
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "run_command": "str",  # Optional. An
                          optional run command to override the component's default.
                        "source_dir": "str",  # Optional. An
                          optional path to the working directory to use for the build.
                          For Dockerfile builds, this will be used as the build
                          context. Must be relative to the root of the repo.
                        "termination": {
                            "grace_period_seconds": 0  #
                              Optional. The number of seconds to wait between sending a
                              TERM signal to a container and issuing a KILL which
                              causes immediate shutdown. (Default 120).
                        }
                    }
                ]
            },
            "static_sites": [
                {
                    "name": "str",  # Optional. The name of this
                      static site.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this static
                      site.
                }
            ],
            "tier_slug": "str",  # Optional. The current pricing tier
              slug of the deployment.
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              deployment was last updated.
            "workers": [
                {
                    "name": "str",  # Optional. The name of this
                      worker.
                    "source_commit_hash": "str"  # Optional. The
                      commit hash of the repository that was used to build this worker.
                }
            ]
        },
        "project_id": "str",  # Optional. Requires ``project:read`` scope.
        "region": {
            "continent": "str",  # Optional. The continent that this
              region is in.
            "data_centers": [
                "str"  # Optional. Data centers that are in this
                  region.
            ],
            "default": bool,  # Optional. Whether or not the region is
              presented as the default.
            "disabled": bool,  # Optional. Whether or not the region is
              open for new apps.
            "flag": "str",  # Optional. The flag of this region.
            "label": "str",  # Optional. A human-readable name of the
              region.
            "reason": "str",  # Optional. Reason that this region is not
              available.
            "slug": "str"  # Optional. The slug form of the region name.
        },
        "tier_slug": "str",  # Optional. The current pricing tier slug of the
          app.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Time of the app's
          last configuration update.
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
validate_app_spec(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
validate_app_spec(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Propose an App Spec.

To propose and validate a spec for a new or existing app, send a POST request to the /v2/apps/propose endpoint. The request returns some information about the proposed app, including app cost and upgrade cost. If an existing app ID is specified, the app spec is treated as a proposed update to the existing app.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "spec": {
        "name": "str",  # The name of the app. Must be unique across all apps
          in the same account. Required.
        "databases": [
            {
                "name": "str",  # The database's name. The name must
                  be unique across all components within the same app and cannot use
                  capital letters. Required.
                "cluster_name": "str",  # Optional. The name of the
                  underlying DigitalOcean DBaaS cluster. This is required for
                  production databases. For dev databases, if cluster_name is not set,
                  a new cluster will be provisioned.
                "db_name": "str",  # Optional. The name of the MySQL
                  or PostgreSQL database to configure.
                "db_user": "str",  # Optional. The name of the MySQL
                  or PostgreSQL user to configure.
                "engine": "UNSET",  # Optional. Default value is
                  "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching * MONGODB:
                  MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey.
                  Known values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                  "KAFKA", "OPENSEARCH", and "VALKEY".
                "production": bool,  # Optional. Whether this is a
                  production or dev database.
                "version": "str"  # Optional. The version of the
                  database engine.
            }
        ],
        "disable_edge_cache": False,  # Optional. Default value is False. ..
          role:: raw-html-m2r(raw)    :format: html   If set to ``true``"" , the app
          will **not** be cached at the edge (CDN). Enable this option if you want to
          manage CDN configuration yourself"u2014whether by using an external CDN
          provider or by handling static content and caching within your app. This
          setting is also recommended for apps that require real-time data or serve
          dynamic content, such as those using Server-Sent Events (SSE) over GET, or
          hosting an MCP (Model Context Protocol) Server that utilizes SSE.""
          :raw-html-m2r:`<br>` **Note:** This feature is not available for static site
          components."" :raw-html-m2r:`<br>` For more information, see `Disable CDN
          Cache
          <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
        "disable_email_obfuscation": False,  # Optional. Default value is
          False. If set to ``true``"" , email addresses in the app will not be
          obfuscated. This is useful for apps that require email addresses to be
          visible (in the HTML markup).
        "domains": [
            {
                "domain": "str",  # The hostname for the domain.
                  Required.
                "minimum_tls_version": "str",  # Optional. The
                  minimum version of TLS a client application can use to access
                  resources for the domain.  Must be one of the following values
                  wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                  "1.2" and "1.3".
                "type": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * DEFAULT: The default ``.ondigitalocean.app`` domain
                  assigned to this app * PRIMARY: The primary domain for this app that
                  is displayed as the default in the control panel, used in bindable
                  environment variables, and any other places that reference an app's
                  live URL. Only one domain may be set as primary. * ALIAS: A
                  non-primary domain. Known values are: "UNSPECIFIED", "DEFAULT",
                  "PRIMARY", and "ALIAS".
                "wildcard": bool,  # Optional. Indicates whether the
                  domain includes all sub-domains, in addition to the given domain.
                "zone": "str"  # Optional. Optional. If the domain
                  uses DigitalOcean DNS and you would like App Platform to
                  automatically manage it for you, set this to the name of the domain
                  on your account.  For example, If the domain you are adding is
                  ``app.domain.com``"" , the zone could be ``domain.com``.
            }
        ],
        "egress": {
            "type": "AUTOASSIGN"  # Optional. Default value is
              "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
              "DEDICATED_IP".
        },
        "enhanced_threat_control_enabled": False,  # Optional. Default value
          is False. If set to ``true``"" , suspicious requests will go through
          additional security checks to help mitigate layer 7 DDoS attacks.
        "functions": [
            {
                "name": "str",  # The name. Must be unique across all
                  components within the same app. Required.
                "alerts": [
                    {
                        "disabled": bool,  # Optional. Is the
                          alert disabled?.
                        "operator": "UNSPECIFIED_OPERATOR",
                          # Optional. Default value is "UNSPECIFIED_OPERATOR". Known
                          values are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                          "LESS_THAN".
                        "rule": "UNSPECIFIED_RULE",  #
                          Optional. Default value is "UNSPECIFIED_RULE". Known values
                          are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                          "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                          "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                          "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                          "FUNCTIONS_ACTIVATION_COUNT",
                          "FUNCTIONS_AVERAGE_DURATION_MS",
                          "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                          "FUNCTIONS_AVERAGE_WAIT_TIME_MS", "FUNCTIONS_ERROR_COUNT",
                          "FUNCTIONS_GB_RATE_PER_SECOND", "REQUESTS_PER_SECOND", and
                          "REQUEST_DURATION_P95_MS".
                        "value": 0.0,  # Optional. Threshold
                          value for alert.
                        "window": "UNSPECIFIED_WINDOW"  #
                          Optional. Default value is "UNSPECIFIED_WINDOW". Known values
                          are: "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                          "THIRTY_MINUTES", and "ONE_HOUR".
                    }
                ],
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "ingress": {
            "rules": [
                {
                    "component": {
                        "name": "str",  # The name of the
                          component to route to. Required.
                        "preserve_path_prefix": "str",  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``. Note: this is not applicable for Functions
                          Components and is mutually exclusive with ``rewrite``.
                        "rewrite": "str"  # Optional. An
                          optional field that will rewrite the path of the component to
                          be what is specified here. By default, the HTTP request path
                          will be trimmed from the left when forwarded to the
                          component. For example, a component with ``path=/api`` will
                          have requests to ``/api/list`` trimmed to ``/list``. If you
                          specified the rewrite to be ``/v1/``"" , requests to
                          ``/api/list`` would be rewritten to ``/v1/list``. Note: this
                          is mutually exclusive with ``preserve_path_prefix``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "match": {
                        "authority": {
                            "exact": "str"  # Exact
                              string match. An empty string is a valid value and will
                              be serialized explicitly rather than being omitted from
                              the payload. Required.
                        },
                        "path": {
                            "prefix": "str"  #
                              Prefix-based match. For example, ``/api`` will match
                              ``/api``"" , ``/api/``"" , and any nested paths such as
                              ``/api/v1/endpoint``. Required.
                        }
                    },
                    "redirect": {
                        "authority": "str",  # Optional. The
                          authority/host to redirect to. This can be a hostname or IP
                          address. Note: use ``port`` to set the port.
                        "port": 0,  # Optional. The port to
                          redirect to.
                        "redirect_code": 0,  # Optional. The
                          redirect code to use. Defaults to ``302``. Supported values
                          are 300, 301, 302, 303, 304, 307, 308.
                        "scheme": "str",  # Optional. The
                          scheme to redirect to. Supported values are ``http`` or
                          ``https``. Default: ``https``.
                        "uri": "str"  # Optional. An optional
                          URI path to redirect to. Note: if this is specified the whole
                          URI of the original request will be overwritten to this
                          value, irrespective of the original request URI being
                          matched.
                    }
                }
            ]
        },
        "jobs": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "kind": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * UNSPECIFIED: Default job type, will auto-complete to
                  POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job that runs before an
                  app deployment. * POST_DEPLOY: Indicates a job that runs after an app
                  deployment. * FAILED_DEPLOY: Indicates a job that runs after a
                  component fails to deploy. Known values are: "UNSPECIFIED",
                  "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "maintenance": {
            "archive": bool,  # Optional. Indicates whether the app
              should be archived. Setting this to true implies that enabled is set to
              true.
            "enabled": bool,  # Optional. Indicates whether maintenance
              mode should be enabled for the app.
            "offline_page_url": "str"  # Optional. A custom offline page
              to display when maintenance mode is enabled or the app is archived.
        },
        "region": "str",  # Optional. The slug form of the geographical
          origin of the app. Default: ``nearest available``. Known values are: "atl",
          "nyc", "sfo", "tor", "ams", "fra", "lon", "blr", "sgp", and "syd".
        "services": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "request_duration": {
                            "p95_milliseconds": 0  #
                              Optional. The p95 target request duration in milliseconds
                              for the component.
                        },
                        "requests_per_second": {
                            "per_instance": 0  #
                              Optional. The target number of requests per second per
                              instance for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed. If not set, the health check will
                      be performed on the component's http_port.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "http_port": 0,  # Optional. The internal port on
                  which this service's run command will listen. Default: 8080 If there
                  is not an environment variable with the name ``PORT``"" , one will be
                  automatically added with its value set to the value of this field.
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "internal_ports": [
                    0  # Optional. The ports on which this
                      service will listen for internal traffic.
                ],
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "protocol": "str",  # Optional. The protocol which
                  the service uses to serve traffic on the http_port.   * ``HTTP``"" :
                  The app is serving the HTTP protocol. Default. * ``HTTP2``"" : The
                  app is serving the HTTP/2 protocol. Currently, this needs to be
                  implemented in the service by serving HTTP/2 cleartext (h2c). Known
                  values are: "HTTP" and "HTTP2".
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "drain_seconds": 0,  # Optional. The number
                      of seconds to wait between selecting a container instance for
                      termination and issuing the TERM signal. Selecting a container
                      instance for termination begins an asynchronous drain of new
                      requests on upstream load-balancers. (Default 15).
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "static_sites": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "catchall_document": "str",  # Optional. The name of
                  the document to use as the fallback for any requests to documents
                  that are not found when serving this static site. Only 1 of
                  ``catchall_document`` or ``error_document`` can be set.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "error_document": "404.html",  # Optional. Default
                  value is "404.html". The name of the error document to use when
                  serving this static site. Default: 404.html. If no such file exists
                  within the built assets, App Platform will supply one.
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "index_document": "index.html",  # Optional. Default
                  value is "index.html". The name of the index document to use when
                  serving this static site. Default: index.html.
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "output_dir": "str",  # Optional. An optional path to
                  where the built assets will be located, relative to the build
                  context. If not set, App Platform will automatically scan for these
                  directory names: ``_static``"" , ``dist``"" , ``public``"" ,
                  ``build``.
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        },
        "workers": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "cpu": {
                            "percent": 80  # Optional.
                              Default value is 80. The average target CPU utilization
                              for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ]
    },
    "app_id": "str"  # Optional. An optional ID of an existing app. If set, the
      spec will be treated as a proposed update to the specified app. The existing app
      is not modified using this method.
}

# response body for status code(s): 200
response == {
    "app_cost": 0,  # Optional. The monthly cost of the proposed app in USD.
    "app_is_static": bool,  # Optional. Indicates whether the app is a static
      app.
    "app_name_available": bool,  # Optional. Indicates whether the app name is
      available.
    "app_name_suggestion": "str",  # Optional. The suggested name if the proposed
      app name is unavailable.
    "app_tier_downgrade_cost": 0,  # Optional. The monthly cost of the proposed
      app in USD using the previous pricing plan tier. For example, if you propose an
      app that uses the Professional tier, the ``app_tier_downgrade_cost`` field
      displays the monthly cost of the app if it were to use the Basic tier. If the
      proposed app already uses the lest expensive tier, the field is empty.
    "existing_static_apps": "str",  # Optional. The maximum number of free static
      apps the account can have. We will charge you for any additional static apps.
    "spec": {
        "name": "str",  # The name of the app. Must be unique across all apps
          in the same account. Required.
        "databases": [
            {
                "name": "str",  # The database's name. The name must
                  be unique across all components within the same app and cannot use
                  capital letters. Required.
                "cluster_name": "str",  # Optional. The name of the
                  underlying DigitalOcean DBaaS cluster. This is required for
                  production databases. For dev databases, if cluster_name is not set,
                  a new cluster will be provisioned.
                "db_name": "str",  # Optional. The name of the MySQL
                  or PostgreSQL database to configure.
                "db_user": "str",  # Optional. The name of the MySQL
                  or PostgreSQL user to configure.
                "engine": "UNSET",  # Optional. Default value is
                  "UNSET". * MYSQL: MySQL * PG: PostgreSQL * REDIS: Caching * MONGODB:
                  MongoDB * KAFKA: Kafka * OPENSEARCH: OpenSearch * VALKEY: ValKey.
                  Known values are: "UNSET", "MYSQL", "PG", "REDIS", "MONGODB",
                  "KAFKA", "OPENSEARCH", and "VALKEY".
                "production": bool,  # Optional. Whether this is a
                  production or dev database.
                "version": "str"  # Optional. The version of the
                  database engine.
            }
        ],
        "disable_edge_cache": False,  # Optional. Default value is False. ..
          role:: raw-html-m2r(raw)    :format: html   If set to ``true``"" , the app
          will **not** be cached at the edge (CDN). Enable this option if you want to
          manage CDN configuration yourself"u2014whether by using an external CDN
          provider or by handling static content and caching within your app. This
          setting is also recommended for apps that require real-time data or serve
          dynamic content, such as those using Server-Sent Events (SSE) over GET, or
          hosting an MCP (Model Context Protocol) Server that utilizes SSE.""
          :raw-html-m2r:`<br>` **Note:** This feature is not available for static site
          components."" :raw-html-m2r:`<br>` For more information, see `Disable CDN
          Cache
          <https://docs.digitalocean.com/products/app-platform/how-to/cache-content/#disable-cdn-cache>`_.
        "disable_email_obfuscation": False,  # Optional. Default value is
          False. If set to ``true``"" , email addresses in the app will not be
          obfuscated. This is useful for apps that require email addresses to be
          visible (in the HTML markup).
        "domains": [
            {
                "domain": "str",  # The hostname for the domain.
                  Required.
                "minimum_tls_version": "str",  # Optional. The
                  minimum version of TLS a client application can use to access
                  resources for the domain.  Must be one of the following values
                  wrapped within quotations: ``"1.2"`` or ``"1.3"``. Known values are:
                  "1.2" and "1.3".
                "type": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * DEFAULT: The default ``.ondigitalocean.app`` domain
                  assigned to this app * PRIMARY: The primary domain for this app that
                  is displayed as the default in the control panel, used in bindable
                  environment variables, and any other places that reference an app's
                  live URL. Only one domain may be set as primary. * ALIAS: A
                  non-primary domain. Known values are: "UNSPECIFIED", "DEFAULT",
                  "PRIMARY", and "ALIAS".
                "wildcard": bool,  # Optional. Indicates whether the
                  domain includes all sub-domains, in addition to the given domain.
                "zone": "str"  # Optional. Optional. If the domain
                  uses DigitalOcean DNS and you would like App Platform to
                  automatically manage it for you, set this to the name of the domain
                  on your account.  For example, If the domain you are adding is
                  ``app.domain.com``"" , the zone could be ``domain.com``.
            }
        ],
        "egress": {
            "type": "AUTOASSIGN"  # Optional. Default value is
              "AUTOASSIGN". The app egress type. Known values are: "AUTOASSIGN" and
              "DEDICATED_IP".
        },
        "enhanced_threat_control_enabled": False,  # Optional. Default value
          is False. If set to ``true``"" , suspicious requests will go through
          additional security checks to help mitigate layer 7 DDoS attacks.
        "functions": [
            {
                "name": "str",  # The name. Must be unique across all
                  components within the same app. Required.
                "alerts": [
                    {
                        "disabled": bool,  # Optional. Is the
                          alert disabled?.
                        "operator": "UNSPECIFIED_OPERATOR",
                          # Optional. Default value is "UNSPECIFIED_OPERATOR". Known
                          values are: "UNSPECIFIED_OPERATOR", "GREATER_THAN", and
                          "LESS_THAN".
                        "rule": "UNSPECIFIED_RULE",  #
                          Optional. Default value is "UNSPECIFIED_RULE". Known values
                          are: "UNSPECIFIED_RULE", "CPU_UTILIZATION",
                          "MEM_UTILIZATION", "RESTART_COUNT", "DEPLOYMENT_FAILED",
                          "DEPLOYMENT_LIVE", "DOMAIN_FAILED", "DOMAIN_LIVE",
                          "AUTOSCALE_FAILED", "AUTOSCALE_SUCCEEDED",
                          "FUNCTIONS_ACTIVATION_COUNT",
                          "FUNCTIONS_AVERAGE_DURATION_MS",
                          "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                          "FUNCTIONS_AVERAGE_WAIT_TIME_MS", "FUNCTIONS_ERROR_COUNT",
                          "FUNCTIONS_GB_RATE_PER_SECOND", "REQUESTS_PER_SECOND", and
                          "REQUEST_DURATION_P95_MS".
                        "value": 0.0,  # Optional. Threshold
                          value for alert.
                        "window": "UNSPECIFIED_WINDOW"  #
                          Optional. Default value is "UNSPECIFIED_WINDOW". Known values
                          are: "UNSPECIFIED_WINDOW", "FIVE_MINUTES", "TEN_MINUTES",
                          "THIRTY_MINUTES", and "ONE_HOUR".
                    }
                ],
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "ingress": {
            "rules": [
                {
                    "component": {
                        "name": "str",  # The name of the
                          component to route to. Required.
                        "preserve_path_prefix": "str",  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``. Note: this is not applicable for Functions
                          Components and is mutually exclusive with ``rewrite``.
                        "rewrite": "str"  # Optional. An
                          optional field that will rewrite the path of the component to
                          be what is specified here. By default, the HTTP request path
                          will be trimmed from the left when forwarded to the
                          component. For example, a component with ``path=/api`` will
                          have requests to ``/api/list`` trimmed to ``/list``. If you
                          specified the rewrite to be ``/v1/``"" , requests to
                          ``/api/list`` would be rewritten to ``/v1/list``. Note: this
                          is mutually exclusive with ``preserve_path_prefix``.
                    },
                    "cors": {
                        "allow_credentials": bool,  #
                          Optional. Whether browsers should expose the response to the
                          client-side JavaScript code when the request"u2019s
                          credentials mode is include. This configures the
                          ``Access-Control-Allow-Credentials`` header.
                        "allow_headers": [
                            "str"  # Optional. The set of
                              allowed HTTP request headers. This configures the
                              ``Access-Control-Allow-Headers`` header.
                        ],
                        "allow_methods": [
                            "str"  # Optional. The set of
                              allowed HTTP methods. This configures the
                              ``Access-Control-Allow-Methods`` header.
                        ],
                        "allow_origins": [
                            {
                                "exact": "str",  #
                                  Optional. Exact string match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set. An empty
                                  string is a valid value and will be serialized
                                  explicitly rather than being omitted from the
                                  payload.
                                "prefix": "str",  #
                                  Optional. Prefix-based match. Only 1 of ``exact``"" ,
                                  ``prefix``"" , or ``regex`` must be set.
                                "regex": "str"  #
                                  Optional. RE2 style regex-based match. Only 1 of
                                  ``exact``"" , ``prefix``"" , or ``regex`` must be
                                  set. For more information about RE2 syntax, see:
                                  https://github.com/google/re2/wiki/Syntax.
                            }
                        ],
                        "expose_headers": [
                            "str"  # Optional. The set of
                              HTTP response headers that browsers are allowed to
                              access. This configures the
                              ``Access-Control-Expose-Headers`` header.
                        ],
                        "max_age": "str"  # Optional. An
                          optional duration specifying how long browsers can cache the
                          results of a preflight request. This configures the
                          ``Access-Control-Max-Age`` header.
                    },
                    "match": {
                        "authority": {
                            "exact": "str"  # Exact
                              string match. An empty string is a valid value and will
                              be serialized explicitly rather than being omitted from
                              the payload. Required.
                        },
                        "path": {
                            "prefix": "str"  #
                              Prefix-based match. For example, ``/api`` will match
                              ``/api``"" , ``/api/``"" , and any nested paths such as
                              ``/api/v1/endpoint``. Required.
                        }
                    },
                    "redirect": {
                        "authority": "str",  # Optional. The
                          authority/host to redirect to. This can be a hostname or IP
                          address. Note: use ``port`` to set the port.
                        "port": 0,  # Optional. The port to
                          redirect to.
                        "redirect_code": 0,  # Optional. The
                          redirect code to use. Defaults to ``302``. Supported values
                          are 300, 301, 302, 303, 304, 307, 308.
                        "scheme": "str",  # Optional. The
                          scheme to redirect to. Supported values are ``http`` or
                          ``https``. Default: ``https``.
                        "uri": "str"  # Optional. An optional
                          URI path to redirect to. Note: if this is specified the whole
                          URI of the original request will be overwritten to this
                          value, irrespective of the original request URI being
                          matched.
                    }
                }
            ]
        },
        "jobs": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "kind": "UNSPECIFIED",  # Optional. Default value is
                  "UNSPECIFIED". * UNSPECIFIED: Default job type, will auto-complete to
                  POST_DEPLOY kind. * PRE_DEPLOY: Indicates a job that runs before an
                  app deployment. * POST_DEPLOY: Indicates a job that runs after an app
                  deployment. * FAILED_DEPLOY: Indicates a job that runs after a
                  component fails to deploy. Known values are: "UNSPECIFIED",
                  "PRE_DEPLOY", "POST_DEPLOY", and "FAILED_DEPLOY".
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "maintenance": {
            "archive": bool,  # Optional. Indicates whether the app
              should be archived. Setting this to true implies that enabled is set to
              true.
            "enabled": bool,  # Optional. Indicates whether maintenance
              mode should be enabled for the app.
            "offline_page_url": "str"  # Optional. A custom offline page
              to display when maintenance mode is enabled or the app is archived.
        },
        "region": "str",  # Optional. The slug form of the geographical
          origin of the app. Default: ``nearest available``. Known values are: "atl",
          "nyc", "sfo", "tor", "ams", "fra", "lon", "blr", "sgp", and "syd".
        "services": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "request_duration": {
                            "p95_milliseconds": 0  #
                              Optional. The p95 target request duration in milliseconds
                              for the component.
                        },
                        "requests_per_second": {
                            "per_instance": 0  #
                              Optional. The target number of requests per second per
                              instance for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed. If not set, the health check will
                      be performed on the component's http_port.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "http_port": 0,  # Optional. The internal port on
                  which this service's run command will listen. Default: 8080 If there
                  is not an environment variable with the name ``PORT``"" , one will be
                  automatically added with its value set to the value of this field.
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "internal_ports": [
                    0  # Optional. The ports on which this
                      service will listen for internal traffic.
                ],
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "protocol": "str",  # Optional. The protocol which
                  the service uses to serve traffic on the http_port.   * ``HTTP``"" :
                  The app is serving the HTTP protocol. Default. * ``HTTP2``"" : The
                  app is serving the HTTP/2 protocol. Currently, this needs to be
                  implemented in the service by serving HTTP/2 cleartext (h2c). Known
                  values are: "HTTP" and "HTTP2".
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "drain_seconds": 0,  # Optional. The number
                      of seconds to wait between selecting a container instance for
                      termination and issuing the TERM signal. Selecting a container
                      instance for termination begins an asynchronous drain of new
                      requests on upstream load-balancers. (Default 15).
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ],
        "static_sites": [
            {
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "catchall_document": "str",  # Optional. The name of
                  the document to use as the fallback for any requests to documents
                  that are not found when serving this static site. Only 1 of
                  ``catchall_document`` or ``error_document`` can be set.
                "cors": {
                    "allow_credentials": bool,  # Optional.
                      Whether browsers should expose the response to the client-side
                      JavaScript code when the request"u2019s credentials mode is
                      include. This configures the ``Access-Control-Allow-Credentials``
                      header.
                    "allow_headers": [
                        "str"  # Optional. The set of allowed
                          HTTP request headers. This configures the
                          ``Access-Control-Allow-Headers`` header.
                    ],
                    "allow_methods": [
                        "str"  # Optional. The set of allowed
                          HTTP methods. This configures the
                          ``Access-Control-Allow-Methods`` header.
                    ],
                    "allow_origins": [
                        {
                            "exact": "str",  # Optional.
                              Exact string match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set. An empty string is a valid
                              value and will be serialized explicitly rather than being
                              omitted from the payload.
                            "prefix": "str",  # Optional.
                              Prefix-based match. Only 1 of ``exact``"" , ``prefix``""
                              , or ``regex`` must be set.
                            "regex": "str"  # Optional.
                              RE2 style regex-based match. Only 1 of ``exact``"" ,
                              ``prefix``"" , or ``regex`` must be set. For more
                              information about RE2 syntax, see:
                              https://github.com/google/re2/wiki/Syntax.
                        }
                    ],
                    "expose_headers": [
                        "str"  # Optional. The set of HTTP
                          response headers that browsers are allowed to access. This
                          configures the ``Access-Control-Expose-Headers`` header.
                    ],
                    "max_age": "str"  # Optional. An optional
                      duration specifying how long browsers can cache the results of a
                      preflight request. This configures the ``Access-Control-Max-Age``
                      header.
                },
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "error_document": "404.html",  # Optional. Default
                  value is "404.html". The name of the error document to use when
                  serving this static site. Default: 404.html. If no such file exists
                  within the built assets, App Platform will supply one.
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "index_document": "index.html",  # Optional. Default
                  value is "index.html". The name of the index document to use when
                  serving this static site. Default: index.html.
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "output_dir": "str",  # Optional. An optional path to
                  where the built assets will be located, relative to the build
                  context. If not set, App Platform will automatically scan for these
                  directory names: ``_static``"" , ``dist``"" , ``public``"" ,
                  ``build``.
                "routes": [
                    {
                        "path": "str",  # Optional.
                          (Deprecated - Use Ingress Rules instead). An HTTP path
                          prefix. Paths must start with / and must be unique across all
                          components within an app.
                        "preserve_path_prefix": bool  #
                          Optional. An optional flag to preserve the path that is
                          forwarded to the backend service. By default, the HTTP
                          request path will be trimmed from the left when forwarded to
                          the component. For example, a component with ``path=/api``
                          will have requests to ``/api/list`` trimmed to ``/list``. If
                          this value is ``true``"" , the path will remain
                          ``/api/list``.
                    }
                ],
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str"  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
            }
        ],
        "vpc": {
            "egress_ips": [
                {
                    "ip": "str"  # Optional. The egress ips
                      associated with the VPC.
                }
            ],
            "id": "str"  # Optional. The ID of the VPC.
        },
        "workers": [
            {
                "autoscaling": {
                    "max_instance_count": 0,  # Optional. The
                      maximum amount of instances for this component. Maximum 250.
                      Consider using a larger instance size if your application
                      requires more than 250 instances.
                    "metrics": {
                        "cpu": {
                            "percent": 80  # Optional.
                              Default value is 80. The average target CPU utilization
                              for the component.
                        }
                    },
                    "min_instance_count": 0  # Optional. The
                      minimum amount of instances for this component.
                },
                "bitbucket": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "build_command": "str",  # Optional. An optional
                  build command to run while building this component from source.
                "dockerfile_path": "str",  # Optional. The path to
                  the Dockerfile relative to the root of the repo. If set, it will be
                  used to build this component. Otherwise, App Platform will attempt to
                  build it using buildpacks.
                "environment_slug": "str",  # Optional. An
                  environment slug describing the type of this app. For a full list,
                  please refer to `the product documentation
                  <https://docs.digitalocean.com/products/app-platform/>`_.
                "envs": [
                    {
                        "key": "str",  # The variable name.
                          Required.
                        "scope": "RUN_AND_BUILD_TIME",  #
                          Optional. Default value is "RUN_AND_BUILD_TIME". * RUN_TIME:
                          Made available only at run-time * BUILD_TIME: Made available
                          only at build-time * RUN_AND_BUILD_TIME: Made available at
                          both build and run-time. Known values are: "UNSET",
                          "RUN_TIME", "BUILD_TIME", and "RUN_AND_BUILD_TIME".
                        "type": "GENERAL",  # Optional.
                          Default value is "GENERAL". * GENERAL: A plain-text
                          environment variable * SECRET: A secret encrypted environment
                          variable. Known values are: "GENERAL" and "SECRET".
                        "value": "str"  # Optional. The
                          value. If the type is ``SECRET``"" , the value will be
                          encrypted on first submission. On following submissions, the
                          encrypted value should be used.
                    }
                ],
                "git": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "repo_clone_url": "str"  # Optional. The
                      clone URL of the repo. Example:
                      ``https://github.com/digitalocean/sample-golang.git``.
                },
                "github": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "gitlab": {
                    "branch": "str",  # Optional. The name of the
                      branch to use.
                    "deploy_on_push": bool,  # Optional. Whether
                      to automatically deploy new commits made to the repo.
                    "repo": "str"  # Optional. The name of the
                      repo in the format owner/repo. Example:
                      ``digitalocean/sample-golang``.
                },
                "image": {
                    "deploy_on_push": {
                        "enabled": bool  # Optional. Whether
                          to automatically deploy new images. Can only be used for
                          images hosted in DOCR and can only be used with an image tag,
                          not a specific digest.
                    },
                    "digest": "str",  # Optional. The image
                      digest. Cannot be specified if tag is provided.
                    "registry": "str",  # Optional. The registry
                      name. Must be left empty for the ``DOCR`` registry type.
                    "registry_credentials": "str",  # Optional.
                      The credentials to be able to pull the image. The value will be
                      encrypted on first submission. On following submissions, the
                      encrypted value should be used.   * "$username:$access_token" for
                      registries of type ``DOCKER_HUB``. * "$username:$access_token"
                      for registries of type ``GHCR``.
                    "registry_type": "str",  # Optional. *
                      DOCKER_HUB: The DockerHub container registry type. * DOCR: The
                      DigitalOcean container registry type. * GHCR: The Github
                      container registry type. Known values are: "DOCKER_HUB", "DOCR",
                      and "GHCR".
                    "repository": "str",  # Optional. The
                      repository name.
                    "tag": "latest"  # Optional. Default value is
                      "latest". The repository tag. Defaults to ``latest`` if not
                      provided and no digest is provided. Cannot be specified if digest
                      is provided.
                },
                "instance_count": 1,  # Optional. Default value is 1.
                  The amount of instances that this component should be scaled to.
                  Default: 1. Must not be set if autoscaling is used.
                "instance_size_slug": {},
                "liveness_health_check": {
                    "failure_threshold": 0,  # Optional. The
                      number of failed health checks before considered unhealthy.
                    "http_path": "str",  # Optional. The route
                      path used for the HTTP health check ping. If not set, the HTTP
                      health check will be disabled and a TCP health check used
                      instead.
                    "initial_delay_seconds": 0,  # Optional. The
                      number of seconds to wait before beginning health checks.
                    "period_seconds": 0,  # Optional. The number
                      of seconds to wait between health checks.
                    "port": 0,  # Optional. The port on which the
                      health check will be performed.
                    "success_threshold": 0,  # Optional. The
                      number of successful health checks before considered healthy.
                    "timeout_seconds": 0  # Optional. The number
                      of seconds after which the check times out.
                },
                "log_destinations": [
                    {
                        "name": "str",  # Required.
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "open_search": {
                            "basic_auth": {
                                "password": "str",  #
                                  Optional. Password for user defined in User. Is
                                  required when ``endpoint`` is set. Cannot be set if
                                  using a DigitalOcean DBaaS OpenSearch cluster.
                                "user": "str"  #
                                  Optional. Username to authenticate with. Only
                                  required when ``endpoint`` is set. Defaults to
                                  ``doadmin`` when ``cluster_name`` is set.
                            },
                            "cluster_name": "str",  #
                              Optional. The name of a DigitalOcean DBaaS OpenSearch
                              cluster to use as a log forwarding destination. Cannot be
                              specified if ``endpoint`` is also specified.
                            "endpoint": "str",  #
                              Optional. OpenSearch API Endpoint. Only HTTPS is
                              supported. Format: https://:code:`<host>`::code:`<port>`.
                              Cannot be specified if ``cluster_name`` is also
                              specified.
                            "index_name": "logs"  #
                              Optional. Default value is "logs". The index name to use
                              for the logs. If not set, the default index name is
                              "logs".
                        },
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    }
                ],
                "name": "str",  # Optional. The name. Must be unique
                  across all components within the same app.
                "run_command": "str",  # Optional. An optional run
                  command to override the component's default.
                "source_dir": "str",  # Optional. An optional path to
                  the working directory to use for the build. For Dockerfile builds,
                  this will be used as the build context. Must be relative to the root
                  of the repo.
                "termination": {
                    "grace_period_seconds": 0  # Optional. The
                      number of seconds to wait between sending a TERM signal to a
                      container and issuing a KILL which causes immediate shutdown.
                      (Default 120).
                }
            }
        ]
    }
}
validate_rollback(app_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
validate_rollback(app_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Validate App Rollback.

Check whether an app can be rolled back to a specific deployment. This endpoint can also be used to check if there are any warnings or validation conditions that will cause the rollback to proceed under unideal circumstances. For example, if a component must be rebuilt as part of the rollback causing it to take longer than usual.

Parameters:
  • app_id (str) – The app ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "deployment_id": "str",  # Optional. The ID of the deployment to rollback to.
    "skip_pin": bool  # Optional. Whether to skip pinning the rollback
      deployment. If false, the rollback deployment will be pinned and any new
      deployments including Auto Deploy on Push hooks will be disabled until the
      rollback is either manually committed or reverted via the CommitAppRollback or
      RevertAppRollback endpoints respectively. If true, the rollback will be
      immediately committed and the app will remain unpinned.
}

# response body for status code(s): 200
response == {
    "error": {
        "code": "str",  # Optional. A code identifier that represents the
          failing condition.  Failing conditions:   * ``incompatible_phase`` -
          indicates that the deployment's phase is not suitable for rollback. *
          ``incompatible_result`` - indicates that the deployment's result is not
          suitable for rollback. * ``exceeded_revision_limit`` - indicates that the app
          has exceeded the rollback revision limits for its tier. * ``app_pinned`` -
          indicates that there is already a rollback in progress and the app is pinned.
          * ``database_config_conflict`` - indicates that the deployment's database
          config is different than the current config. * ``region_conflict`` -
          indicates that the deployment's region differs from the current app region.
          Warning conditions:   * ``static_site_requires_rebuild`` - indicates that the
          deployment contains at least one static site that will require a rebuild. *
          ``image_source_missing_digest`` - indicates that the deployment contains at
          least one component with an image source that is missing a digest. Known
          values are: "incompatible_phase", "incompatible_result",
          "exceeded_revision_limit", "app_pinned", "database_config_conflict",
          "region_conflict", "static_site_requires_rebuild", and
          "image_source_missing_digest".
        "components": [
            "str"  # Optional.
        ],
        "message": "str"  # Optional. A human-readable message describing the
          failing condition.
    },
    "valid": bool,  # Optional. Indicates whether the app can be rolled back to
      the specified deployment.
    "warnings": [
        {
            "code": "str",  # Optional. A code identifier that represents
              the failing condition.  Failing conditions:   * ``incompatible_phase`` -
              indicates that the deployment's phase is not suitable for rollback. *
              ``incompatible_result`` - indicates that the deployment's result is not
              suitable for rollback. * ``exceeded_revision_limit`` - indicates that the
              app has exceeded the rollback revision limits for its tier. *
              ``app_pinned`` - indicates that there is already a rollback in progress
              and the app is pinned. * ``database_config_conflict`` - indicates that
              the deployment's database config is different than the current config. *
              ``region_conflict`` - indicates that the deployment's region differs from
              the current app region.  Warning conditions:   *
              ``static_site_requires_rebuild`` - indicates that the deployment contains
              at least one static site that will require a rebuild. *
              ``image_source_missing_digest`` - indicates that the deployment contains
              at least one component with an image source that is missing a digest.
              Known values are: "incompatible_phase", "incompatible_result",
              "exceeded_revision_limit", "app_pinned", "database_config_conflict",
              "region_conflict", "static_site_requires_rebuild", and
              "image_source_missing_digest".
            "components": [
                "str"  # Optional. Contains a list of warnings that
                  may cause the rollback to run under unideal circumstances.
            ],
            "message": "str"  # Optional. A human-readable message
              describing the failing condition.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.AutoscalepoolsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s autoscalepools attribute.

create(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Autoscale Pool.

To create a new autoscale pool, send a POST request to /v2/droplets/autoscale setting the required attributes.

The response body will contain a JSON object with a key called autoscale_pool containing the standard attributes for the new autoscale pool.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {},
    "droplet_template": {
        "image": "str",  # The Droplet image to be used for all Droplets in
          the autoscale pool. You may specify the slug or the image ID. Required.
        "region": "str",  # The datacenter in which all of the Droplets will
          be created. Required. Known values are: "nyc1", "nyc2", "nyc3", "ams2",
          "ams3", "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1", "tor1", "blr1", and
          "syd1".
        "size": "str",  # The Droplet size to be used for all Droplets in the
          autoscale pool. Required.
        "ssh_keys": [
            "str"  # The SSH keys to be installed on the Droplets in the
              autoscale pool. You can either specify the key ID or the fingerprint.
              Requires ``ssh_key:read`` scope. Required.
        ],
        "ipv6": bool,  # Optional. Assigns a unique IPv6 address to each of
          the Droplets in the autoscale pool.
        "name": "str",  # Optional. The name(s) to be applied to all Droplets
          in the autoscale pool.
        "project_id": "str",  # Optional. The project that the Droplets in
          the autoscale pool will belong to. Requires ``project:read`` scope.
        "public_networking": True,  # Optional. Default value is True. An
          optional boolean indicating whether the Droplets should be created with
          public networking or not. By default, all Droplets are created with public
          networking available. If explicitly set to ``false``"" , only private
          networking will be enabled, and public networking will be disabled; currently
          this means that it will not have any public static or Reserved IPv4 or IPv6
          address, nor can one be assigned later. If explicitly set to ``false``"" ,
          ``ipv6`` must also be ``false``.
        "tags": [
            "str"  # Optional. The tags to apply to each of the Droplets
              in the autoscale pool. Requires ``tag:read`` scope.
        ],
        "user_data": "str",  # Optional. A string containing user data that
          cloud-init consumes to configure a Droplet on first boot. User data is often
          a cloud-config file or Bash script. It must be plain text and may not exceed
          64 KiB in size.
        "vpc_uuid": "str",  # Optional. The VPC where the Droplets in the
          autoscale pool will be created. The VPC must be in the region where you want
          to create the Droplets. Requires ``vpc:read`` scope.
        "with_droplet_agent": bool  # Optional. Installs the Droplet agent.
          This must be set to true to monitor Droplets for resource utilization
          scaling.
    },
    "name": "str"  # The human-readable name of the autoscale pool. This field
      cannot be updated. Required.
}

# response body for status code(s): 202
response == {
    "autoscale_pool": {
        "active_resources_count": 0,  # The number of active Droplets in the
          autoscale pool. Required.
        "config": {},
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the autoscale pool was
          created. Required.
        "droplet_template": {
            "image": "str",  # The Droplet image to be used for all
              Droplets in the autoscale pool. You may specify the slug or the image ID.
              Required.
            "region": "str",  # The datacenter in which all of the
              Droplets will be created. Required. Known values are: "nyc1", "nyc2",
              "nyc3", "ams2", "ams3", "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1",
              "tor1", "blr1", and "syd1".
            "size": "str",  # The Droplet size to be used for all
              Droplets in the autoscale pool. Required.
            "ssh_keys": [
                "str"  # The SSH keys to be installed on the Droplets
                  in the autoscale pool. You can either specify the key ID or the
                  fingerprint. Requires ``ssh_key:read`` scope. Required.
            ],
            "ipv6": bool,  # Optional. Assigns a unique IPv6 address to
              each of the Droplets in the autoscale pool.
            "name": "str",  # Optional. The name(s) to be applied to all
              Droplets in the autoscale pool.
            "project_id": "str",  # Optional. The project that the
              Droplets in the autoscale pool will belong to. Requires ``project:read``
              scope.
            "public_networking": True,  # Optional. Default value is
              True. An optional boolean indicating whether the Droplets should be
              created with public networking or not. By default, all Droplets are
              created with public networking available. If explicitly set to
              ``false``"" , only private networking will be enabled, and public
              networking will be disabled; currently this means that it will not have
              any public static or Reserved IPv4 or IPv6 address, nor can one be
              assigned later. If explicitly set to ``false``"" , ``ipv6`` must also be
              ``false``.
            "tags": [
                "str"  # Optional. The tags to apply to each of the
                  Droplets in the autoscale pool. Requires ``tag:read`` scope.
            ],
            "user_data": "str",  # Optional. A string containing user
              data that cloud-init consumes to configure a Droplet on first boot. User
              data is often a cloud-config file or Bash script. It must be plain text
              and may not exceed 64 KiB in size.
            "vpc_uuid": "str",  # Optional. The VPC where the Droplets in
              the autoscale pool will be created. The VPC must be in the region where
              you want to create the Droplets. Requires ``vpc:read`` scope.
            "with_droplet_agent": bool  # Optional. Installs the Droplet
              agent. This must be set to true to monitor Droplets for resource
              utilization scaling.
        },
        "id": "str",  # A unique identifier for each autoscale pool instance.
          This is automatically generated upon autoscale pool creation. Required.
        "name": "str",  # The human-readable name set for the autoscale pool.
          Required.
        "status": "str",  # The current status of the autoscale pool.
          Required. Known values are: "active", "deleting", and "error".
        "updated_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the autoscale pool was
          last updated. Required.
        "current_utilization": {
            "cpu": 0.0,  # Optional. The average CPU utilization of the
              autoscale pool.
            "memory": 0.0  # Optional. The average memory utilization of
              the autoscale pool.
        }
    }
}
delete(autoscale_pool_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete autoscale pool.

To destroy an autoscale pool, send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID endpoint.

A successful response will include a 202 response code and no content.

Parameters:

autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_dangerous(autoscale_pool_id: str, *, x_dangerous: bool, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete autoscale pool and resources.

To destroy an autoscale pool and its associated resources (Droplets), send a DELETE request to the /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/dangerous endpoint.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • x_dangerous (bool) – Acknowledge this action will destroy the autoscale pool and its associated resources and can not be reversed. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(autoscale_pool_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Autoscale Pool.

To show information about an individual autoscale pool, send a GET request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID.

Parameters:

autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "autoscale_pool": {
        "active_resources_count": 0,  # The number of active Droplets in the
          autoscale pool. Required.
        "config": {},
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the autoscale pool was
          created. Required.
        "droplet_template": {
            "image": "str",  # The Droplet image to be used for all
              Droplets in the autoscale pool. You may specify the slug or the image ID.
              Required.
            "region": "str",  # The datacenter in which all of the
              Droplets will be created. Required. Known values are: "nyc1", "nyc2",
              "nyc3", "ams2", "ams3", "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1",
              "tor1", "blr1", and "syd1".
            "size": "str",  # The Droplet size to be used for all
              Droplets in the autoscale pool. Required.
            "ssh_keys": [
                "str"  # The SSH keys to be installed on the Droplets
                  in the autoscale pool. You can either specify the key ID or the
                  fingerprint. Requires ``ssh_key:read`` scope. Required.
            ],
            "ipv6": bool,  # Optional. Assigns a unique IPv6 address to
              each of the Droplets in the autoscale pool.
            "name": "str",  # Optional. The name(s) to be applied to all
              Droplets in the autoscale pool.
            "project_id": "str",  # Optional. The project that the
              Droplets in the autoscale pool will belong to. Requires ``project:read``
              scope.
            "public_networking": True,  # Optional. Default value is
              True. An optional boolean indicating whether the Droplets should be
              created with public networking or not. By default, all Droplets are
              created with public networking available. If explicitly set to
              ``false``"" , only private networking will be enabled, and public
              networking will be disabled; currently this means that it will not have
              any public static or Reserved IPv4 or IPv6 address, nor can one be
              assigned later. If explicitly set to ``false``"" , ``ipv6`` must also be
              ``false``.
            "tags": [
                "str"  # Optional. The tags to apply to each of the
                  Droplets in the autoscale pool. Requires ``tag:read`` scope.
            ],
            "user_data": "str",  # Optional. A string containing user
              data that cloud-init consumes to configure a Droplet on first boot. User
              data is often a cloud-config file or Bash script. It must be plain text
              and may not exceed 64 KiB in size.
            "vpc_uuid": "str",  # Optional. The VPC where the Droplets in
              the autoscale pool will be created. The VPC must be in the region where
              you want to create the Droplets. Requires ``vpc:read`` scope.
            "with_droplet_agent": bool  # Optional. Installs the Droplet
              agent. This must be set to true to monitor Droplets for resource
              utilization scaling.
        },
        "id": "str",  # A unique identifier for each autoscale pool instance.
          This is automatically generated upon autoscale pool creation. Required.
        "name": "str",  # The human-readable name set for the autoscale pool.
          Required.
        "status": "str",  # The current status of the autoscale pool.
          Required. Known values are: "active", "deleting", and "error".
        "updated_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the autoscale pool was
          last updated. Required.
        "current_utilization": {
            "cpu": 0.0,  # Optional. The average CPU utilization of the
              autoscale pool.
            "memory": 0.0  # Optional. The average memory utilization of
              the autoscale pool.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All Autoscale Pools.

To list all autoscale pools in your team, send a GET request to /v2/droplets/autoscale. The response body will be a JSON object with a key of autoscale_pools containing an array of autoscale pool objects. These each contain the standard autoscale pool attributes.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • name (str) – The name of the autoscale pool. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "autoscale_pools": [
        {
            "active_resources_count": 0,  # The number of active Droplets
              in the autoscale pool. Required.
            "config": {},
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the autoscale
              pool was created. Required.
            "droplet_template": {
                "image": "str",  # The Droplet image to be used for
                  all Droplets in the autoscale pool. You may specify the slug or the
                  image ID. Required.
                "region": "str",  # The datacenter in which all of
                  the Droplets will be created. Required. Known values are: "nyc1",
                  "nyc2", "nyc3", "ams2", "ams3", "sfo1", "sfo2", "sfo3", "sgp1",
                  "lon1", "fra1", "tor1", "blr1", and "syd1".
                "size": "str",  # The Droplet size to be used for all
                  Droplets in the autoscale pool. Required.
                "ssh_keys": [
                    "str"  # The SSH keys to be installed on the
                      Droplets in the autoscale pool. You can either specify the key ID
                      or the fingerprint. Requires ``ssh_key:read`` scope. Required.
                ],
                "ipv6": bool,  # Optional. Assigns a unique IPv6
                  address to each of the Droplets in the autoscale pool.
                "name": "str",  # Optional. The name(s) to be applied
                  to all Droplets in the autoscale pool.
                "project_id": "str",  # Optional. The project that
                  the Droplets in the autoscale pool will belong to. Requires
                  ``project:read`` scope.
                "public_networking": True,  # Optional. Default value
                  is True. An optional boolean indicating whether the Droplets should
                  be created with public networking or not. By default, all Droplets
                  are created with public networking available. If explicitly set to
                  ``false``"" , only private networking will be enabled, and public
                  networking will be disabled; currently this means that it will not
                  have any public static or Reserved IPv4 or IPv6 address, nor can one
                  be assigned later. If explicitly set to ``false``"" , ``ipv6`` must
                  also be ``false``.
                "tags": [
                    "str"  # Optional. The tags to apply to each
                      of the Droplets in the autoscale pool. Requires ``tag:read``
                      scope.
                ],
                "user_data": "str",  # Optional. A string containing
                  user data that cloud-init consumes to configure a Droplet on first
                  boot. User data is often a cloud-config file or Bash script. It must
                  be plain text and may not exceed 64 KiB in size.
                "vpc_uuid": "str",  # Optional. The VPC where the
                  Droplets in the autoscale pool will be created. The VPC must be in
                  the region where you want to create the Droplets. Requires
                  ``vpc:read`` scope.
                "with_droplet_agent": bool  # Optional. Installs the
                  Droplet agent. This must be set to true to monitor Droplets for
                  resource utilization scaling.
            },
            "id": "str",  # A unique identifier for each autoscale pool
              instance. This is automatically generated upon autoscale pool creation.
              Required.
            "name": "str",  # The human-readable name set for the
              autoscale pool. Required.
            "status": "str",  # The current status of the autoscale pool.
              Required. Known values are: "active", "deleting", and "error".
            "updated_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the autoscale
              pool was last updated. Required.
            "current_utilization": {
                "cpu": 0.0,  # Optional. The average CPU utilization
                  of the autoscale pool.
                "memory": 0.0  # Optional. The average memory
                  utilization of the autoscale pool.
            }
        }
    ],
    "links": {
        "pages": {}
    }
}
list_history(autoscale_pool_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List history events.

To list all of the scaling history events of an autoscale pool, send a GET request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/history.

The response body will be a JSON object with a key of history. This will be set to an array containing objects each representing a history event.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "history": [
        {
            "created_at": "2020-02-20 00:00:00",  # The creation time of
              the history event in ISO8601 combined date and time format. Required.
            "current_instance_count": 0,  # The current number of
              Droplets in the autoscale pool. Required.
            "desired_instance_count": 0,  # The target number of Droplets
              for the autoscale pool after the scaling event. Required.
            "history_event_id": "str",  # The unique identifier of the
              history event. Required.
            "reason": "str",  # The reason for the scaling event.
              Required. Known values are: "CONFIGURATION_CHANGE", "SCALE_UP", and
              "SCALE_DOWN".
            "status": "str",  # The status of the scaling event.
              Required. Known values are: "in_progress", "success", and "error".
            "updated_at": "2020-02-20 00:00:00"  # The last updated time
              of the history event in ISO8601 combined date and time format. Required.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_members(autoscale_pool_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List members.

To list the Droplets in an autoscale pool, send a GET request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID/members.

The response body will be a JSON object with a key of droplets. This will be set to an array containing information about each of the Droplets in the autoscale pool.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "droplets": [
        {
            "created_at": "2020-02-20 00:00:00",  # The creation time of
              the Droplet in ISO8601 combined date and time format. Required.
            "current_utilization": {
                "cpu": 0.0,  # Optional. The CPU utilization average
                  of the individual Droplet.
                "memory": 0.0  # Optional. The memory utilization
                  average of the individual Droplet.
            },
            "droplet_id": 0,  # The unique identifier of the Droplet.
              Required.
            "health_status": "str",  # The health status of the Droplet.
              Required.
            "status": "str",  # The power status of the Droplet.
              Required. Known values are: "provisioning", "active", "deleting", and
              "off".
            "updated_at": "2020-02-20 00:00:00"  # The last updated time
              of the Droplet in ISO8601 combined date and time format. Required.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(autoscale_pool_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(autoscale_pool_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Autoscale Pool.

To update the configuration of an existing autoscale pool, send a PUT request to /v2/droplets/autoscale/$AUTOSCALE_POOL_ID. The request must contain a full representation of the autoscale pool including existing attributes.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {},
    "droplet_template": {
        "image": "str",  # The Droplet image to be used for all Droplets in
          the autoscale pool. You may specify the slug or the image ID. Required.
        "region": "str",  # The datacenter in which all of the Droplets will
          be created. Required. Known values are: "nyc1", "nyc2", "nyc3", "ams2",
          "ams3", "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1", "tor1", "blr1", and
          "syd1".
        "size": "str",  # The Droplet size to be used for all Droplets in the
          autoscale pool. Required.
        "ssh_keys": [
            "str"  # The SSH keys to be installed on the Droplets in the
              autoscale pool. You can either specify the key ID or the fingerprint.
              Requires ``ssh_key:read`` scope. Required.
        ],
        "ipv6": bool,  # Optional. Assigns a unique IPv6 address to each of
          the Droplets in the autoscale pool.
        "name": "str",  # Optional. The name(s) to be applied to all Droplets
          in the autoscale pool.
        "project_id": "str",  # Optional. The project that the Droplets in
          the autoscale pool will belong to. Requires ``project:read`` scope.
        "public_networking": True,  # Optional. Default value is True. An
          optional boolean indicating whether the Droplets should be created with
          public networking or not. By default, all Droplets are created with public
          networking available. If explicitly set to ``false``"" , only private
          networking will be enabled, and public networking will be disabled; currently
          this means that it will not have any public static or Reserved IPv4 or IPv6
          address, nor can one be assigned later. If explicitly set to ``false``"" ,
          ``ipv6`` must also be ``false``.
        "tags": [
            "str"  # Optional. The tags to apply to each of the Droplets
              in the autoscale pool. Requires ``tag:read`` scope.
        ],
        "user_data": "str",  # Optional. A string containing user data that
          cloud-init consumes to configure a Droplet on first boot. User data is often
          a cloud-config file or Bash script. It must be plain text and may not exceed
          64 KiB in size.
        "vpc_uuid": "str",  # Optional. The VPC where the Droplets in the
          autoscale pool will be created. The VPC must be in the region where you want
          to create the Droplets. Requires ``vpc:read`` scope.
        "with_droplet_agent": bool  # Optional. Installs the Droplet agent.
          This must be set to true to monitor Droplets for resource utilization
          scaling.
    },
    "name": "str"  # The human-readable name of the autoscale pool. This field
      cannot be updated. Required.
}

# response body for status code(s): 200
response == {
    "autoscale_pool": {
        "active_resources_count": 0,  # The number of active Droplets in the
          autoscale pool. Required.
        "config": {},
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the autoscale pool was
          created. Required.
        "droplet_template": {
            "image": "str",  # The Droplet image to be used for all
              Droplets in the autoscale pool. You may specify the slug or the image ID.
              Required.
            "region": "str",  # The datacenter in which all of the
              Droplets will be created. Required. Known values are: "nyc1", "nyc2",
              "nyc3", "ams2", "ams3", "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1",
              "tor1", "blr1", and "syd1".
            "size": "str",  # The Droplet size to be used for all
              Droplets in the autoscale pool. Required.
            "ssh_keys": [
                "str"  # The SSH keys to be installed on the Droplets
                  in the autoscale pool. You can either specify the key ID or the
                  fingerprint. Requires ``ssh_key:read`` scope. Required.
            ],
            "ipv6": bool,  # Optional. Assigns a unique IPv6 address to
              each of the Droplets in the autoscale pool.
            "name": "str",  # Optional. The name(s) to be applied to all
              Droplets in the autoscale pool.
            "project_id": "str",  # Optional. The project that the
              Droplets in the autoscale pool will belong to. Requires ``project:read``
              scope.
            "public_networking": True,  # Optional. Default value is
              True. An optional boolean indicating whether the Droplets should be
              created with public networking or not. By default, all Droplets are
              created with public networking available. If explicitly set to
              ``false``"" , only private networking will be enabled, and public
              networking will be disabled; currently this means that it will not have
              any public static or Reserved IPv4 or IPv6 address, nor can one be
              assigned later. If explicitly set to ``false``"" , ``ipv6`` must also be
              ``false``.
            "tags": [
                "str"  # Optional. The tags to apply to each of the
                  Droplets in the autoscale pool. Requires ``tag:read`` scope.
            ],
            "user_data": "str",  # Optional. A string containing user
              data that cloud-init consumes to configure a Droplet on first boot. User
              data is often a cloud-config file or Bash script. It must be plain text
              and may not exceed 64 KiB in size.
            "vpc_uuid": "str",  # Optional. The VPC where the Droplets in
              the autoscale pool will be created. The VPC must be in the region where
              you want to create the Droplets. Requires ``vpc:read`` scope.
            "with_droplet_agent": bool  # Optional. Installs the Droplet
              agent. This must be set to true to monitor Droplets for resource
              utilization scaling.
        },
        "id": "str",  # A unique identifier for each autoscale pool instance.
          This is automatically generated upon autoscale pool creation. Required.
        "name": "str",  # The human-readable name set for the autoscale pool.
          Required.
        "status": "str",  # The current status of the autoscale pool.
          Required. Known values are: "active", "deleting", and "error".
        "updated_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the autoscale pool was
          last updated. Required.
        "current_utilization": {
            "cpu": 0.0,  # Optional. The average CPU utilization of the
              autoscale pool.
            "memory": 0.0  # Optional. The average memory utilization of
              the autoscale pool.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.BalanceOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s balance attribute.

get(**kwargs: Any) MutableMapping[str, Any]

Get Customer Balance.

To retrieve the balances on a customer’s account, send a GET request to /v2/customers/my/balance.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "account_balance": "str",  # Optional. Current balance of the customer's most
      recent billing activity.  Does not reflect ``month_to_date_usage``.
    "generated_at": "2020-02-20 00:00:00",  # Optional. The time at which
      balances were most recently generated.
    "month_to_date_balance": "str",  # Optional. Balance as of the
      ``generated_at`` time.  This value includes the ``account_balance`` and
      ``month_to_date_usage``.
    "month_to_date_usage": "str"  # Optional. Amount used in the current billing
      period as of the ``generated_at`` time.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.BillingHistoryOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s billing_history attribute.

list(**kwargs: Any) MutableMapping[str, Any]

List Billing History.

To retrieve a list of all billing history entries, send a GET request to /v2/customers/my/billing_history.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "billing_history": [
        {
            "amount": "str",  # Optional. Amount of the billing history
              entry.
            "date": "2020-02-20 00:00:00",  # Optional. Time the billing
              history entry occurred.
            "description": "str",  # Optional. Description of the billing
              history entry.
            "invoice_id": "str",  # Optional. ID of the invoice
              associated with the billing history entry, if  applicable.
            "invoice_uuid": "str",  # Optional. UUID of the invoice
              associated with the billing history entry, if  applicable.
            "type": "str"  # Optional. Type of billing history entry.
              Known values are: "ACHFailure", "Adjustment", "AttemptFailed",
              "Chargeback", "Credit", "CreditExpiration", "Invoice", "Payment",
              "Refund", and "Reversal".
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.BillingInsightsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s billing_insights attribute.

list(account_urn: str, start_date: date, end_date: date, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Billing Insights.

This endpoint returns day-over-day changes in billing resource usage based on nightly invoice items, including total amount, region, SKU, and description for a specified date range. It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for a given month as nightly invoice item estimates do not necessarily encompass all invoicing factors for the entire month.

Parameters:
  • account_urn (str) – URN of the customer account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid). Required.

  • start_date (date) – Start date for billing insights in YYYY-MM-DD format. Required.

  • end_date (date) – End date for billing insights in YYYY-MM-DD format. Must be within 31 days of start_date. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "current_page": 0,  # Current page number. Required.
    "data_points": [
        {
            "description": "str",  # Optional. Description of the billed
              resource or service as shown on an invoice item.
            "group_description": "str",  # Optional. Optional invoice
              item group name of the billed resource or service, blank when not part an
              invoice item group.
            "region": "str",  # Optional. Region where the usage
              occurred.
            "sku": "str",  # Optional. Unique SKU identifier for the
              billed resource.
            "start_date": "2020-02-20",  # Optional. Start date of the
              billing data point in YYYY-MM-DD format.
            "total_amount": "str",  # Optional. Total amount for this
              data point in USD.
            "usage_team_urn": "str"  # Optional. URN of the team that
              incurred the usage.
        }
    ],
    "total_items": 0,  # Total number of items available across all pages.
      Required.
    "total_pages": 0  # Total number of pages available. Required.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ByoipPrefixesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s byoip_prefixes attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a BYOIP Prefix.

To create a BYOIP prefix, send a POST request to /v2/byoip_prefixes.

A successful request will initiate the process of bringing your BYOIP Prefix into your account. The response will include the details of the created prefix, including its UUID and status.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "prefix": "str",  # The IP prefix in CIDR notation to bring. Required.
    "region": "str",  # The region where the prefix will be created. Required.
    "signature": "str"  # The signature hash for the prefix creation request.
      Required.
}

# response body for status code(s): 202
response == {
    "region": "str",  # Optional. The region where the prefix is created.
    "status": "str",  # Optional. The status of the BYOIP prefix.
    "uuid": "str"  # Optional. The unique identifier for the BYOIP prefix.
}
# response body for status code(s): 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(byoip_prefix_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a BYOIP Prefix.

To delete a BYOIP prefix and remove it from your account, send a DELETE request to /v2/byoip_prefixes/$byoip_prefix_uuid.

A successful request will receive a 202 status code with no body in response. This indicates that the request was accepted and the prefix is being deleted.

Parameters:

byoip_prefix_uuid (str) – The unique identifier for the BYOIP Prefix. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(byoip_prefix_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get a BYOIP Prefix.

To get a BYOIP prefix, send a GET request to /v2/byoip_prefixes/$byoip_prefix_uuid.

A successful response will return the details of the specified BYOIP prefix.

Parameters:

byoip_prefix_uuid (str) – The unique identifier for the BYOIP Prefix. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "byoip_prefix": {
        "advertised": bool,  # Optional. Whether the BYOIP prefix is being
          advertised.
        "failure_reason": "str",  # Optional. Reason for failure, if
          applicable.
        "locked": bool,  # Optional. Whether the BYOIP prefix is locked.
        "name": "str",  # Optional. Name of the BYOIP prefix.
        "prefix": "str",  # Optional. The IP prefix in CIDR notation.
        "project_id": "str",  # Optional. The ID of the project associated
          with the BYOIP prefix.
        "region": "str",  # Optional. Region where the BYOIP prefix is
          located.
        "status": "str",  # Optional. Status of the BYOIP prefix.
        "uuid": "str",  # Optional. Unique identifier for the BYOIP prefix.
        "validations": [
            {
                "name": "str",  # Optional. Name of the validation.
                "note": "str",  # Optional. Additional notes or
                  details about the validation.
                "status": "str"  # Optional. Status of the
                  validation.
            }
        ]
    }
}
# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List BYOIP Prefixes.

To list all BYOIP prefixes, send a GET request to /v2/byoip_prefixes. A successful response will return a list of all BYOIP prefixes associated with the account.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "byoip_prefixes": [
        {
            "advertised": bool,  # Optional. Whether the BYOIP prefix is
              being advertised.
            "failure_reason": "str",  # Optional. Reason for failure, if
              applicable.
            "locked": bool,  # Optional. Whether the BYOIP prefix is
              locked.
            "name": "str",  # Optional. Name of the BYOIP prefix.
            "prefix": "str",  # Optional. The IP prefix in CIDR notation.
            "project_id": "str",  # Optional. The ID of the project
              associated with the BYOIP prefix.
            "region": "str",  # Optional. Region where the BYOIP prefix
              is located.
            "status": "str",  # Optional. Status of the BYOIP prefix.
            "uuid": "str",  # Optional. Unique identifier for the BYOIP
              prefix.
            "validations": [
                {
                    "name": "str",  # Optional. Name of the
                      validation.
                    "note": "str",  # Optional. Additional notes
                      or details about the validation.
                    "status": "str"  # Optional. Status of the
                      validation.
                }
            ]
        }
    ],
    "links": {
        "pages": {}
    }
}
list_resources(byoip_prefix_uuid: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List BYOIP Prefix Resources.

To list resources associated with BYOIP prefixes, send a GET request to /v2/byoip_prefixes/{byoip_prefix_uuid}/ips.

A successful response will return a list of resources associated with the specified BYOIP prefix.

Parameters:
  • byoip_prefix_uuid (str) – The unique identifier for the BYOIP Prefix. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "ips": [
        {
            "assigned_at": "2020-02-20 00:00:00",  # Optional. Time when
              the allocation was assigned.
            "byoip": "str",  # Optional. The BYOIP prefix UUID.
            "id": 0,  # Optional. Unique identifier for the allocation.
            "region": "str",  # Optional. Region where the allocation is
              made.
            "resource": "str"  # Optional. The resource associated with
              the allocation.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch(byoip_prefix_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(byoip_prefix_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a BYOIP Prefix.

To update a BYOIP prefix, send a PATCH request to /v2/byoip_prefixes/$byoip_prefix_uuid.

Currently, you can update the advertisement status of the prefix. The response will include the updated details of the prefix.

Parameters:
  • byoip_prefix_uuid (str) – A unique identifier for a BYOIP prefix. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "advertise": bool  # Optional. Whether the BYOIP prefix should be advertised.
}

# response body for status code(s): 202
response == {
    "byoip_prefix": {
        "advertised": bool,  # Optional. Whether the BYOIP prefix is being
          advertised.
        "failure_reason": "str",  # Optional. Reason for failure, if
          applicable.
        "locked": bool,  # Optional. Whether the BYOIP prefix is locked.
        "name": "str",  # Optional. Name of the BYOIP prefix.
        "prefix": "str",  # Optional. The IP prefix in CIDR notation.
        "project_id": "str",  # Optional. The ID of the project associated
          with the BYOIP prefix.
        "region": "str",  # Optional. Region where the BYOIP prefix is
          located.
        "status": "str",  # Optional. Status of the BYOIP prefix.
        "uuid": "str",  # Optional. Unique identifier for the BYOIP prefix.
        "validations": [
            {
                "name": "str",  # Optional. Name of the validation.
                "note": "str",  # Optional. Additional notes or
                  details about the validation.
                "status": "str"  # Optional. Status of the
                  validation.
            }
        ]
    }
}
# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.CdnOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s cdn attribute.

create_endpoint(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_endpoint(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New CDN Endpoint.

To create a new CDN endpoint, send a POST request to /v2/cdn/endpoints. The origin attribute must be set to the fully qualified domain name (FQDN) of a DigitalOcean Space. Optionally, the TTL may be configured by setting the ttl attribute.

A custom subdomain may be configured by specifying the custom_domain and certificate_id attributes.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "origin": "str",  # The fully qualified domain name (FQDN) for the origin
      server which provides the content for the CDN. This is currently restricted to a
      Space. Required.
    "certificate_id": "str",  # Optional. The ID of a DigitalOcean managed TLS
      certificate used for SSL when a custom subdomain is provided.
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the CDN endpoint was
      created.
    "custom_domain": "str",  # Optional. The fully qualified domain name (FQDN)
      of the custom subdomain used with the CDN endpoint.
    "endpoint": "str",  # Optional. The fully qualified domain name (FQDN) from
      which the CDN-backed content is served.
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a CDN endpoint.
    "ttl": 3600  # Optional. Default value is 3600. The amount of time the
      content is cached by the CDN's edge servers in seconds. TTL must be one of 60,
      600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. Known
      values are: 60, 600, 3600, 86400, and 604800.
}

# response body for status code(s): 201
response == {
    "endpoint": {
        "origin": "str",  # The fully qualified domain name (FQDN) for the
          origin server which provides the content for the CDN. This is currently
          restricted to a Space. Required.
        "certificate_id": "str",  # Optional. The ID of a DigitalOcean
          managed TLS certificate used for SSL when a custom subdomain is provided.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the CDN
          endpoint was created.
        "custom_domain": "str",  # Optional. The fully qualified domain name
          (FQDN) of the custom subdomain used with the CDN endpoint.
        "endpoint": "str",  # Optional. The fully qualified domain name
          (FQDN) from which the CDN-backed content is served.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a CDN endpoint.
        "ttl": 3600  # Optional. Default value is 3600. The amount of time
          the content is cached by the CDN's edge servers in seconds. TTL must be one
          of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when
          excluded. Known values are: 60, 600, 3600, 86400, and 604800.
    }
}
delete_endpoint(cdn_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a CDN Endpoint.

To delete a specific CDN endpoint, send a DELETE request to /v2/cdn/endpoints/$ENDPOINT_ID.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:

cdn_id (str) – A unique identifier for a CDN endpoint. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_endpoint(cdn_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing CDN Endpoint.

To show information about an existing CDN endpoint, send a GET request to /v2/cdn/endpoints/$ENDPOINT_ID.

Parameters:

cdn_id (str) – A unique identifier for a CDN endpoint. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "endpoint": {
        "origin": "str",  # The fully qualified domain name (FQDN) for the
          origin server which provides the content for the CDN. This is currently
          restricted to a Space. Required.
        "certificate_id": "str",  # Optional. The ID of a DigitalOcean
          managed TLS certificate used for SSL when a custom subdomain is provided.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the CDN
          endpoint was created.
        "custom_domain": "str",  # Optional. The fully qualified domain name
          (FQDN) of the custom subdomain used with the CDN endpoint.
        "endpoint": "str",  # Optional. The fully qualified domain name
          (FQDN) from which the CDN-backed content is served.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a CDN endpoint.
        "ttl": 3600  # Optional. Default value is 3600. The amount of time
          the content is cached by the CDN's edge servers in seconds. TTL must be one
          of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when
          excluded. Known values are: 60, 600, 3600, 86400, and 604800.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_endpoints(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All CDN Endpoints.

To list all of the CDN endpoints available on your account, send a GET request to /v2/cdn/endpoints.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "endpoints": [
        {
            "origin": "str",  # The fully qualified domain name (FQDN)
              for the origin server which provides the content for the CDN. This is
              currently restricted to a Space. Required.
            "certificate_id": "str",  # Optional. The ID of a
              DigitalOcean managed TLS certificate used for SSL when a custom subdomain
              is provided.
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the CDN endpoint was created.
            "custom_domain": "str",  # Optional. The fully qualified
              domain name (FQDN) of the custom subdomain used with the CDN endpoint.
            "endpoint": "str",  # Optional. The fully qualified domain
              name (FQDN) from which the CDN-backed content is served.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a CDN endpoint.
            "ttl": 3600  # Optional. Default value is 3600. The amount of
              time the content is cached by the CDN's edge servers in seconds. TTL must
              be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour)
              when excluded. Known values are: 60, 600, 3600, 86400, and 604800.
        }
    ],
    "links": {
        "pages": {}
    }
}
purge_cache(cdn_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
purge_cache(cdn_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Purge the Cache for an Existing CDN Endpoint.

To purge cached content from a CDN endpoint, send a DELETE request to /v2/cdn/endpoints/$ENDPOINT_ID/cache. The body of the request should include a files attribute containing a list of cached file paths to be purged. A path may be for a single file or may contain a wildcard (*) to recursively purge all files under a directory. When only a wildcard is provided, all cached files will be purged. There is a rate limit of 50 files per 20 seconds that can be purged. CDN endpoints have a rate limit of 5 requests per 10 seconds. Purging files using a wildcard path counts as a single request against the API’s rate limit. Two identical purge requests cannot be sent at the same time.

Parameters:
  • cdn_id (str) – A unique identifier for a CDN endpoint. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "files": [
        "str"  # An array of strings containing the path to the content to be
          purged from the CDN cache. Required.
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_endpoints(cdn_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_endpoints(cdn_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a CDN Endpoint.

To update the TTL, certificate ID, or the FQDN of the custom subdomain for an existing CDN endpoint, send a PUT request to /v2/cdn/endpoints/$ENDPOINT_ID.

Parameters:
  • cdn_id (str) – A unique identifier for a CDN endpoint. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "certificate_id": "str",  # Optional. The ID of a DigitalOcean managed TLS
      certificate used for SSL when a custom subdomain is provided.
    "custom_domain": "str",  # Optional. The fully qualified domain name (FQDN)
      of the custom subdomain used with the CDN endpoint.
    "ttl": 3600  # Optional. Default value is 3600. The amount of time the
      content is cached by the CDN's edge servers in seconds. TTL must be one of 60,
      600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. Known
      values are: 60, 600, 3600, 86400, and 604800.
}

# response body for status code(s): 200
response == {
    "endpoint": {
        "origin": "str",  # The fully qualified domain name (FQDN) for the
          origin server which provides the content for the CDN. This is currently
          restricted to a Space. Required.
        "certificate_id": "str",  # Optional. The ID of a DigitalOcean
          managed TLS certificate used for SSL when a custom subdomain is provided.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the CDN
          endpoint was created.
        "custom_domain": "str",  # Optional. The fully qualified domain name
          (FQDN) of the custom subdomain used with the CDN endpoint.
        "endpoint": "str",  # Optional. The fully qualified domain name
          (FQDN) from which the CDN-backed content is served.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a CDN endpoint.
        "ttl": 3600  # Optional. Default value is 3600. The amount of time
          the content is cached by the CDN's edge servers in seconds. TTL must be one
          of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when
          excluded. Known values are: 60, 600, 3600, 86400, and 604800.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.CertificatesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s certificates attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Certificate.

To upload new SSL certificate which you have previously generated, send a POST request to /v2/certificates.

When uploading a user-generated certificate, the private_key, leaf_certificate, and optionally the certificate_chain attributes should be provided. The type must be set to custom.

When using Let’s Encrypt to create a certificate, the dns_names attribute must be provided, and the type must be set to lets_encrypt.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "certificate": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the certificate
          was created.
        "dns_names": [
            "str"  # Optional. An array of fully qualified domain names
              (FQDNs) for which the certificate was issued.
        ],
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a certificate.
        "name": "str",  # Optional. A unique human-readable name referring to
          a certificate.
        "not_after": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents the certificate's
          expiration date.
        "sha1_fingerprint": "str",  # Optional. A unique identifier generated
          from the SHA-1 fingerprint of the certificate.
        "state": "str",  # Optional. A string representing the current state
          of the certificate. It may be ``pending``"" , ``verified``"" , or ``error``.
          Known values are: "pending", "verified", and "error".
        "type": "str"  # Optional. A string representing the type of the
          certificate. The value will be ``custom`` for a user-uploaded certificate or
          ``lets_encrypt`` for one automatically generated with Let's Encrypt. Known
          values are: "custom" and "lets_encrypt".
    }
}
delete(certificate_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Certificate.

To delete a specific certificate, send a DELETE request to /v2/certificates/$CERTIFICATE_ID.

Parameters:

certificate_id (str) – A unique identifier for a certificate. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(certificate_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Certificate.

To show information about an existing certificate, send a GET request to /v2/certificates/$CERTIFICATE_ID.

Parameters:

certificate_id (str) – A unique identifier for a certificate. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "certificate": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the certificate
          was created.
        "dns_names": [
            "str"  # Optional. An array of fully qualified domain names
              (FQDNs) for which the certificate was issued.
        ],
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a certificate.
        "name": "str",  # Optional. A unique human-readable name referring to
          a certificate.
        "not_after": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents the certificate's
          expiration date.
        "sha1_fingerprint": "str",  # Optional. A unique identifier generated
          from the SHA-1 fingerprint of the certificate.
        "state": "str",  # Optional. A string representing the current state
          of the certificate. It may be ``pending``"" , ``verified``"" , or ``error``.
          Known values are: "pending", "verified", and "error".
        "type": "str"  # Optional. A string representing the type of the
          certificate. The value will be ``custom`` for a user-uploaded certificate or
          ``lets_encrypt`` for one automatically generated with Let's Encrypt. Known
          values are: "custom" and "lets_encrypt".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, name: str = '', **kwargs: Any) MutableMapping[str, Any]

List All Certificates.

To list all of the certificates available on your account, send a GET request to /v2/certificates.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • name (str) – Name of expected certificate. Default value is “”.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "certificates": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the certificate was created.
            "dns_names": [
                "str"  # Optional. An array of fully qualified domain
                  names (FQDNs) for which the certificate was issued.
            ],
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a certificate.
            "name": "str",  # Optional. A unique human-readable name
              referring to a certificate.
            "not_after": "2020-02-20 00:00:00",  # Optional. A time value
              given in ISO8601 combined date and time format that represents the
              certificate's expiration date.
            "sha1_fingerprint": "str",  # Optional. A unique identifier
              generated from the SHA-1 fingerprint of the certificate.
            "state": "str",  # Optional. A string representing the
              current state of the certificate. It may be ``pending``"" ,
              ``verified``"" , or ``error``. Known values are: "pending", "verified",
              and "error".
            "type": "str"  # Optional. A string representing the type of
              the certificate. The value will be ``custom`` for a user-uploaded
              certificate or ``lets_encrypt`` for one automatically generated with
              Let's Encrypt. Known values are: "custom" and "lets_encrypt".
        }
    ],
    "links": {
        "pages": {}
    }
}
class pydo.operations.DatabasesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s databases attribute.

add(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
add(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Add a New Database.

To add a new database to an existing cluster, send a POST request to /v2/databases/$DATABASE_ID/dbs.

Note: Database management is not supported for Caching or Valkey clusters.

The response will be a JSON object with a key called db. The value of this will be an object that contains the standard attributes associated with a database.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # The name of the database. Required.
}

# response body for status code(s): 201
response == {
    "db": {
        "name": "str"  # The name of the database. Required.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
add_connection_pool(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
add_connection_pool(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Add a New Connection Pool (PostgreSQL).

For PostgreSQL database clusters, connection pools can be used to allow a database to share its idle connections. The popular PostgreSQL connection pooling utility PgBouncer is used to provide this service. See here for more information about how and why to use PgBouncer connection pooling including details about the available transaction modes.

To add a new connection pool to a PostgreSQL database cluster, send a POST request to /v2/databases/$DATABASE_ID/pools specifying a name for the pool, the user to connect with, the database to connect to, as well as its desired size and transaction mode.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "db": "str",  # The database for use with the connection pool. Required.
    "mode": "str",  # The PGBouncer transaction mode for the connection pool. The
      allowed values are session, transaction, and statement. Required.
    "name": "str",  # A unique name for the connection pool. Must be between 3
      and 60 characters. Required.
    "size": 0,  # The desired size of the PGBouncer connection pool. The maximum
      allowed size is determined by the size of the cluster's primary node. 25 backend
      server connections are allowed for every 1GB of RAM. Three are reserved for
      maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of
      22 backend server connections while one with 4 GB would allow for 97. Note that
      these are shared across all connection pools in a cluster. Required.
    "connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "private_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "standby_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "standby_private_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "user": "str"  # Optional. The name of the user for use with the connection
      pool. When excluded, all sessions connect to the database as the inbound user.
}

# response body for status code(s): 201
response == {
    "pool": {
        "db": "str",  # The database for use with the connection pool.
          Required.
        "mode": "str",  # The PGBouncer transaction mode for the connection
          pool. The allowed values are session, transaction, and statement. Required.
        "name": "str",  # A unique name for the connection pool. Must be
          between 3 and 60 characters. Required.
        "size": 0,  # The desired size of the PGBouncer connection pool. The
          maximum allowed size is determined by the size of the cluster's primary node.
          25 backend server connections are allowed for every 1GB of RAM. Three are
          reserved for maintenance. For example, a primary node with 1 GB of RAM allows
          for a maximum of 22 backend server connections while one with 4 GB would
          allow for 97. Note that these are shared across all connection pools in a
          cluster. Required.
        "connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "standby_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "standby_private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "user": "str"  # Optional. The name of the user for use with the
          connection pool. When excluded, all sessions connect to the database as the
          inbound user.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
add_user(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
add_user(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Add a Database User.

To add a new database user, send a POST request to /v2/databases/$DATABASE_ID/users with the desired username.

Note: User management is not supported for Caching or Valkey clusters.

When adding a user to a MySQL cluster, additional options can be configured in the mysql_settings object.

When adding a user to a Kafka cluster, additional options can be configured in the settings object.

When adding a user to a MongoDB cluster, additional options can be configured in

the settings.mongo_user_settings object.

The response will be a JSON object with a key called user. The value of this will be an object that contains the standard attributes associated with a database user including its randomly generated password.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The name of a database user. Required.
    "access_cert": "str",  # Optional. Access certificate for TLS client
      authentication. (Kafka only).
    "access_key": "str",  # Optional. Access key for TLS client authentication.
      (Kafka only).
    "mysql_settings": {
        "auth_plugin": "str"  # A string specifying the authentication method
          to be used for connections to the MySQL user account. The valid values are
          ``mysql_native_password`` or ``caching_sha2_password``. If excluded when
          creating a new user, the default for the version of MySQL in use will be
          used. As of MySQL 8.0, the default is ``caching_sha2_password``. Required.
          Known values are: "mysql_native_password" and "caching_sha2_password".
    },
    "password": "str",  # Optional. A randomly generated password for the
      database user.:code:`<br>`Requires ``database:view_credentials`` scope.
    "readonly": bool,  # Optional. (To be deprecated: use
      settings.mongo_user_settings.role instead for access controls to MongoDB
      databases).  For MongoDB clusters, set to ``true`` to create a read-only user.
      This option is not currently supported for other database engines.
    "role": "str",  # Optional. A string representing the database user's role.
      The value will be either "primary" or "normal". Known values are: "primary" and
      "normal".
    "settings": {
        "acl": [
            {
                "permission": "str",  # Permission set applied to the
                  ACL. 'consume' allows for messages to be consumed from the topic.
                  'produce' allows for messages to be published to the topic.
                  'produceconsume' allows for both 'consume' and 'produce' permission.
                  'admin' allows for 'produceconsume' as well as any operations to
                  administer the topic (delete, update). Required. Known values are:
                  "admin", "consume", "produce", and "produceconsume".
                "topic": "str",  # A regex for matching the topic(s)
                  that this ACL should apply to. Required.
                "id": "str"  # Optional. An identifier for the ACL.
                  Will be computed after the ACL is created/updated.
            }
        ],
        "mongo_user_settings": {
            "databases": [
                "str"  # Optional. A list of databases to which the
                  user should have access. When the database is set to ``admin``"" ,
                  the user will have access to all databases based on the user's role
                  i.e. a user with the role ``readOnly`` assigned to the ``admin``
                  database will have read access to all databases.
            ],
            "role": "str"  # Optional. The role to assign to the user
              with each role mapping to a MongoDB built-in role.  ``readOnly`` maps to
              a `read
              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
              role. ``readWrite`` maps to a `readWrite
              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
              role. ``dbAdmin`` maps to a `dbAdmin
              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
              role. Known values are: "readOnly", "readWrite", and "dbAdmin".
        },
        "opensearch_acl": [
            {
                "index": "str",  # Optional. A regex for matching the
                  indexes that this ACL should apply to.
                "permission": "str"  # Optional. Permission set
                  applied to the ACL. 'read' allows user to read from the index.
                  'write' allows for user to write to the index. 'readwrite' allows for
                  both 'read' and 'write' permission. 'deny'(default) restricts user
                  from performing any operation over an index. 'admin' allows for
                  'readwrite' as well as any operations to administer the index. Known
                  values are: "deny", "admin", "read", "readwrite", and "write".
            }
        ],
        "pg_allow_replication": bool  # Optional. For Postgres clusters, set
          to ``true`` for a user with replication rights. This option is not currently
          supported for other database engines.
    }
}

# response body for status code(s): 201
response == {
    "user": {
        "name": "str",  # The name of a database user. Required.
        "access_cert": "str",  # Optional. Access certificate for TLS client
          authentication. (Kafka only).
        "access_key": "str",  # Optional. Access key for TLS client
          authentication. (Kafka only).
        "mysql_settings": {
            "auth_plugin": "str"  # A string specifying the
              authentication method to be used for connections to the MySQL user
              account. The valid values are ``mysql_native_password`` or
              ``caching_sha2_password``. If excluded when creating a new user, the
              default for the version of MySQL in use will be used. As of MySQL 8.0,
              the default is ``caching_sha2_password``. Required. Known values are:
              "mysql_native_password" and "caching_sha2_password".
        },
        "password": "str",  # Optional. A randomly generated password for the
          database user.:code:`<br>`Requires ``database:view_credentials`` scope.
        "role": "str",  # Optional. A string representing the database user's
          role. The value will be either "primary" or "normal". Known values are:
          "primary" and "normal".
        "settings": {
            "acl": [
                {
                    "permission": "str",  # Permission set
                      applied to the ACL. 'consume' allows for messages to be consumed
                      from the topic. 'produce' allows for messages to be published to
                      the topic. 'produceconsume' allows for both 'consume' and
                      'produce' permission. 'admin' allows for 'produceconsume' as well
                      as any operations to administer the topic (delete, update).
                      Required. Known values are: "admin", "consume", "produce", and
                      "produceconsume".
                    "topic": "str",  # A regex for matching the
                      topic(s) that this ACL should apply to. Required.
                    "id": "str"  # Optional. An identifier for
                      the ACL. Will be computed after the ACL is created/updated.
                }
            ],
            "mongo_user_settings": {
                "databases": [
                    "str"  # Optional. A list of databases to
                      which the user should have access. When the database is set to
                      ``admin``"" , the user will have access to all databases based on
                      the user's role i.e. a user with the role ``readOnly`` assigned
                      to the ``admin`` database will have read access to all databases.
                ],
                "role": "str"  # Optional. The role to assign to the
                  user with each role mapping to a MongoDB built-in role.  ``readOnly``
                  maps to a `read
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                  role. ``readWrite`` maps to a `readWrite
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                  role. ``dbAdmin`` maps to a `dbAdmin
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                  role. Known values are: "readOnly", "readWrite", and "dbAdmin".
            },
            "opensearch_acl": [
                {
                    "index": "str",  # Optional. A regex for
                      matching the indexes that this ACL should apply to.
                    "permission": "str"  # Optional. Permission
                      set applied to the ACL. 'read' allows user to read from the
                      index. 'write' allows for user to write to the index. 'readwrite'
                      allows for both 'read' and 'write' permission. 'deny'(default)
                      restricts user from performing any operation over an index.
                      'admin' allows for 'readwrite' as well as any operations to
                      administer the index. Known values are: "deny", "admin", "read",
                      "readwrite", and "write".
                }
            ],
            "pg_allow_replication": bool  # Optional. For Postgres
              clusters, set to ``true`` for a user with replication rights. This option
              is not currently supported for other database engines.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_cluster(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_cluster(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Database Cluster.

To create a database cluster, send a POST request to /v2/databases. To see a list of options for each engine, such as available regions, size slugs, and versions, send a GET request to the /v2/databases/options endpoint. The available sizes for the storage_size_mib field depends on the cluster’s size. To see a list of available sizes, see Managed Database Pricing.

The create response returns a JSON object with a key called database. The value of this is an object that contains the standard attributes associated with a database cluster. The initial value of the database cluster’s status attribute is creating. When the cluster is ready to receive traffic, this changes to online.

The embedded connection and private_connection objects contains the information needed to access the database cluster. For multi-node clusters, the standby_connection and standby_private_connection objects contain the information needed to connect to the cluster’s standby node(s).

DigitalOcean managed PostgreSQL and MySQL database clusters take automated daily backups. To create a new database cluster based on a backup of an existing cluster, send a POST request to /v2/databases. In addition to the standard database cluster attributes, the JSON body must include a key named backup_restore with the name of the original database cluster and the timestamp of the backup to be restored. Creating a database from a backup is the same as forking a database in the control panel.

PostgreSQL and MySQL Advanced Edition clusters can be provisioned by setting engine to advanced_pg or advanced_mysql. Advanced Edition clusters are currently in public preview and target highly available workloads. advanced_pg supports 1-, 2-, and 3-node deployments; advanced_mysql only supports 1- and 3-node deployments. See the PostgreSQL Advanced Edition and MySQL Advanced Edition documentation for the feature differences vs. Standard Edition and current preview limitations.

Note: Caching cluster creates are no longer supported as of 2025-04-30T00:00:00Z. Backups are also not supported for Caching or Valkey clusters.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "engine": "str",  # A slug representing the database engine used for the
      cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis"
      for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for
      OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced Edition,
      and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition engines are
      currently in public preview. Required. Known values are: "pg", "mysql", "redis",
      "valkey", "mongodb", "kafka", "opensearch", "advanced_pg", and "advanced_mysql".
    "name": "str",  # A unique, human-readable name referring to a database
      cluster. Required.
    "num_nodes": 0,  # The number of nodes in the database cluster. Required.
    "region": "str",  # The slug identifier for the region where the database
      cluster is located. Required.
    "size": "str",  # The slug identifier representing the size of the nodes in
      the database cluster. Required.
    "autoscale": {
        "storage": {
            "enabled": bool,  # Whether storage autoscaling is enabled
              for the cluster. Required.
            "increment_gib": 0,  # Optional. The amount of additional
              storage to add (in GiB) when autoscaling is triggered.
            "threshold_percent": 0  # Optional. The storage usage
              threshold percentage that triggers autoscaling. When storage usage
              exceeds this percentage, additional storage will be added automatically.
        }
    },
    "backup_restore": {
        "database_name": "str",  # The name of an existing database cluster
          from which the backup will be restored. Required.
        "backup_created_at": "2020-02-20 00:00:00"  # Optional. The timestamp
          of an existing database cluster backup in ISO8601 combined date and time
          format. The most recent backup will be used if excluded.
    },
    "connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the database cluster
      was created.
    "db_names": [
        "str"  # Optional. An array of strings containing the names of
          databases created in the database cluster.
    ],
    "do_settings": {
        "service_cnames": [
            "str"  # Optional. An array of custom CNAMEs for the database
              cluster. Each CNAME must be a valid RFC 1123 hostname (e.g.,
              "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253
              characters.
        ]
    },
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a database cluster.
    "maintenance_window": {
        "day": "str",  # The day of the week on which to apply maintenance
          updates. Required.
        "hour": "str",  # The hour in UTC at which maintenance updates will
          be applied in 24 hour format. Required.
        "description": [
            "str"  # Optional. A list of strings, each containing
              information about a pending maintenance update.
        ],
        "pending": bool  # Optional. A boolean value indicating whether any
          maintenance is scheduled to be performed in the next window.
    },
    "metrics_endpoints": [
        {
            "host": "str",  # Optional. A FQDN pointing to the database
              cluster's node(s).
            "port": 0  # Optional. The port on which a service is
              listening.
        }
    ],
    "private_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "private_network_uuid": "str",  # Optional. A string specifying the UUID of
      the VPC to which the database cluster will be assigned. If excluded, the cluster
      when creating a new database cluster, it will be assigned to your account's
      default VPC for the region. :code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
    "project_id": "str",  # Optional. The ID of the project that the database
      cluster is assigned to. If excluded when creating a new database cluster, it will
      be assigned to your default project.:code:`<br>`:code:`<br>`Requires
      ``project:update`` scope.
    "rules": [
        {
            "type": "str",  # The type of resource that the firewall rule
              allows to access the database cluster. Required. Known values are:
              "droplet", "k8s", "ip_addr", "tag", and "app".
            "value": "str",  # The ID of the specific resource, the name
              of a tag applied to a group of resources, or the IP address that the
              firewall rule allows to access the database cluster. Required.
            "cluster_uuid": "str",  # Optional. A unique ID for the
              database cluster to which the rule is applied.
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the firewall rule was created.
            "description": "str",  # Optional. A human-readable
              description of the rule.
            "uuid": "str"  # Optional. A unique ID for the firewall rule
              itself.
        }
    ],
    "schema_registry_connection": {
        "host": "str",  # Optional. The FQDN pointing to the schema registry
          connection uri.
        "password": "str",  # Optional. The randomly generated password for
          the schema registry.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the schema registry is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. This is provided as a convenience and
          should be able to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the schema
          registry.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "semantic_version": "str",  # Optional. A string representing the semantic
      version of the database engine in use for the cluster.
    "standby_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "standby_private_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "status": "str",  # Optional. A string representing the current status of the
      database cluster. Known values are: "creating", "online", "resizing",
      "migrating", and "forking".
    "storage_size_mib": 0,  # Optional. Additional storage added to the cluster,
      in MiB. If null, no additional storage is added to the cluster, beyond what is
      provided as a base amount from the 'size' and any previously added additional
      storage.
    "tags": [
        "str"  # Optional. An array of tags (as strings) to apply to the
          database cluster. :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
    ],
    "ui_connection": {
        "host": "str",  # Optional. The FQDN pointing to the opensearch
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the opensearch dashboard is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. This is provided as a convenience and
          should be able to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the opensearch
          dashboard.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "users": [
        {
            "name": "str",  # The name of a database user. Required.
            "access_cert": "str",  # Optional. Access certificate for TLS
              client authentication. (Kafka only).
            "access_key": "str",  # Optional. Access key for TLS client
              authentication. (Kafka only).
            "mysql_settings": {
                "auth_plugin": "str"  # A string specifying the
                  authentication method to be used for connections to the MySQL user
                  account. The valid values are ``mysql_native_password`` or
                  ``caching_sha2_password``. If excluded when creating a new user, the
                  default for the version of MySQL in use will be used. As of MySQL
                  8.0, the default is ``caching_sha2_password``. Required. Known values
                  are: "mysql_native_password" and "caching_sha2_password".
            },
            "password": "str",  # Optional. A randomly generated password
              for the database user.:code:`<br>`Requires ``database:view_credentials``
              scope.
            "role": "str",  # Optional. A string representing the
              database user's role. The value will be either "primary" or "normal".
              Known values are: "primary" and "normal".
            "settings": {
                "acl": [
                    {
                        "permission": "str",  # Permission
                          set applied to the ACL. 'consume' allows for messages to be
                          consumed from the topic. 'produce' allows for messages to be
                          published to the topic. 'produceconsume' allows for both
                          'consume' and 'produce' permission. 'admin' allows for
                          'produceconsume' as well as any operations to administer the
                          topic (delete, update). Required. Known values are: "admin",
                          "consume", "produce", and "produceconsume".
                        "topic": "str",  # A regex for
                          matching the topic(s) that this ACL should apply to.
                          Required.
                        "id": "str"  # Optional. An
                          identifier for the ACL. Will be computed after the ACL is
                          created/updated.
                    }
                ],
                "mongo_user_settings": {
                    "databases": [
                        "str"  # Optional. A list of
                          databases to which the user should have access. When the
                          database is set to ``admin``"" , the user will have access to
                          all databases based on the user's role i.e. a user with the
                          role ``readOnly`` assigned to the ``admin`` database will
                          have read access to all databases.
                    ],
                    "role": "str"  # Optional. The role to assign
                      to the user with each role mapping to a MongoDB built-in role.
                      ``readOnly`` maps to a `read
                      <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                      role. ``readWrite`` maps to a `readWrite
                      <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                      role. ``dbAdmin`` maps to a `dbAdmin
                      <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                      role. Known values are: "readOnly", "readWrite", and "dbAdmin".
                },
                "opensearch_acl": [
                    {
                        "index": "str",  # Optional. A regex
                          for matching the indexes that this ACL should apply to.
                        "permission": "str"  # Optional.
                          Permission set applied to the ACL. 'read' allows user to read
                          from the index. 'write' allows for user to write to the
                          index. 'readwrite' allows for both 'read' and 'write'
                          permission. 'deny'(default) restricts user from performing
                          any operation over an index. 'admin' allows for 'readwrite'
                          as well as any operations to administer the index. Known
                          values are: "deny", "admin", "read", "readwrite", and
                          "write".
                    }
                ],
                "pg_allow_replication": bool  # Optional. For
                  Postgres clusters, set to ``true`` for a user with replication
                  rights. This option is not currently supported for other database
                  engines.
            }
        }
    ],
    "version": "str",  # Optional. A string representing the version of the
      database engine in use for the cluster.
    "version_end_of_availability": "str",  # Optional. A timestamp referring to
      the date when the particular version will no longer be available for creating new
      clusters. If null, the version does not have an end of availability timeline.
    "version_end_of_life": "str"  # Optional. A timestamp referring to the date
      when the particular version will no longer be supported. If null, the version
      does not have an end of life timeline.
}

# response body for status code(s): 201
response == {
    "database": {
        "engine": "str",  # A slug representing the database engine used for
          the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL,
          "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch"
          for OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced
          Edition, and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition
          engines are currently in public preview. Required. Known values are: "pg",
          "mysql", "redis", "valkey", "mongodb", "kafka", "opensearch", "advanced_pg",
          and "advanced_mysql".
        "name": "str",  # A unique, human-readable name referring to a
          database cluster. Required.
        "num_nodes": 0,  # The number of nodes in the database cluster.
          Required.
        "region": "str",  # The slug identifier for the region where the
          database cluster is located. Required.
        "size": "str",  # The slug identifier representing the size of the
          nodes in the database cluster. Required.
        "connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the database
          cluster was created.
        "db_names": [
            "str"  # Optional. An array of strings containing the names
              of databases created in the database cluster.
        ],
        "do_settings": {
            "service_cnames": [
                "str"  # Optional. An array of custom CNAMEs for the
                  database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g.,
                  "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253
                  characters.
            ]
        },
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a database cluster.
        "maintenance_window": {
            "day": "str",  # The day of the week on which to apply
              maintenance updates. Required.
            "hour": "str",  # The hour in UTC at which maintenance
              updates will be applied in 24 hour format. Required.
            "description": [
                "str"  # Optional. A list of strings, each containing
                  information about a pending maintenance update.
            ],
            "pending": bool  # Optional. A boolean value indicating
              whether any maintenance is scheduled to be performed in the next window.
        },
        "metrics_endpoints": [
            {
                "host": "str",  # Optional. A FQDN pointing to the
                  database cluster's node(s).
                "port": 0  # Optional. The port on which a service is
                  listening.
            }
        ],
        "private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "private_network_uuid": "str",  # Optional. A string specifying the
          UUID of the VPC to which the database cluster will be assigned. If excluded,
          the cluster when creating a new database cluster, it will be assigned to your
          account's default VPC for the region. :code:`<br>`:code:`<br>`Requires
          ``vpc:read`` scope.
        "project_id": "str",  # Optional. The ID of the project that the
          database cluster is assigned to. If excluded when creating a new database
          cluster, it will be assigned to your default
          project.:code:`<br>`:code:`<br>`Requires ``project:read`` scope.
        "rules": [
            {
                "type": "str",  # The type of resource that the
                  firewall rule allows to access the database cluster. Required. Known
                  values are: "droplet", "k8s", "ip_addr", "tag", and "app".
                "value": "str",  # The ID of the specific resource,
                  the name of a tag applied to a group of resources, or the IP address
                  that the firewall rule allows to access the database cluster.
                  Required.
                "cluster_uuid": "str",  # Optional. A unique ID for
                  the database cluster to which the rule is applied.
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the firewall rule was created.
                "description": "str",  # Optional. A human-readable
                  description of the rule.
                "uuid": "str"  # Optional. A unique ID for the
                  firewall rule itself.
            }
        ],
        "schema_registry_connection": {
            "host": "str",  # Optional. The FQDN pointing to the schema
              registry connection uri.
            "password": "str",  # Optional. The randomly generated
              password for the schema registry.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the schema registry
              is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. This is provided as a convenience
              and should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the schema
              registry.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "semantic_version": "str",  # Optional. A string representing the
          semantic version of the database engine in use for the cluster.
        "standby_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "standby_private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "status": "str",  # Optional. A string representing the current
          status of the database cluster. Known values are: "creating", "online",
          "resizing", "migrating", and "forking".
        "storage_size_mib": 0,  # Optional. Additional storage added to the
          cluster, in MiB. If null, no additional storage is added to the cluster,
          beyond what is provided as a base amount from the 'size' and any previously
          added additional storage.
        "tags": [
            "str"  # Optional. An array of tags that have been applied to
              the database cluster. :code:`<br>`:code:`<br>`Requires ``tag:read``
              scope.
        ],
        "ui_connection": {
            "host": "str",  # Optional. The FQDN pointing to the
              opensearch cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the opensearch
              dashboard is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. This is provided as a convenience
              and should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              opensearch dashboard.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
        },
        "users": [
            {
                "name": "str",  # The name of a database user.
                  Required.
                "access_cert": "str",  # Optional. Access certificate
                  for TLS client authentication. (Kafka only).
                "access_key": "str",  # Optional. Access key for TLS
                  client authentication. (Kafka only).
                "mysql_settings": {
                    "auth_plugin": "str"  # A string specifying
                      the authentication method to be used for connections to the MySQL
                      user account. The valid values are ``mysql_native_password`` or
                      ``caching_sha2_password``. If excluded when creating a new user,
                      the default for the version of MySQL in use will be used. As of
                      MySQL 8.0, the default is ``caching_sha2_password``. Required.
                      Known values are: "mysql_native_password" and
                      "caching_sha2_password".
                },
                "password": "str",  # Optional. A randomly generated
                  password for the database user.:code:`<br>`Requires
                  ``database:view_credentials`` scope.
                "role": "str",  # Optional. A string representing the
                  database user's role. The value will be either "primary" or "normal".
                  Known values are: "primary" and "normal".
                "settings": {
                    "acl": [
                        {
                            "permission": "str",  #
                              Permission set applied to the ACL. 'consume' allows for
                              messages to be consumed from the topic. 'produce' allows
                              for messages to be published to the topic.
                              'produceconsume' allows for both 'consume' and 'produce'
                              permission. 'admin' allows for 'produceconsume' as well
                              as any operations to administer the topic (delete,
                              update). Required. Known values are: "admin", "consume",
                              "produce", and "produceconsume".
                            "topic": "str",  # A regex
                              for matching the topic(s) that this ACL should apply to.
                              Required.
                            "id": "str"  # Optional. An
                              identifier for the ACL. Will be computed after the ACL is
                              created/updated.
                        }
                    ],
                    "mongo_user_settings": {
                        "databases": [
                            "str"  # Optional. A list of
                              databases to which the user should have access. When the
                              database is set to ``admin``"" , the user will have
                              access to all databases based on the user's role i.e. a
                              user with the role ``readOnly`` assigned to the ``admin``
                              database will have read access to all databases.
                        ],
                        "role": "str"  # Optional. The role
                          to assign to the user with each role mapping to a MongoDB
                          built-in role.  ``readOnly`` maps to a `read
                          <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                          role. ``readWrite`` maps to a `readWrite
                          <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                          role. ``dbAdmin`` maps to a `dbAdmin
                          <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                          role. Known values are: "readOnly", "readWrite", and
                          "dbAdmin".
                    },
                    "opensearch_acl": [
                        {
                            "index": "str",  # Optional.
                              A regex for matching the indexes that this ACL should
                              apply to.
                            "permission": "str"  #
                              Optional. Permission set applied to the ACL. 'read'
                              allows user to read from the index. 'write' allows for
                              user to write to the index. 'readwrite' allows for both
                              'read' and 'write' permission. 'deny'(default) restricts
                              user from performing any operation over an index. 'admin'
                              allows for 'readwrite' as well as any operations to
                              administer the index. Known values are: "deny", "admin",
                              "read", "readwrite", and "write".
                        }
                    ],
                    "pg_allow_replication": bool  # Optional. For
                      Postgres clusters, set to ``true`` for a user with replication
                      rights. This option is not currently supported for other database
                      engines.
                }
            }
        ],
        "version": "str",  # Optional. A string representing the version of
          the database engine in use for the cluster.
        "version_end_of_availability": "str",  # Optional. A timestamp
          referring to the date when the particular version will no longer be available
          for creating new clusters. If null, the version does not have an end of
          availability timeline.
        "version_end_of_life": "str"  # Optional. A timestamp referring to
          the date when the particular version will no longer be supported. If null,
          the version does not have an end of life timeline.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_kafka_schema(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_kafka_schema(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Schema Registry for Kafka Cluster.

To create a Kafka schema for a database cluster, send a POST request to /v2/databases/$DATABASE_ID/schema-registry.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "schema": "str",  # Optional. The schema definition in the specified format.
    "schema_type": "str",  # Optional. The type of the schema. Known values are:
      "AVRO", "JSON", and "PROTOBUF".
    "subject_name": "str"  # Optional. The name of the schema subject.
}

# response body for status code(s): 201
response == {
    "schema": "str",  # Optional. The schema definition in the specified format.
    "schema_id": 0,  # Optional. The id for schema.
    "schema_type": "str",  # Optional. The type of the schema. Known values are:
      "AVRO", "JSON", and "PROTOBUF".
    "subject_name": "str"  # Optional. The name of the schema subject.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_kafka_topic(database_cluster_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_kafka_topic(database_cluster_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Topic for a Kafka Cluster.

To create a topic attached to a Kafka cluster, send a POST request to /v2/databases/$DATABASE_ID/topics.

The result will be a JSON object with a topic key.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {
        "cleanup_policy": "delete",  # Optional. Default value is "delete".
          The cleanup_policy sets the retention policy to use on log segments. 'delete'
          will discard old segments when retention time/size limits are reached.
          'compact' will enable log compaction, resulting in retention of the latest
          value for each key. Known values are: "delete", "compact", and
          "compact_delete".
        "compression_type": "producer",  # Optional. Default value is
          "producer". The compression_type specifies the compression type of the topic.
          Known values are: "producer", "gzip", "snappy", "Iz4", "zstd", and
          "uncompressed".
        "delete_retention_ms": 86400000,  # Optional. Default value is
          86400000. The delete_retention_ms specifies how long (in ms) to retain delete
          tombstone markers for topics.
        "file_delete_delay_ms": 60000,  # Optional. Default value is 60000.
          The file_delete_delay_ms specifies the time (in ms) to wait before deleting a
          file from the filesystem.
        "flush_messages": 9223372036854776000,  # Optional. Default value is
          9223372036854776000. The flush_messages specifies the number of messages to
          accumulate on a log partition before messages are flushed to disk.
        "flush_ms": 9223372036854776000,  # Optional. Default value is
          9223372036854776000. The flush_ms specifies the maximum time (in ms) that a
          message is kept in memory before being flushed to disk.
        "index_interval_bytes": 4096,  # Optional. Default value is 4096. The
          index_interval_bytes specifies the number of bytes between entries being
          added into te offset index.
        "max_compaction_lag_ms": 9223372036854776000,  # Optional. Default
          value is 9223372036854776000. The max_compaction_lag_ms specifies the maximum
          amount of time (in ms) that a message will remain uncompacted. This is only
          applicable if the logs are have compaction enabled.
        "max_message_bytes": 1048588,  # Optional. Default value is 1048588.
          The max_messages_bytes specifies the largest record batch size (in bytes)
          that can be sent to the server.  This is calculated after compression if
          compression is enabled.
        "message_down_conversion_enable": True,  # Optional. Default value is
          True. The message_down_conversion_enable specifies whether down-conversion of
          message formats is enabled to satisfy consumer requests. When 'false', the
          broker will not perform conversion for consumers expecting older message
          formats. The broker will respond with an ``UNSUPPORTED_VERSION`` error for
          consume requests from these older clients.
        "message_format_version": "3.0-IV1",  # Optional. Default value is
          "3.0-IV1". The message_format_version specifies the message format version
          used by the broker to append messages to the logs. The value of this setting
          is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By
          setting a  particular message format version, all existing messages on disk
          must be smaller or equal to the specified version. Known values are: "0.8.0",
          "0.8.1", "0.8.2", "0.9.0", "0.10.0-IV0", "0.10.0-IV1", "0.10.1-IV0",
          "0.10.1-IV1", "0.10.1-IV2", "0.10.2-IV0", "0.11.0-IV0", "0.11.0-IV1",
          "0.11.0-IV2", "1.0-IV0", "1.1-IV0", "2.0-IV0", "2.0-IV1", "2.1-IV0",
          "2.1-IV1", "2.1-IV2", "2.2-IV0", "2.2-IV1", "2.3-IV0", "2.3-IV1", "2.4-IV0",
          "2.4-IV1", "2.5-IV0", "2.6-IV0", "2.7-IV0", "2.7-IV1", "2.7-IV2", "2.8-IV0",
          "2.8-IV1", "3.0-IV0", "3.0-IV1", "3.1-IV0", "3.2-IV0", "3.3-IV0", "3.3-IV1",
          "3.3-IV2", and "3.3-IV3".
        "message_timestamp_type": "create_time",  # Optional. Default value
          is "create_time". The message_timestamp_type specifies whether to use the
          message create time or log append time as the timestamp on a message. Known
          values are: "create_time" and "log_append_time".
        "min_cleanable_dirty_ratio": 0.5,  # Optional. Default value is 0.5.
          The min_cleanable_dirty_ratio specifies the frequency of log compaction (if
          enabled) in relation to duplicates present in the logs. For example, at 0.5,
          at most 50% of the log could be duplicates before compaction would begin.
        "min_compaction_lag_ms": 0,  # Optional. Default value is 0. The
          min_compaction_lag_ms specifies the minimum time (in ms) that a message will
          remain uncompacted in the log. Only relevant if log compaction is enabled.
        "min_insync_replicas": 1,  # Optional. Default value is 1. The
          min_insync_replicas specifies the number of replicas that must ACK a write
          for the write to be considered successful.
        "preallocate": False,  # Optional. Default value is False. The
          preallocate specifies whether a file should be preallocated on disk when
          creating a new log segment.
        "retention_bytes": -1,  # Optional. Default value is -1. The
          retention_bytes specifies the maximum size of the log (in bytes) before
          deleting messages. -1 indicates that there is no limit.
        "retention_ms": 604800000,  # Optional. Default value is 604800000.
          The retention_ms specifies the maximum amount of time (in ms) to keep a
          message before deleting it.
        "segment_bytes": 209715200,  # Optional. Default value is 209715200.
          The segment_bytes specifies the maximum size of a single log file (in bytes).
        "segment_jitter_ms": 0,  # Optional. Default value is 0. The
          segment_jitter_ms specifies the maximum random jitter subtracted from the
          scheduled segment roll time to avoid thundering herds of segment rolling.
        "segment_ms": 604800000  # Optional. Default value is 604800000. The
          segment_ms specifies the period of time after which the log will be forced to
          roll if the segment file isn't full. This ensures that retention can delete
          or compact old data.
    },
    "name": "str",  # Optional. The name of the Kafka topic.
    "partition_count": 0,  # Optional. The number of partitions available for the
      topic. On update, this value can only be increased.
    "replication_factor": 0  # Optional. The number of nodes to replicate data
      across the cluster.
}

# response body for status code(s): 201
response == {
    "topic": {
        "config": {
            "cleanup_policy": "delete",  # Optional. Default value is
              "delete". The cleanup_policy sets the retention policy to use on log
              segments. 'delete' will discard old segments when retention time/size
              limits are reached. 'compact' will enable log compaction, resulting in
              retention of the latest value for each key. Known values are: "delete",
              "compact", and "compact_delete".
            "compression_type": "producer",  # Optional. Default value is
              "producer". The compression_type specifies the compression type of the
              topic. Known values are: "producer", "gzip", "snappy", "Iz4", "zstd", and
              "uncompressed".
            "delete_retention_ms": 86400000,  # Optional. Default value
              is 86400000. The delete_retention_ms specifies how long (in ms) to retain
              delete tombstone markers for topics.
            "file_delete_delay_ms": 60000,  # Optional. Default value is
              60000. The file_delete_delay_ms specifies the time (in ms) to wait before
              deleting a file from the filesystem.
            "flush_messages": 9223372036854776000,  # Optional. Default
              value is 9223372036854776000. The flush_messages specifies the number of
              messages to accumulate on a log partition before messages are flushed to
              disk.
            "flush_ms": 9223372036854776000,  # Optional. Default value
              is 9223372036854776000. The flush_ms specifies the maximum time (in ms)
              that a message is kept in memory before being flushed to disk.
            "index_interval_bytes": 4096,  # Optional. Default value is
              4096. The index_interval_bytes specifies the number of bytes between
              entries being added into te offset index.
            "max_compaction_lag_ms": 9223372036854776000,  # Optional.
              Default value is 9223372036854776000. The max_compaction_lag_ms specifies
              the maximum amount of time (in ms) that a message will remain
              uncompacted. This is only applicable if the logs are have compaction
              enabled.
            "max_message_bytes": 1048588,  # Optional. Default value is
              1048588. The max_messages_bytes specifies the largest record batch size
              (in bytes) that can be sent to the server.  This is calculated after
              compression if compression is enabled.
            "message_down_conversion_enable": True,  # Optional. Default
              value is True. The message_down_conversion_enable specifies whether
              down-conversion of message formats is enabled to satisfy consumer
              requests. When 'false', the broker will not perform conversion for
              consumers expecting older message formats. The broker will respond with
              an ``UNSUPPORTED_VERSION`` error for consume requests from these older
              clients.
            "message_format_version": "3.0-IV1",  # Optional. Default
              value is "3.0-IV1". The message_format_version specifies the message
              format version used by the broker to append messages to the logs. The
              value of this setting is assumed to be 3.0-IV1 if the broker protocol
              version is 3.0 or higher. By setting a  particular message format
              version, all existing messages on disk must be smaller or equal to the
              specified version. Known values are: "0.8.0", "0.8.1", "0.8.2", "0.9.0",
              "0.10.0-IV0", "0.10.0-IV1", "0.10.1-IV0", "0.10.1-IV1", "0.10.1-IV2",
              "0.10.2-IV0", "0.11.0-IV0", "0.11.0-IV1", "0.11.0-IV2", "1.0-IV0",
              "1.1-IV0", "2.0-IV0", "2.0-IV1", "2.1-IV0", "2.1-IV1", "2.1-IV2",
              "2.2-IV0", "2.2-IV1", "2.3-IV0", "2.3-IV1", "2.4-IV0", "2.4-IV1",
              "2.5-IV0", "2.6-IV0", "2.7-IV0", "2.7-IV1", "2.7-IV2", "2.8-IV0",
              "2.8-IV1", "3.0-IV0", "3.0-IV1", "3.1-IV0", "3.2-IV0", "3.3-IV0",
              "3.3-IV1", "3.3-IV2", and "3.3-IV3".
            "message_timestamp_type": "create_time",  # Optional. Default
              value is "create_time". The message_timestamp_type specifies whether to
              use the message create time or log append time as the timestamp on a
              message. Known values are: "create_time" and "log_append_time".
            "min_cleanable_dirty_ratio": 0.5,  # Optional. Default value
              is 0.5. The min_cleanable_dirty_ratio specifies the frequency of log
              compaction (if enabled) in relation to duplicates present in the logs.
              For example, at 0.5, at most 50% of the log could be duplicates before
              compaction would begin.
            "min_compaction_lag_ms": 0,  # Optional. Default value is 0.
              The min_compaction_lag_ms specifies the minimum time (in ms) that a
              message will remain uncompacted in the log. Only relevant if log
              compaction is enabled.
            "min_insync_replicas": 1,  # Optional. Default value is 1.
              The min_insync_replicas specifies the number of replicas that must ACK a
              write for the write to be considered successful.
            "preallocate": False,  # Optional. Default value is False.
              The preallocate specifies whether a file should be preallocated on disk
              when creating a new log segment.
            "retention_bytes": -1,  # Optional. Default value is -1. The
              retention_bytes specifies the maximum size of the log (in bytes) before
              deleting messages. -1 indicates that there is no limit.
            "retention_ms": 604800000,  # Optional. Default value is
              604800000. The retention_ms specifies the maximum amount of time (in ms)
              to keep a message before deleting it.
            "segment_bytes": 209715200,  # Optional. Default value is
              209715200. The segment_bytes specifies the maximum size of a single log
              file (in bytes).
            "segment_jitter_ms": 0,  # Optional. Default value is 0. The
              segment_jitter_ms specifies the maximum random jitter subtracted from the
              scheduled segment roll time to avoid thundering herds of segment rolling.
            "segment_ms": 604800000  # Optional. Default value is
              604800000. The segment_ms specifies the period of time after which the
              log will be forced to roll if the segment file isn't full. This ensures
              that retention can delete or compact old data.
        },
        "name": "str",  # Optional. The name of the Kafka topic.
        "partitions": [
            {
                "consumer_groups": [
                    {
                        "group_name": "str",  # Optional.
                          Name of the consumer group.
                        "offset": 0  # Optional. The current
                          offset of the consumer group.
                    }
                ],
                "earliest_offset": 0,  # Optional. The earliest
                  consumer offset amongst consumer groups.
                "id": 0,  # Optional. An identifier for the
                  partition.
                "in_sync_replicas": 0,  # Optional. The number of
                  nodes that are in-sync (have the latest data) for the given
                  partition.
                "size": 0  # Optional. Size of the topic partition in
                  bytes.
            }
        ],
        "replication_factor": 0,  # Optional. The number of nodes to
          replicate data across the cluster.
        "state": "str"  # Optional. The state of the Kafka topic. Known
          values are: "active", "configuring", "deleting", and "unknown".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_logsink(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_logsink(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Logsink for a Database Cluster.

To create logsink for a database cluster, send a POST request to /v2/databases/$DATABASE_ID/logsink.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {},
    "sink_name": "str",  # Optional. The name of the Logsink.
    "sink_type": "str"  # Optional. Type of logsink integration.   * Use
      ``datadog`` for Datadog integration **only with MongoDB clusters**. * For
      non-MongoDB clusters, use ``rsyslog`` for general syslog forwarding. * Other
      supported types include ``elasticsearch`` and ``opensearch``.  More details about
      the configuration can be found in the ``config`` property. Known values are:
      "rsyslog", "elasticsearch", "opensearch", and "datadog".
}

# response body for status code(s): 201
response == {
    "sink": {
        "config": {},
        "sink_id": "str",  # Optional. A unique identifier for Logsink.
        "sink_name": "str",  # Optional. The name of the Logsink.
        "sink_type": "str"  # Optional. Known values are: "rsyslog",
          "elasticsearch", and "opensearch".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_replica(database_cluster_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_replica(database_cluster_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Read-only Replica.

To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to /v2/databases/$DATABASE_ID/replicas specifying the name it should be given, the size of the node to be used, and the region where it will be located.

Note: Read-only replicas are not supported for Caching or Valkey clusters.

The response will be a JSON object with a key called replica. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica’s status attribute will be forking. When the replica is ready to receive traffic, this will transition to active.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The name to give the read-only replicating. Required.
    "connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the database cluster
      was created.
    "do_settings": {
        "service_cnames": [
            "str"  # Optional. An array of custom CNAMEs for the database
              cluster. Each CNAME must be a valid RFC 1123 hostname (e.g.,
              "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253
              characters.
        ]
    },
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a database replica.
    "private_connection": {
        "database": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.:code:`<br>`:code:`<br>`Requires
          ``database:view_credentials`` scope.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "ssl": bool,  # Optional. A boolean value indicating if the
          connection should be made over SSL.
        "uri": "str",  # Optional. A connection string in the format accepted
          by the ``psql`` command. This is provided as a convenience and should be able
          to be constructed by the other attributes.
        "user": "str"  # Optional. The default user for the
          database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
          scope.
    },
    "private_network_uuid": "str",  # Optional. A string specifying the UUID of
      the VPC to which the read-only replica will be assigned. If excluded, the replica
      will be assigned to your account's default VPC for the region.
      :code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
    "region": "str",  # Optional. A slug identifier for the region where the
      read-only replica will be located. If excluded, the replica will be placed in the
      same region as the cluster.
    "size": "str",  # Optional. A slug identifier representing the size of the
      node for the read-only replica. The size of the replica must be at least as large
      as the node size for the database cluster from which it is replicating.
    "status": "str",  # Optional. A string representing the current status of the
      database cluster. Known values are: "creating", "online", "resizing",
      "migrating", and "forking".
    "storage_size_mib": 0,  # Optional. Additional storage added to the cluster,
      in MiB. If null, no additional storage is added to the cluster, beyond what is
      provided as a base amount from the 'size' and any previously added additional
      storage.
    "tags": [
        "str"  # Optional. A flat array of tag names as strings to apply to
          the read-only replica after it is created. Tag names can either be existing
          or new tags. :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
    ]
}

# response body for status code(s): 201
response == {
    "replica": {
        "name": "str",  # The name to give the read-only replicating.
          Required.
        "connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the database
          cluster was created.
        "do_settings": {
            "service_cnames": [
                "str"  # Optional. An array of custom CNAMEs for the
                  database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g.,
                  "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253
                  characters.
            ]
        },
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a database replica.
        "private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "private_network_uuid": "str",  # Optional. A string specifying the
          UUID of the VPC to which the read-only replica will be assigned. If excluded,
          the replica will be assigned to your account's default VPC for the region.
          :code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
        "region": "str",  # Optional. A slug identifier for the region where
          the read-only replica will be located. If excluded, the replica will be
          placed in the same region as the cluster.
        "size": "str",  # Optional. A slug identifier representing the size
          of the node for the read-only replica. The size of the replica must be at
          least as large as the node size for the database cluster from which it is
          replicating.
        "status": "str",  # Optional. A string representing the current
          status of the database cluster. Known values are: "creating", "online",
          "resizing", "migrating", and "forking".
        "storage_size_mib": 0,  # Optional. Additional storage added to the
          cluster, in MiB. If null, no additional storage is added to the cluster,
          beyond what is provided as a base amount from the 'size' and any previously
          added additional storage.
        "tags": [
            "str"  # Optional. A flat array of tag names as strings
              applied to the read-only replica.:code:`<br>`:code:`<br>`Requires
              ``tag:read`` scope.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(database_cluster_uuid: str, database_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Database.

To delete a specific database, send a DELETE request to /v2/databases/$DATABASE_ID/dbs/$DB_NAME.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Note: Database management is not supported for Caching or Valkey clusters.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • database_name (str) – The name of the database. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_connection_pool(database_cluster_uuid: str, pool_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Connection Pool (PostgreSQL).

To delete a specific connection pool for a PostgreSQL database cluster, send a DELETE request to /v2/databases/$DATABASE_ID/pools/$POOL_NAME.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • pool_name (str) – The name used to identify the connection pool. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_kafka_schema(database_cluster_uuid: str, subject_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Kafka Schema by Subject Name.

To delete a specific schema by subject name for a Kafka cluster, send a DELETE request to /v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • subject_name (str) – The name of the Kafka schema subject. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_kafka_topic(database_cluster_uuid: str, topic_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Topic for a Kafka Cluster.

To delete a single topic within a Kafka cluster, send a DELETE request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • topic_name (str) – The name used to identify the Kafka topic. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_logsink(database_cluster_uuid: str, logsink_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Logsink for a Database Cluster.

To delete a logsink for a database cluster, send a DELETE request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • logsink_id (str) – A unique identifier for a logsink of a database cluster. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_online_migration(database_cluster_uuid: str, migration_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Stop an Online Migration.

To stop an online migration, send a DELETE request to /v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • migration_id (str) – A unique identifier assigned to the online migration. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_opensearch_index(database_cluster_uuid: str, index_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Index for OpenSearch Cluster.

To delete a single index within OpenSearch cluster, send a DELETE request to /v2/databases/$DATABASE_ID/indexes/$INDEX_NAME.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • index_name (str) – The name of the OpenSearch index. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_user(database_cluster_uuid: str, username: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Remove a Database User.

To remove a specific database user, send a DELETE request to /v2/databases/$DATABASE_ID/users/$USERNAME.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Note: User management is not supported for Caching or Valkey clusters.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • username (str) – The name of the database user. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_cluster(database_cluster_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Destroy a Database Cluster.

To destroy a specific database, send a DELETE request to /v2/databases/$DATABASE_ID. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_replica(database_cluster_uuid: str, replica_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Destroy a Read-only Replica.

To destroy a specific read-only replica, send a DELETE request to /v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME.

Note: Read-only replicas are not supported for Caching or Valkey clusters.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • replica_name (str) – The name of the database replica. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(database_cluster_uuid: str, database_name: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Database.

To show information about an existing database cluster, send a GET request to /v2/databases/$DATABASE_ID/dbs/$DB_NAME.

Note: Database management is not supported for Caching or Valkey clusters.

The response will be a JSON object with a db key. This will be set to an object containing the standard database attributes.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • database_name (str) – The name of the database. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "db": {
        "name": "str"  # The name of the database. Required.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_autoscale(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Autoscale Configuration for a Database Cluster.

To retrieve the autoscale configuration for an existing database cluster, send a GET request to /v2/databases/$DATABASE_ID/autoscale. The response will be a JSON object with autoscaling configuration details.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "autoscale": {
        "storage": {
            "enabled": bool,  # Whether storage autoscaling is enabled
              for the cluster. Required.
            "increment_gib": 0,  # Optional. The amount of additional
              storage to add (in GiB) when autoscaling is triggered.
            "threshold_percent": 0  # Optional. The storage usage
              threshold percentage that triggers autoscaling. When storage usage
              exceeds this percentage, additional storage will be added automatically.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_ca(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve the Public Certificate.

To retrieve the public certificate used to secure the connection to the database cluster send a GET request to /v2/databases/$DATABASE_ID/ca.

The response will be a JSON object with a ca key. This will be set to an object containing the base64 encoding of the public key certificate.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "ca": {
        "certificate": "str"  # base64 encoding of the certificate used to
          secure database connections. Required.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_cluster(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Database Cluster.

To show information about an existing database cluster, send a GET request to /v2/databases/$DATABASE_ID.

The response will be a JSON object with a database key. This will be set to an object containing the standard database cluster attributes.

The embedded connection and private_connection objects will contain the information needed to access the database cluster. For multi-node clusters, the standby_connection and standby_private_connection objects contain the information needed to connect to the cluster’s standby node(s).

The embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "database": {
        "engine": "str",  # A slug representing the database engine used for
          the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL,
          "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch"
          for OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced
          Edition, and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition
          engines are currently in public preview. Required. Known values are: "pg",
          "mysql", "redis", "valkey", "mongodb", "kafka", "opensearch", "advanced_pg",
          and "advanced_mysql".
        "name": "str",  # A unique, human-readable name referring to a
          database cluster. Required.
        "num_nodes": 0,  # The number of nodes in the database cluster.
          Required.
        "region": "str",  # The slug identifier for the region where the
          database cluster is located. Required.
        "size": "str",  # The slug identifier representing the size of the
          nodes in the database cluster. Required.
        "connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the database
          cluster was created.
        "db_names": [
            "str"  # Optional. An array of strings containing the names
              of databases created in the database cluster.
        ],
        "do_settings": {
            "service_cnames": [
                "str"  # Optional. An array of custom CNAMEs for the
                  database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g.,
                  "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253
                  characters.
            ]
        },
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a database cluster.
        "maintenance_window": {
            "day": "str",  # The day of the week on which to apply
              maintenance updates. Required.
            "hour": "str",  # The hour in UTC at which maintenance
              updates will be applied in 24 hour format. Required.
            "description": [
                "str"  # Optional. A list of strings, each containing
                  information about a pending maintenance update.
            ],
            "pending": bool  # Optional. A boolean value indicating
              whether any maintenance is scheduled to be performed in the next window.
        },
        "metrics_endpoints": [
            {
                "host": "str",  # Optional. A FQDN pointing to the
                  database cluster's node(s).
                "port": 0  # Optional. The port on which a service is
                  listening.
            }
        ],
        "private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "private_network_uuid": "str",  # Optional. A string specifying the
          UUID of the VPC to which the database cluster will be assigned. If excluded,
          the cluster when creating a new database cluster, it will be assigned to your
          account's default VPC for the region. :code:`<br>`:code:`<br>`Requires
          ``vpc:read`` scope.
        "project_id": "str",  # Optional. The ID of the project that the
          database cluster is assigned to. If excluded when creating a new database
          cluster, it will be assigned to your default
          project.:code:`<br>`:code:`<br>`Requires ``project:read`` scope.
        "rules": [
            {
                "type": "str",  # The type of resource that the
                  firewall rule allows to access the database cluster. Required. Known
                  values are: "droplet", "k8s", "ip_addr", "tag", and "app".
                "value": "str",  # The ID of the specific resource,
                  the name of a tag applied to a group of resources, or the IP address
                  that the firewall rule allows to access the database cluster.
                  Required.
                "cluster_uuid": "str",  # Optional. A unique ID for
                  the database cluster to which the rule is applied.
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the firewall rule was created.
                "description": "str",  # Optional. A human-readable
                  description of the rule.
                "uuid": "str"  # Optional. A unique ID for the
                  firewall rule itself.
            }
        ],
        "schema_registry_connection": {
            "host": "str",  # Optional. The FQDN pointing to the schema
              registry connection uri.
            "password": "str",  # Optional. The randomly generated
              password for the schema registry.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the schema registry
              is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. This is provided as a convenience
              and should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the schema
              registry.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "semantic_version": "str",  # Optional. A string representing the
          semantic version of the database engine in use for the cluster.
        "standby_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "standby_private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "status": "str",  # Optional. A string representing the current
          status of the database cluster. Known values are: "creating", "online",
          "resizing", "migrating", and "forking".
        "storage_size_mib": 0,  # Optional. Additional storage added to the
          cluster, in MiB. If null, no additional storage is added to the cluster,
          beyond what is provided as a base amount from the 'size' and any previously
          added additional storage.
        "tags": [
            "str"  # Optional. An array of tags that have been applied to
              the database cluster. :code:`<br>`:code:`<br>`Requires ``tag:read``
              scope.
        ],
        "ui_connection": {
            "host": "str",  # Optional. The FQDN pointing to the
              opensearch cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the opensearch
              dashboard is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. This is provided as a convenience
              and should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              opensearch dashboard.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
        },
        "users": [
            {
                "name": "str",  # The name of a database user.
                  Required.
                "access_cert": "str",  # Optional. Access certificate
                  for TLS client authentication. (Kafka only).
                "access_key": "str",  # Optional. Access key for TLS
                  client authentication. (Kafka only).
                "mysql_settings": {
                    "auth_plugin": "str"  # A string specifying
                      the authentication method to be used for connections to the MySQL
                      user account. The valid values are ``mysql_native_password`` or
                      ``caching_sha2_password``. If excluded when creating a new user,
                      the default for the version of MySQL in use will be used. As of
                      MySQL 8.0, the default is ``caching_sha2_password``. Required.
                      Known values are: "mysql_native_password" and
                      "caching_sha2_password".
                },
                "password": "str",  # Optional. A randomly generated
                  password for the database user.:code:`<br>`Requires
                  ``database:view_credentials`` scope.
                "role": "str",  # Optional. A string representing the
                  database user's role. The value will be either "primary" or "normal".
                  Known values are: "primary" and "normal".
                "settings": {
                    "acl": [
                        {
                            "permission": "str",  #
                              Permission set applied to the ACL. 'consume' allows for
                              messages to be consumed from the topic. 'produce' allows
                              for messages to be published to the topic.
                              'produceconsume' allows for both 'consume' and 'produce'
                              permission. 'admin' allows for 'produceconsume' as well
                              as any operations to administer the topic (delete,
                              update). Required. Known values are: "admin", "consume",
                              "produce", and "produceconsume".
                            "topic": "str",  # A regex
                              for matching the topic(s) that this ACL should apply to.
                              Required.
                            "id": "str"  # Optional. An
                              identifier for the ACL. Will be computed after the ACL is
                              created/updated.
                        }
                    ],
                    "mongo_user_settings": {
                        "databases": [
                            "str"  # Optional. A list of
                              databases to which the user should have access. When the
                              database is set to ``admin``"" , the user will have
                              access to all databases based on the user's role i.e. a
                              user with the role ``readOnly`` assigned to the ``admin``
                              database will have read access to all databases.
                        ],
                        "role": "str"  # Optional. The role
                          to assign to the user with each role mapping to a MongoDB
                          built-in role.  ``readOnly`` maps to a `read
                          <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                          role. ``readWrite`` maps to a `readWrite
                          <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                          role. ``dbAdmin`` maps to a `dbAdmin
                          <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                          role. Known values are: "readOnly", "readWrite", and
                          "dbAdmin".
                    },
                    "opensearch_acl": [
                        {
                            "index": "str",  # Optional.
                              A regex for matching the indexes that this ACL should
                              apply to.
                            "permission": "str"  #
                              Optional. Permission set applied to the ACL. 'read'
                              allows user to read from the index. 'write' allows for
                              user to write to the index. 'readwrite' allows for both
                              'read' and 'write' permission. 'deny'(default) restricts
                              user from performing any operation over an index. 'admin'
                              allows for 'readwrite' as well as any operations to
                              administer the index. Known values are: "deny", "admin",
                              "read", "readwrite", and "write".
                        }
                    ],
                    "pg_allow_replication": bool  # Optional. For
                      Postgres clusters, set to ``true`` for a user with replication
                      rights. This option is not currently supported for other database
                      engines.
                }
            }
        ],
        "version": "str",  # Optional. A string representing the version of
          the database engine in use for the cluster.
        "version_end_of_availability": "str",  # Optional. A timestamp
          referring to the date when the particular version will no longer be available
          for creating new clusters. If null, the version does not have an end of
          availability timeline.
        "version_end_of_life": "str"  # Optional. A timestamp referring to
          the date when the particular version will no longer be supported. If null,
          the version does not have an end of life timeline.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_cluster_metrics_credentials(**kwargs: Any) MutableMapping[str, Any]

Retrieve Database Clusters’ Metrics Endpoint Credentials.

To show the credentials for all database clusters’ metrics endpoints, send a GET request to /v2/databases/metrics/credentials. The result will be a JSON object with a credentials key.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "credentials": {
        "credentials": {
            "basic_auth_password": "str",  # Optional. basic
              authentication password for metrics HTTP endpoint.
            "basic_auth_username": "str"  # Optional. basic
              authentication username for metrics HTTP endpoint.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_config(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Database Cluster Configuration.

Shows configuration parameters for an existing database cluster by sending a GET request to /v2/databases/$DATABASE_ID/config. The response is a JSON object with a config key, which is set to an object containing any database configuration parameters.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "config": {}
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_connection_pool(database_cluster_uuid: str, pool_name: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Existing Connection Pool (PostgreSQL).

To show information about an existing connection pool for a PostgreSQL database cluster, send a GET request to /v2/databases/$DATABASE_ID/pools/$POOL_NAME. The response will be a JSON object with a pool key.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • pool_name (str) – The name used to identify the connection pool. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "pool": {
        "db": "str",  # The database for use with the connection pool.
          Required.
        "mode": "str",  # The PGBouncer transaction mode for the connection
          pool. The allowed values are session, transaction, and statement. Required.
        "name": "str",  # A unique name for the connection pool. Must be
          between 3 and 60 characters. Required.
        "size": 0,  # The desired size of the PGBouncer connection pool. The
          maximum allowed size is determined by the size of the cluster's primary node.
          25 backend server connections are allowed for every 1GB of RAM. Three are
          reserved for maintenance. For example, a primary node with 1 GB of RAM allows
          for a maximum of 22 backend server connections while one with 4 GB would
          allow for 97. Note that these are shared across all connection pools in a
          cluster. Required.
        "connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "standby_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "standby_private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "user": "str"  # Optional. The name of the user for use with the
          connection pool. When excluded, all sessions connect to the database as the
          inbound user.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_eviction_policy(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve the Eviction Policy for a Caching or Valkey Cluster.

To retrieve the configured eviction policy for an existing Caching or Valkey cluster, send a GET request to /v2/databases/$DATABASE_ID/eviction_policy. The response will be a JSON object with an eviction_policy key. This will be set to a string representing the eviction policy.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "eviction_policy": "str"  # A string specifying the desired eviction policy
      for a Caching or Valkey cluster.   * ``noeviction``"" : Don't evict any data,
      returns error when memory limit is reached. * ``allkeys_lru:`` Evict any key,
      least recently used (LRU) first. * ``allkeys_random``"" : Evict keys in a random
      order. * ``volatile_lru``"" : Evict keys with expiration only, least recently
      used (LRU) first. * ``volatile_random``"" : Evict keys with expiration only in a
      random order. * ``volatile_ttl``"" : Evict keys with expiration only, shortest
      time-to-live (TTL) first. Required. Known values are: "noeviction",
      "allkeys_lru", "allkeys_random", "volatile_lru", "volatile_random", and
      "volatile_ttl".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_kafka_schema(database_cluster_uuid: str, subject_name: str, **kwargs: Any) MutableMapping[str, Any]

Get a Kafka Schema by Subject Name.

To get a specific schema by subject name for a Kafka cluster, send a GET request to /v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • subject_name (str) – The name of the Kafka schema subject. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "schema": "str",  # Optional. The schema definition in the specified format.
    "schema_id": 0,  # Optional. The id for schema.
    "schema_type": "str",  # Optional. The type of the schema. Known values are:
      "AVRO", "JSON", and "PROTOBUF".
    "subject_name": "str",  # Optional. The name of the schema subject.
    "version": "str"  # Optional. The version of the schema.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_kafka_schema_config(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Schema Registry Configuration for a kafka Cluster.

To retrieve the Schema Registry configuration for a Kafka cluster, send a GET request to /v2/databases/$DATABASE_ID/schema-registry/config. The response is a JSON object with a compatibility_level key, which is set to an object containing any database configuration parameters.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "compatibility_level": "str"  # The compatibility level of the schema
      registry. Required. Known values are: "NONE", "BACKWARD", "BACKWARD_TRANSITIVE",
      "FORWARD", "FORWARD_TRANSITIVE", "FULL", and "FULL_TRANSITIVE".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_kafka_schema_subject_config(database_cluster_uuid: str, subject_name: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Schema Registry Configuration for a Subject of kafka Cluster.

To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, send a GET request to /v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME. The response is a JSON object with a compatibility_level key, which is set to an object containing any database configuration parameters.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • subject_name (str) – The name of the Kafka schema subject. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "compatibility_level": "str",  # The compatibility level of the schema
      registry. Required. Known values are: "NONE", "BACKWARD", "BACKWARD_TRANSITIVE",
      "FORWARD", "FORWARD_TRANSITIVE", "FULL", and "FULL_TRANSITIVE".
    "subject_name": "str"  # The name of the schema subject. Required.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_kafka_schema_version(database_cluster_uuid: str, subject_name: str, version: str, **kwargs: Any) MutableMapping[str, Any]

Get Kafka Schema by Subject Version.

To get a specific schema by subject name for a Kafka cluster, send a GET request to /v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME/versions/$VERSION.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • subject_name (str) – The name of the Kafka schema subject. Required.

  • version (str) – The version of the Kafka schema subject. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "schema": "str",  # Optional. The schema definition in the specified format.
    "schema_id": 0,  # Optional. The id for schema.
    "schema_type": "str",  # Optional. The type of the schema. Known values are:
      "AVRO", "JSON", and "PROTOBUF".
    "subject_name": "str",  # Optional. The name of the schema subject.
    "version": "str"  # Optional. The version of the schema.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_kafka_topic(database_cluster_uuid: str, topic_name: str, **kwargs: Any) MutableMapping[str, Any]

Get Topic for a Kafka Cluster.

To retrieve a given topic by name from the set of a Kafka cluster’s topics, send a GET request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME.

The result will be a JSON object with a topic key.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • topic_name (str) – The name used to identify the Kafka topic. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "topic": {
        "config": {
            "cleanup_policy": "delete",  # Optional. Default value is
              "delete". The cleanup_policy sets the retention policy to use on log
              segments. 'delete' will discard old segments when retention time/size
              limits are reached. 'compact' will enable log compaction, resulting in
              retention of the latest value for each key. Known values are: "delete",
              "compact", and "compact_delete".
            "compression_type": "producer",  # Optional. Default value is
              "producer". The compression_type specifies the compression type of the
              topic. Known values are: "producer", "gzip", "snappy", "Iz4", "zstd", and
              "uncompressed".
            "delete_retention_ms": 86400000,  # Optional. Default value
              is 86400000. The delete_retention_ms specifies how long (in ms) to retain
              delete tombstone markers for topics.
            "file_delete_delay_ms": 60000,  # Optional. Default value is
              60000. The file_delete_delay_ms specifies the time (in ms) to wait before
              deleting a file from the filesystem.
            "flush_messages": 9223372036854776000,  # Optional. Default
              value is 9223372036854776000. The flush_messages specifies the number of
              messages to accumulate on a log partition before messages are flushed to
              disk.
            "flush_ms": 9223372036854776000,  # Optional. Default value
              is 9223372036854776000. The flush_ms specifies the maximum time (in ms)
              that a message is kept in memory before being flushed to disk.
            "index_interval_bytes": 4096,  # Optional. Default value is
              4096. The index_interval_bytes specifies the number of bytes between
              entries being added into te offset index.
            "max_compaction_lag_ms": 9223372036854776000,  # Optional.
              Default value is 9223372036854776000. The max_compaction_lag_ms specifies
              the maximum amount of time (in ms) that a message will remain
              uncompacted. This is only applicable if the logs are have compaction
              enabled.
            "max_message_bytes": 1048588,  # Optional. Default value is
              1048588. The max_messages_bytes specifies the largest record batch size
              (in bytes) that can be sent to the server.  This is calculated after
              compression if compression is enabled.
            "message_down_conversion_enable": True,  # Optional. Default
              value is True. The message_down_conversion_enable specifies whether
              down-conversion of message formats is enabled to satisfy consumer
              requests. When 'false', the broker will not perform conversion for
              consumers expecting older message formats. The broker will respond with
              an ``UNSUPPORTED_VERSION`` error for consume requests from these older
              clients.
            "message_format_version": "3.0-IV1",  # Optional. Default
              value is "3.0-IV1". The message_format_version specifies the message
              format version used by the broker to append messages to the logs. The
              value of this setting is assumed to be 3.0-IV1 if the broker protocol
              version is 3.0 or higher. By setting a  particular message format
              version, all existing messages on disk must be smaller or equal to the
              specified version. Known values are: "0.8.0", "0.8.1", "0.8.2", "0.9.0",
              "0.10.0-IV0", "0.10.0-IV1", "0.10.1-IV0", "0.10.1-IV1", "0.10.1-IV2",
              "0.10.2-IV0", "0.11.0-IV0", "0.11.0-IV1", "0.11.0-IV2", "1.0-IV0",
              "1.1-IV0", "2.0-IV0", "2.0-IV1", "2.1-IV0", "2.1-IV1", "2.1-IV2",
              "2.2-IV0", "2.2-IV1", "2.3-IV0", "2.3-IV1", "2.4-IV0", "2.4-IV1",
              "2.5-IV0", "2.6-IV0", "2.7-IV0", "2.7-IV1", "2.7-IV2", "2.8-IV0",
              "2.8-IV1", "3.0-IV0", "3.0-IV1", "3.1-IV0", "3.2-IV0", "3.3-IV0",
              "3.3-IV1", "3.3-IV2", and "3.3-IV3".
            "message_timestamp_type": "create_time",  # Optional. Default
              value is "create_time". The message_timestamp_type specifies whether to
              use the message create time or log append time as the timestamp on a
              message. Known values are: "create_time" and "log_append_time".
            "min_cleanable_dirty_ratio": 0.5,  # Optional. Default value
              is 0.5. The min_cleanable_dirty_ratio specifies the frequency of log
              compaction (if enabled) in relation to duplicates present in the logs.
              For example, at 0.5, at most 50% of the log could be duplicates before
              compaction would begin.
            "min_compaction_lag_ms": 0,  # Optional. Default value is 0.
              The min_compaction_lag_ms specifies the minimum time (in ms) that a
              message will remain uncompacted in the log. Only relevant if log
              compaction is enabled.
            "min_insync_replicas": 1,  # Optional. Default value is 1.
              The min_insync_replicas specifies the number of replicas that must ACK a
              write for the write to be considered successful.
            "preallocate": False,  # Optional. Default value is False.
              The preallocate specifies whether a file should be preallocated on disk
              when creating a new log segment.
            "retention_bytes": -1,  # Optional. Default value is -1. The
              retention_bytes specifies the maximum size of the log (in bytes) before
              deleting messages. -1 indicates that there is no limit.
            "retention_ms": 604800000,  # Optional. Default value is
              604800000. The retention_ms specifies the maximum amount of time (in ms)
              to keep a message before deleting it.
            "segment_bytes": 209715200,  # Optional. Default value is
              209715200. The segment_bytes specifies the maximum size of a single log
              file (in bytes).
            "segment_jitter_ms": 0,  # Optional. Default value is 0. The
              segment_jitter_ms specifies the maximum random jitter subtracted from the
              scheduled segment roll time to avoid thundering herds of segment rolling.
            "segment_ms": 604800000  # Optional. Default value is
              604800000. The segment_ms specifies the period of time after which the
              log will be forced to roll if the segment file isn't full. This ensures
              that retention can delete or compact old data.
        },
        "name": "str",  # Optional. The name of the Kafka topic.
        "partitions": [
            {
                "consumer_groups": [
                    {
                        "group_name": "str",  # Optional.
                          Name of the consumer group.
                        "offset": 0  # Optional. The current
                          offset of the consumer group.
                    }
                ],
                "earliest_offset": 0,  # Optional. The earliest
                  consumer offset amongst consumer groups.
                "id": 0,  # Optional. An identifier for the
                  partition.
                "in_sync_replicas": 0,  # Optional. The number of
                  nodes that are in-sync (have the latest data) for the given
                  partition.
                "size": 0  # Optional. Size of the topic partition in
                  bytes.
            }
        ],
        "replication_factor": 0,  # Optional. The number of nodes to
          replicate data across the cluster.
        "state": "str"  # Optional. The state of the Kafka topic. Known
          values are: "active", "configuring", "deleting", and "unknown".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_logsink(database_cluster_uuid: str, logsink_id: str, **kwargs: Any) MutableMapping[str, Any]

Get Logsink for a Database Cluster.

To get a logsink for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • logsink_id (str) – A unique identifier for a logsink of a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "config": {},
    "sink_id": "str",  # Optional. A unique identifier for Logsink.
    "sink_name": "str",  # Optional. The name of the Logsink.
    "sink_type": "str"  # Optional. Known values are: "rsyslog", "elasticsearch",
      and "opensearch".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_migration_status(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve the Status of an Online Migration.

To retrieve the status of the most recent online migration, send a GET request to /v2/databases/$DATABASE_ID/online-migration.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "created_at": "str",  # Optional. The time the migration was initiated, in
      ISO 8601 format.
    "id": "str",  # Optional. The ID of the most recent migration.
    "status": "str"  # Optional. The current status of the migration. Known
      values are: "running", "syncing", "canceled", "error", and "done".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_replica(database_cluster_uuid: str, replica_name: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Read-only Replica.

To show information about an existing database replica, send a GET request to /v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME.

Note: Read-only replicas are not supported for Caching or Valkey clusters.

The response will be a JSON object with a replica key. This will be set to an object containing the standard database replica attributes.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • replica_name (str) – The name of the database replica. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "replica": {
        "name": "str",  # The name to give the read-only replicating.
          Required.
        "connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the database
          cluster was created.
        "do_settings": {
            "service_cnames": [
                "str"  # Optional. An array of custom CNAMEs for the
                  database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g.,
                  "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253
                  characters.
            ]
        },
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a database replica.
        "private_connection": {
            "database": "str",  # Optional. The name of the default
              database.
            "host": "str",  # Optional. The FQDN pointing to the database
              cluster's current primary node.
            "password": "str",  # Optional. The randomly generated
              password for the default user.:code:`<br>`:code:`<br>`Requires
              ``database:view_credentials`` scope.
            "port": 0,  # Optional. The port on which the database
              cluster is listening.
            "ssl": bool,  # Optional. A boolean value indicating if the
              connection should be made over SSL.
            "uri": "str",  # Optional. A connection string in the format
              accepted by the ``psql`` command. This is provided as a convenience and
              should be able to be constructed by the other attributes.
            "user": "str"  # Optional. The default user for the
              database.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
              scope.
        },
        "private_network_uuid": "str",  # Optional. A string specifying the
          UUID of the VPC to which the read-only replica will be assigned. If excluded,
          the replica will be assigned to your account's default VPC for the region.
          :code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
        "region": "str",  # Optional. A slug identifier for the region where
          the read-only replica will be located. If excluded, the replica will be
          placed in the same region as the cluster.
        "size": "str",  # Optional. A slug identifier representing the size
          of the node for the read-only replica. The size of the replica must be at
          least as large as the node size for the database cluster from which it is
          replicating.
        "status": "str",  # Optional. A string representing the current
          status of the database cluster. Known values are: "creating", "online",
          "resizing", "migrating", and "forking".
        "storage_size_mib": 0,  # Optional. Additional storage added to the
          cluster, in MiB. If null, no additional storage is added to the cluster,
          beyond what is provided as a base amount from the 'size' and any previously
          added additional storage.
        "tags": [
            "str"  # Optional. A flat array of tag names as strings
              applied to the read-only replica.:code:`<br>`:code:`<br>`Requires
              ``tag:read`` scope.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_sql_mode(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve the SQL Modes for a MySQL Cluster.

To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to /v2/databases/$DATABASE_ID/sql_mode. The response will be a JSON object with a sql_mode key. This will be set to a string representing the configured SQL modes.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "sql_mode": "str"  # A string specifying the configured SQL modes for the
      MySQL cluster. Required.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_user(database_cluster_uuid: str, username: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Database User.

To show information about an existing database user, send a GET request to /v2/databases/$DATABASE_ID/users/$USERNAME.

Note: User management is not supported for Caching or Valkey clusters.

The response will be a JSON object with a user key. This will be set to an object containing the standard database user attributes. The user’s password will not show up unless the database:view_credentials scope is present.

For MySQL clusters, additional options will be contained in the mysql_settings object.

For Kafka clusters, additional options will be contained in the settings object.

For MongoDB clusters, additional information will be contained in the mongo_user_settings object.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • username (str) – The name of the database user. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "user": {
        "name": "str",  # The name of a database user. Required.
        "access_cert": "str",  # Optional. Access certificate for TLS client
          authentication. (Kafka only).
        "access_key": "str",  # Optional. Access key for TLS client
          authentication. (Kafka only).
        "mysql_settings": {
            "auth_plugin": "str"  # A string specifying the
              authentication method to be used for connections to the MySQL user
              account. The valid values are ``mysql_native_password`` or
              ``caching_sha2_password``. If excluded when creating a new user, the
              default for the version of MySQL in use will be used. As of MySQL 8.0,
              the default is ``caching_sha2_password``. Required. Known values are:
              "mysql_native_password" and "caching_sha2_password".
        },
        "password": "str",  # Optional. A randomly generated password for the
          database user.:code:`<br>`Requires ``database:view_credentials`` scope.
        "role": "str",  # Optional. A string representing the database user's
          role. The value will be either "primary" or "normal". Known values are:
          "primary" and "normal".
        "settings": {
            "acl": [
                {
                    "permission": "str",  # Permission set
                      applied to the ACL. 'consume' allows for messages to be consumed
                      from the topic. 'produce' allows for messages to be published to
                      the topic. 'produceconsume' allows for both 'consume' and
                      'produce' permission. 'admin' allows for 'produceconsume' as well
                      as any operations to administer the topic (delete, update).
                      Required. Known values are: "admin", "consume", "produce", and
                      "produceconsume".
                    "topic": "str",  # A regex for matching the
                      topic(s) that this ACL should apply to. Required.
                    "id": "str"  # Optional. An identifier for
                      the ACL. Will be computed after the ACL is created/updated.
                }
            ],
            "mongo_user_settings": {
                "databases": [
                    "str"  # Optional. A list of databases to
                      which the user should have access. When the database is set to
                      ``admin``"" , the user will have access to all databases based on
                      the user's role i.e. a user with the role ``readOnly`` assigned
                      to the ``admin`` database will have read access to all databases.
                ],
                "role": "str"  # Optional. The role to assign to the
                  user with each role mapping to a MongoDB built-in role.  ``readOnly``
                  maps to a `read
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                  role. ``readWrite`` maps to a `readWrite
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                  role. ``dbAdmin`` maps to a `dbAdmin
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                  role. Known values are: "readOnly", "readWrite", and "dbAdmin".
            },
            "opensearch_acl": [
                {
                    "index": "str",  # Optional. A regex for
                      matching the indexes that this ACL should apply to.
                    "permission": "str"  # Optional. Permission
                      set applied to the ACL. 'read' allows user to read from the
                      index. 'write' allows for user to write to the index. 'readwrite'
                      allows for both 'read' and 'write' permission. 'deny'(default)
                      restricts user from performing any operation over an index.
                      'admin' allows for 'readwrite' as well as any operations to
                      administer the index. Known values are: "deny", "admin", "read",
                      "readwrite", and "write".
                }
            ],
            "pg_allow_replication": bool  # Optional. For Postgres
              clusters, set to ``true`` for a user with replication rights. This option
              is not currently supported for other database engines.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
install_update(database_cluster_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Start Database Maintenance.

To start the installation of updates for a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/install_update. A successful request will receive a 204 No Content status code with no body in response.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List All Databases.

To list all of the databases in a clusters, send a GET request to /v2/databases/$DATABASE_ID/dbs.

The result will be a JSON object with a dbs key. This will be set to an array of database objects, each of which will contain the standard database attributes.

Note: Database management is not supported for Caching or Valkey clusters.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "dbs": [
        {
            "name": "str"  # The name of the database. Required.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_backups(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Backups for a Database Cluster.

To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to /v2/databases/$DATABASE_ID/backups. Note: Backups are not supported for Caching or Valkey clusters. The result will be a JSON object with a backups key. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "backups": [
        {
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format at which the backup was created.
              Required.
            "size_gigabytes": 0.0,  # The size of the database backup in
              GBs. Required.
            "incremental": bool  # Optional. Indicates if this backup is
              a full or an incremental one (available only for MySQL).
        }
    ],
    "backup_progress": "str",  # Optional. If a backup is currently in progress,
      this attribute shows the percentage of completion. If no backup is in progress,
      this attribute will be hidden.
    "scheduled_backup_time": {
        "backup_hour": 0,  # Optional. The hour of the day when the backup is
          scheduled (in UTC).
        "backup_interval_hours": 0,  # Optional. The frequency, in hours, at
          which backups are taken.
        "backup_minute": 0  # Optional. The minute of the hour when the
          backup is scheduled.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_clusters(*, tag_name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All Database Clusters.

To list all of the database clusters available on your account, send a GET request to /v2/databases. To limit the results to database clusters with a specific tag, include the tag_name query parameter set to the name of the tag. For example, /v2/databases?tag_name=$TAG_NAME.

The result will be a JSON object with a databases key. This will be set to an array of database objects, each of which will contain the standard database attributes.

The embedded connection and private_connection objects will contain the information needed to access the database cluster. For multi-node clusters, the standby_connection and standby_private_connection objects will contain the information needed to connect to the cluster’s standby node(s).

The embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster.

Parameters:

tag_name (str) – Limits the results to database clusters with a specific tag.:code:<br><br>`Requires ``tag:read` scope. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "databases": [
        {
            "engine": "str",  # A slug representing the database engine
              used for the cluster. The possible values are: "pg" for PostgreSQL,
              "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka"
              for Kafka, "opensearch" for OpenSearch, "valkey" for Valkey,
              "advanced_pg" for PostgreSQL Advanced Edition, and "advanced_mysql" for
              MySQL Advanced Edition. Advanced Edition engines are currently in public
              preview. Required. Known values are: "pg", "mysql", "redis", "valkey",
              "mongodb", "kafka", "opensearch", "advanced_pg", and "advanced_mysql".
            "name": "str",  # A unique, human-readable name referring to
              a database cluster. Required.
            "num_nodes": 0,  # The number of nodes in the database
              cluster. Required.
            "region": "str",  # The slug identifier for the region where
              the database cluster is located. Required.
            "size": "str",  # The slug identifier representing the size
              of the nodes in the database cluster. Required.
            "connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the database cluster was created.
            "db_names": [
                "str"  # Optional. An array of strings containing the
                  names of databases created in the database cluster.
            ],
            "do_settings": {
                "service_cnames": [
                    "str"  # Optional. An array of custom CNAMEs
                      for the database cluster. Each CNAME must be a valid RFC 1123
                      hostname (e.g., "db.example.com"). Maximum of 16 CNAMEs allowed,
                      each up to 253 characters.
                ]
            },
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a database cluster.
            "maintenance_window": {
                "day": "str",  # The day of the week on which to
                  apply maintenance updates. Required.
                "hour": "str",  # The hour in UTC at which
                  maintenance updates will be applied in 24 hour format. Required.
                "description": [
                    "str"  # Optional. A list of strings, each
                      containing information about a pending maintenance update.
                ],
                "pending": bool  # Optional. A boolean value
                  indicating whether any maintenance is scheduled to be performed in
                  the next window.
            },
            "metrics_endpoints": [
                {
                    "host": "str",  # Optional. A FQDN pointing
                      to the database cluster's node(s).
                    "port": 0  # Optional. The port on which a
                      service is listening.
                }
            ],
            "private_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "private_network_uuid": "str",  # Optional. A string
              specifying the UUID of the VPC to which the database cluster will be
              assigned. If excluded, the cluster when creating a new database cluster,
              it will be assigned to your account's default VPC for the region.
              :code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
            "project_id": "str",  # Optional. The ID of the project that
              the database cluster is assigned to. If excluded when creating a new
              database cluster, it will be assigned to your default
              project.:code:`<br>`:code:`<br>`Requires ``project:read`` scope.
            "rules": [
                {
                    "type": "str",  # The type of resource that
                      the firewall rule allows to access the database cluster.
                      Required. Known values are: "droplet", "k8s", "ip_addr", "tag",
                      and "app".
                    "value": "str",  # The ID of the specific
                      resource, the name of a tag applied to a group of resources, or
                      the IP address that the firewall rule allows to access the
                      database cluster. Required.
                    "cluster_uuid": "str",  # Optional. A unique
                      ID for the database cluster to which the rule is applied.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. A time value given in ISO8601 combined date and time
                      format that represents when the firewall rule was created.
                    "description": "str",  # Optional. A
                      human-readable description of the rule.
                    "uuid": "str"  # Optional. A unique ID for
                      the firewall rule itself.
                }
            ],
            "schema_registry_connection": {
                "host": "str",  # Optional. The FQDN pointing to the
                  schema registry connection uri.
                "password": "str",  # Optional. The randomly
                  generated password for the schema
                  registry.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
                "port": 0,  # Optional. The port on which the schema
                  registry is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  schema registry.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "semantic_version": "str",  # Optional. A string representing
              the semantic version of the database engine in use for the cluster.
            "standby_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "standby_private_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "status": "str",  # Optional. A string representing the
              current status of the database cluster. Known values are: "creating",
              "online", "resizing", "migrating", and "forking".
            "storage_size_mib": 0,  # Optional. Additional storage added
              to the cluster, in MiB. If null, no additional storage is added to the
              cluster, beyond what is provided as a base amount from the 'size' and any
              previously added additional storage.
            "tags": [
                "str"  # Optional. An array of tags that have been
                  applied to the database cluster. :code:`<br>`:code:`<br>`Requires
                  ``tag:read`` scope.
            ],
            "ui_connection": {
                "host": "str",  # Optional. The FQDN pointing to the
                  opensearch cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  opensearch dashboard is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  opensearch dashboard.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "users": [
                {
                    "name": "str",  # The name of a database
                      user. Required.
                    "access_cert": "str",  # Optional. Access
                      certificate for TLS client authentication. (Kafka only).
                    "access_key": "str",  # Optional. Access key
                      for TLS client authentication. (Kafka only).
                    "mysql_settings": {
                        "auth_plugin": "str"  # A string
                          specifying the authentication method to be used for
                          connections to the MySQL user account. The valid values are
                          ``mysql_native_password`` or ``caching_sha2_password``. If
                          excluded when creating a new user, the default for the
                          version of MySQL in use will be used. As of MySQL 8.0, the
                          default is ``caching_sha2_password``. Required. Known values
                          are: "mysql_native_password" and "caching_sha2_password".
                    },
                    "password": "str",  # Optional. A randomly
                      generated password for the database user.:code:`<br>`Requires
                      ``database:view_credentials`` scope.
                    "role": "str",  # Optional. A string
                      representing the database user's role. The value will be either
                      "primary" or "normal". Known values are: "primary" and "normal".
                    "settings": {
                        "acl": [
                            {
                                "permission": "str",
                                  # Permission set applied to the ACL. 'consume' allows
                                  for messages to be consumed from the topic. 'produce'
                                  allows for messages to be published to the topic.
                                  'produceconsume' allows for both 'consume' and
                                  'produce' permission. 'admin' allows for
                                  'produceconsume' as well as any operations to
                                  administer the topic (delete, update). Required.
                                  Known values are: "admin", "consume", "produce", and
                                  "produceconsume".
                                "topic": "str",  # A
                                  regex for matching the topic(s) that this ACL should
                                  apply to. Required.
                                "id": "str"  #
                                  Optional. An identifier for the ACL. Will be computed
                                  after the ACL is created/updated.
                            }
                        ],
                        "mongo_user_settings": {
                            "databases": [
                                "str"  # Optional. A
                                  list of databases to which the user should have
                                  access. When the database is set to ``admin``"" , the
                                  user will have access to all databases based on the
                                  user's role i.e. a user with the role ``readOnly``
                                  assigned to the ``admin`` database will have read
                                  access to all databases.
                            ],
                            "role": "str"  # Optional.
                              The role to assign to the user with each role mapping to
                              a MongoDB built-in role.  ``readOnly`` maps to a `read
                              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                              role. ``readWrite`` maps to a `readWrite
                              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                              role. ``dbAdmin`` maps to a `dbAdmin
                              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                              role. Known values are: "readOnly", "readWrite", and
                              "dbAdmin".
                        },
                        "opensearch_acl": [
                            {
                                "index": "str",  #
                                  Optional. A regex for matching the indexes that this
                                  ACL should apply to.
                                "permission": "str"
                                  # Optional. Permission set applied to the ACL. 'read'
                                  allows user to read from the index. 'write' allows
                                  for user to write to the index. 'readwrite' allows
                                  for both 'read' and 'write' permission.
                                  'deny'(default) restricts user from performing any
                                  operation over an index. 'admin' allows for
                                  'readwrite' as well as any operations to administer
                                  the index. Known values are: "deny", "admin", "read",
                                  "readwrite", and "write".
                            }
                        ],
                        "pg_allow_replication": bool  #
                          Optional. For Postgres clusters, set to ``true`` for a user
                          with replication rights. This option is not currently
                          supported for other database engines.
                    }
                }
            ],
            "version": "str",  # Optional. A string representing the
              version of the database engine in use for the cluster.
            "version_end_of_availability": "str",  # Optional. A
              timestamp referring to the date when the particular version will no
              longer be available for creating new clusters. If null, the version does
              not have an end of availability timeline.
            "version_end_of_life": "str"  # Optional. A timestamp
              referring to the date when the particular version will no longer be
              supported. If null, the version does not have an end of life timeline.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_connection_pools(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Connection Pools (PostgreSQL).

To list all of the connection pools available to a PostgreSQL database cluster, send a GET request to /v2/databases/$DATABASE_ID/pools. The result will be a JSON object with a pools key. This will be set to an array of connection pool objects.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "pools": [
        {
            "db": "str",  # The database for use with the connection
              pool. Required.
            "mode": "str",  # The PGBouncer transaction mode for the
              connection pool. The allowed values are session, transaction, and
              statement. Required.
            "name": "str",  # A unique name for the connection pool. Must
              be between 3 and 60 characters. Required.
            "size": 0,  # The desired size of the PGBouncer connection
              pool. The maximum allowed size is determined by the size of the cluster's
              primary node. 25 backend server connections are allowed for every 1GB of
              RAM. Three are reserved for maintenance. For example, a primary node with
              1 GB of RAM allows for a maximum of 22 backend server connections while
              one with 4 GB would allow for 97. Note that these are shared across all
              connection pools in a cluster. Required.
            "connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "private_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "standby_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "standby_private_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "user": "str"  # Optional. The name of the user for use with
              the connection pool. When excluded, all sessions connect to the database
              as the inbound user.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_events_logs(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List all Events Logs.

To list all of the cluster events, send a GET request to /v2/databases/$DATABASE_ID/events.

The result will be a JSON object with a events key.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "events": [
        {
            "cluster_name": "str",  # Optional. The name of cluster.
            "create_time": "str",  # Optional. The time of the generation
              of a event.
            "event_type": "str",  # Optional. Type of the event. Known
              values are: "cluster_maintenance_perform", "cluster_master_promotion",
              "cluster_create", "cluster_update", "cluster_delete", "cluster_poweron",
              and "cluster_poweroff".
            "id": "str"  # Optional. ID of the particular event.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_firewall_rules(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Firewall Rules (Trusted Sources) for a Database Cluster.

To list all of a database cluster’s firewall rules (known as “trusted sources” in the control panel), send a GET request to /v2/databases/$DATABASE_ID/firewall. The result will be a JSON object with a rules key.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "rules": [
        {
            "type": "str",  # The type of resource that the firewall rule
              allows to access the database cluster. Required. Known values are:
              "droplet", "k8s", "ip_addr", "tag", and "app".
            "value": "str",  # The ID of the specific resource, the name
              of a tag applied to a group of resources, or the IP address that the
              firewall rule allows to access the database cluster. Required.
            "cluster_uuid": "str",  # Optional. A unique ID for the
              database cluster to which the rule is applied.
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the firewall rule was created.
            "description": "str",  # Optional. A human-readable
              description of the rule.
            "uuid": "str"  # Optional. A unique ID for the firewall rule
              itself.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_kafka_schemas(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Schemas for Kafka Cluster.

To list all schemas for a Kafka cluster, send a GET request to /v2/databases/$DATABASE_ID/schema-registry.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "subjects": [
        {
            "schema": "str",  # Optional. The schema definition in the
              specified format.
            "schema_id": 0,  # Optional. The id for schema.
            "schema_type": "str",  # Optional. The type of the schema.
              Known values are: "AVRO", "JSON", and "PROTOBUF".
            "subject_name": "str"  # Optional. The name of the schema
              subject.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_kafka_topics(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Topics for a Kafka Cluster.

To list all of a Kafka cluster’s topics, send a GET request to /v2/databases/$DATABASE_ID/topics.

The result will be a JSON object with a topics key.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "topics": [
        {
            "name": "str",  # Optional. The name of the Kafka topic.
            "partition_count": 0,  # Optional. The number of partitions
              available for the topic. On update, this value can only be increased.
            "replication_factor": 0,  # Optional. The number of nodes to
              replicate data across the cluster.
            "state": "str"  # Optional. The state of the Kafka topic.
              Known values are: "active", "configuring", "deleting", and "unknown".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_logsink(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Logsinks for a Database Cluster.

To list logsinks for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "sinks": [
        {
            "config": {},
            "sink_id": "str",  # Optional. A unique identifier for
              Logsink.
            "sink_name": "str",  # Optional. The name of the Logsink.
            "sink_type": "str"  # Optional. Known values are: "rsyslog",
              "elasticsearch", and "opensearch".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_opeasearch_indexes(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Indexes for a OpenSearch Cluster.

To list all of a OpenSearch cluster’s indexes, send a GET request to /v2/databases/$DATABASE_ID/indexes.

The result will be a JSON object with a indexes key.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "indexes": [
        {
            "created_time": "2020-02-20 00:00:00",  # Optional. The date
              and time the index was created.
            "health": "str",  # Optional. The health of the OpenSearch
              index. Known values are: "unknown", "green", "yellow", "red", and "red*".
            "index_name": "str",  # Optional. The name of the opensearch
              index.
            "number_of_replicas": 0,  # Optional. The number of replicas
              for the index.
            "number_of_shards": 0,  # Optional. The number of shards for
              the index.
            "size": 0,  # Optional. The size of the index.
            "status": "str"  # Optional. The status of the OpenSearch
              index. Known values are: "unknown", "open", "close", and "none".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_options(**kwargs: Any) MutableMapping[str, Any]

List Database Options.

To list all of the options available for the offered database engines, send a GET request to /v2/databases/options. The result will be a JSON object with an options key.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "options": {
        "advanced_mysql": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "advanced_pg": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "kafka": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "mongodb": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "mysql": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "opensearch": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "pg": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "redis": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        },
        "valkey": {
            "layouts": [
                {
                    "num_nodes": 0,  # Optional. An array of
                      objects, each indicating the node sizes (otherwise referred to as
                      slugs) that are available with various numbers of nodes in the
                      database cluster. Each slugs denotes the node's identifier, CPU,
                      and RAM (in that order).
                    "sizes": [
                        "str"  # Optional. An array of
                          objects containing the slugs available with various node
                          counts.
                    ]
                }
            ],
            "regions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ],
            "versions": [
                "str"  # Optional. An array of strings containing the
                  names of available regions.
            ]
        }
    },
    "version_availability": {
        "advanced_mysql": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "advanced_pg": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "kafka": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "mongodb": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "mysql": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "opensearch": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "pg": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "redis": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ],
        "valkey": [
            {
                "end_of_availability": "str",  # Optional. A
                  timestamp referring to the date when the particular version will no
                  longer be available for creating new clusters. If null, the version
                  does not have an end of availability timeline.
                "end_of_life": "str",  # Optional. A timestamp
                  referring to the date when the particular version will no longer be
                  supported. If null, the version does not have an end of life
                  timeline.
                "version": "str"  # Optional. The engine version.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_replicas(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List All Read-only Replicas.

To list all of the read-only replicas associated with a database cluster, send a GET request to /v2/databases/$DATABASE_ID/replicas.

Note: Read-only replicas are not supported for Caching or Valkey clusters.

The result will be a JSON object with a replicas key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "replicas": [
        {
            "name": "str",  # The name to give the read-only replicating.
              Required.
            "connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the database cluster was created.
            "do_settings": {
                "service_cnames": [
                    "str"  # Optional. An array of custom CNAMEs
                      for the database cluster. Each CNAME must be a valid RFC 1123
                      hostname (e.g., "db.example.com"). Maximum of 16 CNAMEs allowed,
                      each up to 253 characters.
                ]
            },
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a database replica.
            "private_connection": {
                "database": "str",  # Optional. The name of the
                  default database.
                "host": "str",  # Optional. The FQDN pointing to the
                  database cluster's current primary node.
                "password": "str",  # Optional. The randomly
                  generated password for the default
                  user.:code:`<br>`:code:`<br>`Requires ``database:view_credentials``
                  scope.
                "port": 0,  # Optional. The port on which the
                  database cluster is listening.
                "ssl": bool,  # Optional. A boolean value indicating
                  if the connection should be made over SSL.
                "uri": "str",  # Optional. A connection string in the
                  format accepted by the ``psql`` command. This is provided as a
                  convenience and should be able to be constructed by the other
                  attributes.
                "user": "str"  # Optional. The default user for the
                  database.:code:`<br>`:code:`<br>`Requires
                  ``database:view_credentials`` scope.
            },
            "private_network_uuid": "str",  # Optional. A string
              specifying the UUID of the VPC to which the read-only replica will be
              assigned. If excluded, the replica will be assigned to your account's
              default VPC for the region. :code:`<br>`:code:`<br>`Requires ``vpc:read``
              scope.
            "region": "str",  # Optional. A slug identifier for the
              region where the read-only replica will be located. If excluded, the
              replica will be placed in the same region as the cluster.
            "size": "str",  # Optional. A slug identifier representing
              the size of the node for the read-only replica. The size of the replica
              must be at least as large as the node size for the database cluster from
              which it is replicating.
            "status": "str",  # Optional. A string representing the
              current status of the database cluster. Known values are: "creating",
              "online", "resizing", "migrating", and "forking".
            "storage_size_mib": 0,  # Optional. Additional storage added
              to the cluster, in MiB. If null, no additional storage is added to the
              cluster, beyond what is provided as a base amount from the 'size' and any
              previously added additional storage.
            "tags": [
                "str"  # Optional. A flat array of tag names as
                  strings applied to the read-only
                  replica.:code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_users(database_cluster_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List all Database Users.

To list all of the users for your database cluster, send a GET request to /v2/databases/$DATABASE_ID/users.

Note: User management is not supported for Caching or Valkey clusters.

The result will be a JSON object with a users key. This will be set to an array of database user objects, each of which will contain the standard database user attributes. User passwords will not show without the database:view_credentials scope.

For MySQL clusters, additional options will be contained in the mysql_settings object.

For MongoDB clusters, additional information will be contained in the mongo_user_settings object.

Parameters:

database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "users": [
        {
            "name": "str",  # The name of a database user. Required.
            "access_cert": "str",  # Optional. Access certificate for TLS
              client authentication. (Kafka only).
            "access_key": "str",  # Optional. Access key for TLS client
              authentication. (Kafka only).
            "mysql_settings": {
                "auth_plugin": "str"  # A string specifying the
                  authentication method to be used for connections to the MySQL user
                  account. The valid values are ``mysql_native_password`` or
                  ``caching_sha2_password``. If excluded when creating a new user, the
                  default for the version of MySQL in use will be used. As of MySQL
                  8.0, the default is ``caching_sha2_password``. Required. Known values
                  are: "mysql_native_password" and "caching_sha2_password".
            },
            "password": "str",  # Optional. A randomly generated password
              for the database user.:code:`<br>`Requires ``database:view_credentials``
              scope.
            "role": "str",  # Optional. A string representing the
              database user's role. The value will be either "primary" or "normal".
              Known values are: "primary" and "normal".
            "settings": {
                "acl": [
                    {
                        "permission": "str",  # Permission
                          set applied to the ACL. 'consume' allows for messages to be
                          consumed from the topic. 'produce' allows for messages to be
                          published to the topic. 'produceconsume' allows for both
                          'consume' and 'produce' permission. 'admin' allows for
                          'produceconsume' as well as any operations to administer the
                          topic (delete, update). Required. Known values are: "admin",
                          "consume", "produce", and "produceconsume".
                        "topic": "str",  # A regex for
                          matching the topic(s) that this ACL should apply to.
                          Required.
                        "id": "str"  # Optional. An
                          identifier for the ACL. Will be computed after the ACL is
                          created/updated.
                    }
                ],
                "mongo_user_settings": {
                    "databases": [
                        "str"  # Optional. A list of
                          databases to which the user should have access. When the
                          database is set to ``admin``"" , the user will have access to
                          all databases based on the user's role i.e. a user with the
                          role ``readOnly`` assigned to the ``admin`` database will
                          have read access to all databases.
                    ],
                    "role": "str"  # Optional. The role to assign
                      to the user with each role mapping to a MongoDB built-in role.
                      ``readOnly`` maps to a `read
                      <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                      role. ``readWrite`` maps to a `readWrite
                      <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                      role. ``dbAdmin`` maps to a `dbAdmin
                      <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                      role. Known values are: "readOnly", "readWrite", and "dbAdmin".
                },
                "opensearch_acl": [
                    {
                        "index": "str",  # Optional. A regex
                          for matching the indexes that this ACL should apply to.
                        "permission": "str"  # Optional.
                          Permission set applied to the ACL. 'read' allows user to read
                          from the index. 'write' allows for user to write to the
                          index. 'readwrite' allows for both 'read' and 'write'
                          permission. 'deny'(default) restricts user from performing
                          any operation over an index. 'admin' allows for 'readwrite'
                          as well as any operations to administer the index. Known
                          values are: "deny", "admin", "read", "readwrite", and
                          "write".
                    }
                ],
                "pg_allow_replication": bool  # Optional. For
                  Postgres clusters, set to ``true`` for a user with replication
                  rights. This option is not currently supported for other database
                  engines.
            }
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch_config(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
patch_config(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Update the Database Configuration for an Existing Database.

To update the configuration for an existing database cluster, send a PATCH request to /v2/databases/$DATABASE_ID/config.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {}
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
promote_replica(database_cluster_uuid: str, replica_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Promote a Read-only Replica to become a Primary Cluster.

To promote a specific read-only replica, send a PUT request to /v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME/promote.

Note: Read-only replicas are not supported for Caching or Valkey clusters.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • replica_name (str) – The name of the database replica. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
reset_auth(database_cluster_uuid: str, username: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
reset_auth(database_cluster_uuid: str, username: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Reset a Database User’s Password or Authentication Method.

To reset the password for a database user, send a POST request to /v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth.

For mysql databases, the authentication method can be specifying by including a key in the JSON body called mysql_settings with the auth_plugin value specified.

The response will be a JSON object with a user key. This will be set to an object containing the standard database user attributes.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • username (str) – The name of the database user. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "mysql_settings": {
        "auth_plugin": "str"  # A string specifying the authentication method
          to be used for connections to the MySQL user account. The valid values are
          ``mysql_native_password`` or ``caching_sha2_password``. If excluded when
          creating a new user, the default for the version of MySQL in use will be
          used. As of MySQL 8.0, the default is ``caching_sha2_password``. Required.
          Known values are: "mysql_native_password" and "caching_sha2_password".
    }
}

# response body for status code(s): 200
response == {
    "user": {
        "name": "str",  # The name of a database user. Required.
        "access_cert": "str",  # Optional. Access certificate for TLS client
          authentication. (Kafka only).
        "access_key": "str",  # Optional. Access key for TLS client
          authentication. (Kafka only).
        "mysql_settings": {
            "auth_plugin": "str"  # A string specifying the
              authentication method to be used for connections to the MySQL user
              account. The valid values are ``mysql_native_password`` or
              ``caching_sha2_password``. If excluded when creating a new user, the
              default for the version of MySQL in use will be used. As of MySQL 8.0,
              the default is ``caching_sha2_password``. Required. Known values are:
              "mysql_native_password" and "caching_sha2_password".
        },
        "password": "str",  # Optional. A randomly generated password for the
          database user.:code:`<br>`Requires ``database:view_credentials`` scope.
        "role": "str",  # Optional. A string representing the database user's
          role. The value will be either "primary" or "normal". Known values are:
          "primary" and "normal".
        "settings": {
            "acl": [
                {
                    "permission": "str",  # Permission set
                      applied to the ACL. 'consume' allows for messages to be consumed
                      from the topic. 'produce' allows for messages to be published to
                      the topic. 'produceconsume' allows for both 'consume' and
                      'produce' permission. 'admin' allows for 'produceconsume' as well
                      as any operations to administer the topic (delete, update).
                      Required. Known values are: "admin", "consume", "produce", and
                      "produceconsume".
                    "topic": "str",  # A regex for matching the
                      topic(s) that this ACL should apply to. Required.
                    "id": "str"  # Optional. An identifier for
                      the ACL. Will be computed after the ACL is created/updated.
                }
            ],
            "mongo_user_settings": {
                "databases": [
                    "str"  # Optional. A list of databases to
                      which the user should have access. When the database is set to
                      ``admin``"" , the user will have access to all databases based on
                      the user's role i.e. a user with the role ``readOnly`` assigned
                      to the ``admin`` database will have read access to all databases.
                ],
                "role": "str"  # Optional. The role to assign to the
                  user with each role mapping to a MongoDB built-in role.  ``readOnly``
                  maps to a `read
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                  role. ``readWrite`` maps to a `readWrite
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                  role. ``dbAdmin`` maps to a `dbAdmin
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                  role. Known values are: "readOnly", "readWrite", and "dbAdmin".
            },
            "opensearch_acl": [
                {
                    "index": "str",  # Optional. A regex for
                      matching the indexes that this ACL should apply to.
                    "permission": "str"  # Optional. Permission
                      set applied to the ACL. 'read' allows user to read from the
                      index. 'write' allows for user to write to the index. 'readwrite'
                      allows for both 'read' and 'write' permission. 'deny'(default)
                      restricts user from performing any operation over an index.
                      'admin' allows for 'readwrite' as well as any operations to
                      administer the index. Known values are: "deny", "admin", "read",
                      "readwrite", and "write".
                }
            ],
            "pg_allow_replication": bool  # Optional. For Postgres
              clusters, set to ``true`` for a user with replication rights. This option
              is not currently supported for other database engines.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_autoscale(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_autoscale(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Configure Autoscale Settings for a Database Cluster.

To configure autoscale settings for an existing database cluster, send a PUT request to /v2/databases/$DATABASE_ID/autoscale, specifying the autoscale configuration. A successful request will receive a 204 No Content status code with no body in response.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "storage": {
        "enabled": bool,  # Whether storage autoscaling is enabled for the
          cluster. Required.
        "increment_gib": 0,  # Optional. The amount of additional storage to
          add (in GiB) when autoscaling is triggered.
        "threshold_percent": 0  # Optional. The storage usage threshold
          percentage that triggers autoscaling. When storage usage exceeds this
          percentage, additional storage will be added automatically.
    }
}

# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_cluster_metrics_credentials(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) None
update_cluster_metrics_credentials(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) None

Update Database Clusters’ Metrics Endpoint Credentials.

To update the credentials for all database clusters’ metrics endpoints, send a PUT request to /v2/databases/metrics/credentials. A successful request will receive a 204 No Content status code with no body in response.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

None

Return type:

None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "credentials": {
        "basic_auth_password": "str",  # Optional. basic authentication
          password for metrics HTTP endpoint.
        "basic_auth_username": "str"  # Optional. basic authentication
          username for metrics HTTP endpoint.
    }
}
update_cluster_size(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_cluster_size(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Resize a Database Cluster.

To resize a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/resize. The body of the request must specify both the size and num_nodes attributes. A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to resizing. This will transition back to online when the resize operation has completed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "num_nodes": 0,  # The number of nodes in the database cluster. Valid values
      are are 1-3. In addition to the primary node, up to two standby nodes may be
      added for highly available configurations. Required.
    "size": "str",  # A slug identifier representing desired the size of the
      nodes in the database cluster. Required.
    "storage_size_mib": 0  # Optional. Additional storage added to the cluster,
      in MiB. If null, no additional storage is added to the cluster, beyond what is
      provided as a base amount from the 'size' and any previously added additional
      storage.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_connection_pool(database_cluster_uuid: str, pool_name: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_connection_pool(database_cluster_uuid: str, pool_name: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Update Connection Pools (PostgreSQL).

To update a connection pool for a PostgreSQL database cluster, send a PUT request to /v2/databases/$DATABASE_ID/pools/$POOL_NAME.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • pool_name (str) – The name used to identify the connection pool. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "db": "str",  # The database for use with the connection pool. Required.
    "mode": "str",  # The PGBouncer transaction mode for the connection pool. The
      allowed values are session, transaction, and statement. Required.
    "size": 0,  # The desired size of the PGBouncer connection pool. The maximum
      allowed size is determined by the size of the cluster's primary node. 25 backend
      server connections are allowed for every 1GB of RAM. Three are reserved for
      maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of
      22 backend server connections while one with 4 GB would allow for 97. Note that
      these are shared across all connection pools in a cluster. Required.
    "user": "str"  # Optional. The name of the user for use with the connection
      pool. When excluded, all sessions connect to the database as the inbound user.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_eviction_policy(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_eviction_policy(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Configure the Eviction Policy for a Caching or Valkey Cluster.

To configure an eviction policy for an existing Caching or Valkey cluster, send a PUT request to /v2/databases/$DATABASE_ID/eviction_policy specifying the desired policy.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "eviction_policy": "str"  # A string specifying the desired eviction policy
      for a Caching or Valkey cluster.   * ``noeviction``"" : Don't evict any data,
      returns error when memory limit is reached. * ``allkeys_lru:`` Evict any key,
      least recently used (LRU) first. * ``allkeys_random``"" : Evict keys in a random
      order. * ``volatile_lru``"" : Evict keys with expiration only, least recently
      used (LRU) first. * ``volatile_random``"" : Evict keys with expiration only in a
      random order. * ``volatile_ttl``"" : Evict keys with expiration only, shortest
      time-to-live (TTL) first. Required. Known values are: "noeviction",
      "allkeys_lru", "allkeys_random", "volatile_lru", "volatile_random", and
      "volatile_ttl".
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_firewall_rules(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_firewall_rules(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Update Firewall Rules (Trusted Sources) for a Database.

To update a database cluster’s firewall rules (known as “trusted sources” in the control panel), send a PUT request to /v2/databases/$DATABASE_ID/firewall specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend placing your databases into a VPC network to limit access to them instead of using a firewall. A successful.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "rules": [
        {
            "type": "str",  # The type of resource that the firewall rule
              allows to access the database cluster. Required. Known values are:
              "droplet", "k8s", "ip_addr", "tag", and "app".
            "value": "str",  # The ID of the specific resource, the name
              of a tag applied to a group of resources, or the IP address that the
              firewall rule allows to access the database cluster. Required.
            "cluster_uuid": "str",  # Optional. A unique ID for the
              database cluster to which the rule is applied.
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the firewall rule was created.
            "description": "str",  # Optional. A human-readable
              description of the rule.
            "uuid": "str"  # Optional. A unique ID for the firewall rule
              itself.
        }
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_kafka_schema_config(database_cluster_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_kafka_schema_config(database_cluster_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Schema Registry Configuration for a kafka Cluster.

To update the Schema Registry configuration for a Kafka cluster, send a PUT request to /v2/databases/$DATABASE_ID/schema-registry/config. The response is a JSON object with a compatibility_level key, which is set to an object containing any database configuration parameters.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "compatibility_level": "str"  # The compatibility level of the schema
      registry. Required. Known values are: "NONE", "BACKWARD", "BACKWARD_TRANSITIVE",
      "FORWARD", "FORWARD_TRANSITIVE", "FULL", and "FULL_TRANSITIVE".
}

# response body for status code(s): 200
response == {
    "compatibility_level": "str"  # The compatibility level of the schema
      registry. Required. Known values are: "NONE", "BACKWARD", "BACKWARD_TRANSITIVE",
      "FORWARD", "FORWARD_TRANSITIVE", "FULL", and "FULL_TRANSITIVE".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_kafka_schema_subject_config(database_cluster_uuid: str, subject_name: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_kafka_schema_subject_config(database_cluster_uuid: str, subject_name: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Schema Registry Configuration for a Subject of kafka Cluster.

To update the Schema Registry configuration for a Subject of a Kafka cluster, send a PUT request to /v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME. The response is a JSON object with a compatibility_level key, which is set to an object containing any database configuration parameters.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • subject_name (str) – The name of the Kafka schema subject. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "compatibility_level": "str"  # The compatibility level of the schema
      registry. Required. Known values are: "NONE", "BACKWARD", "BACKWARD_TRANSITIVE",
      "FORWARD", "FORWARD_TRANSITIVE", "FULL", and "FULL_TRANSITIVE".
}

# response body for status code(s): 200
response == {
    "compatibility_level": "str",  # The compatibility level of the schema
      registry. Required. Known values are: "NONE", "BACKWARD", "BACKWARD_TRANSITIVE",
      "FORWARD", "FORWARD_TRANSITIVE", "FULL", and "FULL_TRANSITIVE".
    "subject_name": "str"  # The name of the schema subject. Required.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_kafka_topic(database_cluster_uuid: str, topic_name: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_kafka_topic(database_cluster_uuid: str, topic_name: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Topic for a Kafka Cluster.

To update a topic attached to a Kafka cluster, send a PUT request to /v2/databases/$DATABASE_ID/topics/$TOPIC_NAME.

The result will be a JSON object with a topic key.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • topic_name (str) – The name used to identify the Kafka topic. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {
        "cleanup_policy": "delete",  # Optional. Default value is "delete".
          The cleanup_policy sets the retention policy to use on log segments. 'delete'
          will discard old segments when retention time/size limits are reached.
          'compact' will enable log compaction, resulting in retention of the latest
          value for each key. Known values are: "delete", "compact", and
          "compact_delete".
        "compression_type": "producer",  # Optional. Default value is
          "producer". The compression_type specifies the compression type of the topic.
          Known values are: "producer", "gzip", "snappy", "Iz4", "zstd", and
          "uncompressed".
        "delete_retention_ms": 86400000,  # Optional. Default value is
          86400000. The delete_retention_ms specifies how long (in ms) to retain delete
          tombstone markers for topics.
        "file_delete_delay_ms": 60000,  # Optional. Default value is 60000.
          The file_delete_delay_ms specifies the time (in ms) to wait before deleting a
          file from the filesystem.
        "flush_messages": 9223372036854776000,  # Optional. Default value is
          9223372036854776000. The flush_messages specifies the number of messages to
          accumulate on a log partition before messages are flushed to disk.
        "flush_ms": 9223372036854776000,  # Optional. Default value is
          9223372036854776000. The flush_ms specifies the maximum time (in ms) that a
          message is kept in memory before being flushed to disk.
        "index_interval_bytes": 4096,  # Optional. Default value is 4096. The
          index_interval_bytes specifies the number of bytes between entries being
          added into te offset index.
        "max_compaction_lag_ms": 9223372036854776000,  # Optional. Default
          value is 9223372036854776000. The max_compaction_lag_ms specifies the maximum
          amount of time (in ms) that a message will remain uncompacted. This is only
          applicable if the logs are have compaction enabled.
        "max_message_bytes": 1048588,  # Optional. Default value is 1048588.
          The max_messages_bytes specifies the largest record batch size (in bytes)
          that can be sent to the server.  This is calculated after compression if
          compression is enabled.
        "message_down_conversion_enable": True,  # Optional. Default value is
          True. The message_down_conversion_enable specifies whether down-conversion of
          message formats is enabled to satisfy consumer requests. When 'false', the
          broker will not perform conversion for consumers expecting older message
          formats. The broker will respond with an ``UNSUPPORTED_VERSION`` error for
          consume requests from these older clients.
        "message_format_version": "3.0-IV1",  # Optional. Default value is
          "3.0-IV1". The message_format_version specifies the message format version
          used by the broker to append messages to the logs. The value of this setting
          is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By
          setting a  particular message format version, all existing messages on disk
          must be smaller or equal to the specified version. Known values are: "0.8.0",
          "0.8.1", "0.8.2", "0.9.0", "0.10.0-IV0", "0.10.0-IV1", "0.10.1-IV0",
          "0.10.1-IV1", "0.10.1-IV2", "0.10.2-IV0", "0.11.0-IV0", "0.11.0-IV1",
          "0.11.0-IV2", "1.0-IV0", "1.1-IV0", "2.0-IV0", "2.0-IV1", "2.1-IV0",
          "2.1-IV1", "2.1-IV2", "2.2-IV0", "2.2-IV1", "2.3-IV0", "2.3-IV1", "2.4-IV0",
          "2.4-IV1", "2.5-IV0", "2.6-IV0", "2.7-IV0", "2.7-IV1", "2.7-IV2", "2.8-IV0",
          "2.8-IV1", "3.0-IV0", "3.0-IV1", "3.1-IV0", "3.2-IV0", "3.3-IV0", "3.3-IV1",
          "3.3-IV2", and "3.3-IV3".
        "message_timestamp_type": "create_time",  # Optional. Default value
          is "create_time". The message_timestamp_type specifies whether to use the
          message create time or log append time as the timestamp on a message. Known
          values are: "create_time" and "log_append_time".
        "min_cleanable_dirty_ratio": 0.5,  # Optional. Default value is 0.5.
          The min_cleanable_dirty_ratio specifies the frequency of log compaction (if
          enabled) in relation to duplicates present in the logs. For example, at 0.5,
          at most 50% of the log could be duplicates before compaction would begin.
        "min_compaction_lag_ms": 0,  # Optional. Default value is 0. The
          min_compaction_lag_ms specifies the minimum time (in ms) that a message will
          remain uncompacted in the log. Only relevant if log compaction is enabled.
        "min_insync_replicas": 1,  # Optional. Default value is 1. The
          min_insync_replicas specifies the number of replicas that must ACK a write
          for the write to be considered successful.
        "preallocate": False,  # Optional. Default value is False. The
          preallocate specifies whether a file should be preallocated on disk when
          creating a new log segment.
        "retention_bytes": -1,  # Optional. Default value is -1. The
          retention_bytes specifies the maximum size of the log (in bytes) before
          deleting messages. -1 indicates that there is no limit.
        "retention_ms": 604800000,  # Optional. Default value is 604800000.
          The retention_ms specifies the maximum amount of time (in ms) to keep a
          message before deleting it.
        "segment_bytes": 209715200,  # Optional. Default value is 209715200.
          The segment_bytes specifies the maximum size of a single log file (in bytes).
        "segment_jitter_ms": 0,  # Optional. Default value is 0. The
          segment_jitter_ms specifies the maximum random jitter subtracted from the
          scheduled segment roll time to avoid thundering herds of segment rolling.
        "segment_ms": 604800000  # Optional. Default value is 604800000. The
          segment_ms specifies the period of time after which the log will be forced to
          roll if the segment file isn't full. This ensures that retention can delete
          or compact old data.
    },
    "partition_count": 0,  # Optional. The number of partitions available for the
      topic. On update, this value can only be increased.
    "replication_factor": 0  # Optional. The number of nodes to replicate data
      across the cluster.
}

# response body for status code(s): 200
response == {
    "topic": {
        "config": {
            "cleanup_policy": "delete",  # Optional. Default value is
              "delete". The cleanup_policy sets the retention policy to use on log
              segments. 'delete' will discard old segments when retention time/size
              limits are reached. 'compact' will enable log compaction, resulting in
              retention of the latest value for each key. Known values are: "delete",
              "compact", and "compact_delete".
            "compression_type": "producer",  # Optional. Default value is
              "producer". The compression_type specifies the compression type of the
              topic. Known values are: "producer", "gzip", "snappy", "Iz4", "zstd", and
              "uncompressed".
            "delete_retention_ms": 86400000,  # Optional. Default value
              is 86400000. The delete_retention_ms specifies how long (in ms) to retain
              delete tombstone markers for topics.
            "file_delete_delay_ms": 60000,  # Optional. Default value is
              60000. The file_delete_delay_ms specifies the time (in ms) to wait before
              deleting a file from the filesystem.
            "flush_messages": 9223372036854776000,  # Optional. Default
              value is 9223372036854776000. The flush_messages specifies the number of
              messages to accumulate on a log partition before messages are flushed to
              disk.
            "flush_ms": 9223372036854776000,  # Optional. Default value
              is 9223372036854776000. The flush_ms specifies the maximum time (in ms)
              that a message is kept in memory before being flushed to disk.
            "index_interval_bytes": 4096,  # Optional. Default value is
              4096. The index_interval_bytes specifies the number of bytes between
              entries being added into te offset index.
            "max_compaction_lag_ms": 9223372036854776000,  # Optional.
              Default value is 9223372036854776000. The max_compaction_lag_ms specifies
              the maximum amount of time (in ms) that a message will remain
              uncompacted. This is only applicable if the logs are have compaction
              enabled.
            "max_message_bytes": 1048588,  # Optional. Default value is
              1048588. The max_messages_bytes specifies the largest record batch size
              (in bytes) that can be sent to the server.  This is calculated after
              compression if compression is enabled.
            "message_down_conversion_enable": True,  # Optional. Default
              value is True. The message_down_conversion_enable specifies whether
              down-conversion of message formats is enabled to satisfy consumer
              requests. When 'false', the broker will not perform conversion for
              consumers expecting older message formats. The broker will respond with
              an ``UNSUPPORTED_VERSION`` error for consume requests from these older
              clients.
            "message_format_version": "3.0-IV1",  # Optional. Default
              value is "3.0-IV1". The message_format_version specifies the message
              format version used by the broker to append messages to the logs. The
              value of this setting is assumed to be 3.0-IV1 if the broker protocol
              version is 3.0 or higher. By setting a  particular message format
              version, all existing messages on disk must be smaller or equal to the
              specified version. Known values are: "0.8.0", "0.8.1", "0.8.2", "0.9.0",
              "0.10.0-IV0", "0.10.0-IV1", "0.10.1-IV0", "0.10.1-IV1", "0.10.1-IV2",
              "0.10.2-IV0", "0.11.0-IV0", "0.11.0-IV1", "0.11.0-IV2", "1.0-IV0",
              "1.1-IV0", "2.0-IV0", "2.0-IV1", "2.1-IV0", "2.1-IV1", "2.1-IV2",
              "2.2-IV0", "2.2-IV1", "2.3-IV0", "2.3-IV1", "2.4-IV0", "2.4-IV1",
              "2.5-IV0", "2.6-IV0", "2.7-IV0", "2.7-IV1", "2.7-IV2", "2.8-IV0",
              "2.8-IV1", "3.0-IV0", "3.0-IV1", "3.1-IV0", "3.2-IV0", "3.3-IV0",
              "3.3-IV1", "3.3-IV2", and "3.3-IV3".
            "message_timestamp_type": "create_time",  # Optional. Default
              value is "create_time". The message_timestamp_type specifies whether to
              use the message create time or log append time as the timestamp on a
              message. Known values are: "create_time" and "log_append_time".
            "min_cleanable_dirty_ratio": 0.5,  # Optional. Default value
              is 0.5. The min_cleanable_dirty_ratio specifies the frequency of log
              compaction (if enabled) in relation to duplicates present in the logs.
              For example, at 0.5, at most 50% of the log could be duplicates before
              compaction would begin.
            "min_compaction_lag_ms": 0,  # Optional. Default value is 0.
              The min_compaction_lag_ms specifies the minimum time (in ms) that a
              message will remain uncompacted in the log. Only relevant if log
              compaction is enabled.
            "min_insync_replicas": 1,  # Optional. Default value is 1.
              The min_insync_replicas specifies the number of replicas that must ACK a
              write for the write to be considered successful.
            "preallocate": False,  # Optional. Default value is False.
              The preallocate specifies whether a file should be preallocated on disk
              when creating a new log segment.
            "retention_bytes": -1,  # Optional. Default value is -1. The
              retention_bytes specifies the maximum size of the log (in bytes) before
              deleting messages. -1 indicates that there is no limit.
            "retention_ms": 604800000,  # Optional. Default value is
              604800000. The retention_ms specifies the maximum amount of time (in ms)
              to keep a message before deleting it.
            "segment_bytes": 209715200,  # Optional. Default value is
              209715200. The segment_bytes specifies the maximum size of a single log
              file (in bytes).
            "segment_jitter_ms": 0,  # Optional. Default value is 0. The
              segment_jitter_ms specifies the maximum random jitter subtracted from the
              scheduled segment roll time to avoid thundering herds of segment rolling.
            "segment_ms": 604800000  # Optional. Default value is
              604800000. The segment_ms specifies the period of time after which the
              log will be forced to roll if the segment file isn't full. This ensures
              that retention can delete or compact old data.
        },
        "name": "str",  # Optional. The name of the Kafka topic.
        "partitions": [
            {
                "consumer_groups": [
                    {
                        "group_name": "str",  # Optional.
                          Name of the consumer group.
                        "offset": 0  # Optional. The current
                          offset of the consumer group.
                    }
                ],
                "earliest_offset": 0,  # Optional. The earliest
                  consumer offset amongst consumer groups.
                "id": 0,  # Optional. An identifier for the
                  partition.
                "in_sync_replicas": 0,  # Optional. The number of
                  nodes that are in-sync (have the latest data) for the given
                  partition.
                "size": 0  # Optional. Size of the topic partition in
                  bytes.
            }
        ],
        "replication_factor": 0,  # Optional. The number of nodes to
          replicate data across the cluster.
        "state": "str"  # Optional. The state of the Kafka topic. Known
          values are: "active", "configuring", "deleting", and "unknown".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_logsink(database_cluster_uuid: str, logsink_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_logsink(database_cluster_uuid: str, logsink_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Update Logsink for a Database Cluster.

To update a logsink for a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • logsink_id (str) – A unique identifier for a logsink of a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {}
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_maintenance_window(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_maintenance_window(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Configure a Database Cluster’s Maintenance Window.

To configure the window when automatic maintenance should be performed for a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/maintenance. A successful request will receive a 204 No Content status code with no body in response.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "day": "str",  # The day of the week on which to apply maintenance updates.
      Required.
    "hour": "str",  # The hour in UTC at which maintenance updates will be
      applied in 24 hour format. Required.
    "description": [
        "str"  # Optional. A list of strings, each containing information
          about a pending maintenance update.
    ],
    "pending": bool  # Optional. A boolean value indicating whether any
      maintenance is scheduled to be performed in the next window.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_major_version(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_major_version(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Upgrade Major Version for a Database.

To upgrade the major version of a database, send a PUT request to /v2/databases/$DATABASE_ID/upgrade, specifying the target version. A successful request will receive a 204 No Content status code with no body in response.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "version": "str"  # Optional. A string representing the version of the
      database engine in use for the cluster.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_online_migration(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_online_migration(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Start an Online Migration.

To start an online migration, send a PUT request to /v2/databases/$DATABASE_ID/online-migration endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, Caching, and Valkey clusters. If the existing database is continuously being written to, the migration process will continue for up to two weeks unless it is manually stopped. Online migration is only available for MySQL, PostgreSQL, Caching, and Valkey clusters.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "source": {
        "dbname": "str",  # Optional. The name of the default database.
        "host": "str",  # Optional. The FQDN pointing to the database
          cluster's current primary node.
        "password": "str",  # Optional. The randomly generated password for
          the default user.
        "port": 0,  # Optional. The port on which the database cluster is
          listening.
        "username": "str"  # Optional. The default user for the database.
    },
    "disable_ssl": bool,  # Optional. Enables SSL encryption when connecting to
      the source database.
    "ignore_dbs": [
        "str"  # Optional. List of databases that should be ignored during
          migration.
    ]
}

# response body for status code(s): 200
response == {
    "created_at": "str",  # Optional. The time the migration was initiated, in
      ISO 8601 format.
    "id": "str",  # Optional. The ID of the most recent migration.
    "status": "str"  # Optional. The current status of the migration. Known
      values are: "running", "syncing", "canceled", "error", and "done".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_region(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_region(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Migrate a Database Cluster to a New Region.

To migrate a database cluster to a new region, send a PUT request to /v2/databases/$DATABASE_ID/migrate. The body of the request must specify a region attribute.

A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to migrating. This will transition back to online when the migration has completed.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "region": "str"  # A slug identifier for the region to which the database
      cluster will be migrated. Required.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_sql_mode(database_cluster_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_sql_mode(database_cluster_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Update SQL Mode for a Cluster.

To configure the SQL modes for an existing MySQL cluster, send a PUT request to /v2/databases/$DATABASE_ID/sql_mode specifying the desired modes. See the official MySQL 8 documentation for a full list of supported SQL modes. A successful request will receive a 204 No Content status code with no body in response.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "sql_mode": "str"  # A string specifying the configured SQL modes for the
      MySQL cluster. Required.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_user(database_cluster_uuid: str, username: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_user(database_cluster_uuid: str, username: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Database User.

To update an existing database user, send a PUT request to /v2/databases/$DATABASE_ID/users/$USERNAME with the desired settings.

Note: only settings can be updated via this type of request. If you wish to change the name of a user, you must recreate a new user.

The response will be a JSON object with a key called user. The value of this will be an object that contains the name of the update database user, along with the settings object that has been updated.

Parameters:
  • database_cluster_uuid (str) – A unique identifier for a database cluster. Required.

  • username (str) – The name of the database user. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "settings": {
        "acl": [
            {
                "permission": "str",  # Permission set applied to the
                  ACL. 'consume' allows for messages to be consumed from the topic.
                  'produce' allows for messages to be published to the topic.
                  'produceconsume' allows for both 'consume' and 'produce' permission.
                  'admin' allows for 'produceconsume' as well as any operations to
                  administer the topic (delete, update). Required. Known values are:
                  "admin", "consume", "produce", and "produceconsume".
                "topic": "str",  # A regex for matching the topic(s)
                  that this ACL should apply to. Required.
                "id": "str"  # Optional. An identifier for the ACL.
                  Will be computed after the ACL is created/updated.
            }
        ],
        "mongo_user_settings": {
            "databases": [
                "str"  # Optional. A list of databases to which the
                  user should have access. When the database is set to ``admin``"" ,
                  the user will have access to all databases based on the user's role
                  i.e. a user with the role ``readOnly`` assigned to the ``admin``
                  database will have read access to all databases.
            ],
            "role": "str"  # Optional. The role to assign to the user
              with each role mapping to a MongoDB built-in role.  ``readOnly`` maps to
              a `read
              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
              role. ``readWrite`` maps to a `readWrite
              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
              role. ``dbAdmin`` maps to a `dbAdmin
              <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
              role. Known values are: "readOnly", "readWrite", and "dbAdmin".
        },
        "opensearch_acl": [
            {
                "index": "str",  # Optional. A regex for matching the
                  indexes that this ACL should apply to.
                "permission": "str"  # Optional. Permission set
                  applied to the ACL. 'read' allows user to read from the index.
                  'write' allows for user to write to the index. 'readwrite' allows for
                  both 'read' and 'write' permission. 'deny'(default) restricts user
                  from performing any operation over an index. 'admin' allows for
                  'readwrite' as well as any operations to administer the index. Known
                  values are: "deny", "admin", "read", "readwrite", and "write".
            }
        ],
        "pg_allow_replication": bool  # Optional. For Postgres clusters, set
          to ``true`` for a user with replication rights. This option is not currently
          supported for other database engines.
    }
}

# response body for status code(s): 201
response == {
    "user": {
        "name": "str",  # The name of a database user. Required.
        "access_cert": "str",  # Optional. Access certificate for TLS client
          authentication. (Kafka only).
        "access_key": "str",  # Optional. Access key for TLS client
          authentication. (Kafka only).
        "mysql_settings": {
            "auth_plugin": "str"  # A string specifying the
              authentication method to be used for connections to the MySQL user
              account. The valid values are ``mysql_native_password`` or
              ``caching_sha2_password``. If excluded when creating a new user, the
              default for the version of MySQL in use will be used. As of MySQL 8.0,
              the default is ``caching_sha2_password``. Required. Known values are:
              "mysql_native_password" and "caching_sha2_password".
        },
        "password": "str",  # Optional. A randomly generated password for the
          database user.:code:`<br>`Requires ``database:view_credentials`` scope.
        "role": "str",  # Optional. A string representing the database user's
          role. The value will be either "primary" or "normal". Known values are:
          "primary" and "normal".
        "settings": {
            "acl": [
                {
                    "permission": "str",  # Permission set
                      applied to the ACL. 'consume' allows for messages to be consumed
                      from the topic. 'produce' allows for messages to be published to
                      the topic. 'produceconsume' allows for both 'consume' and
                      'produce' permission. 'admin' allows for 'produceconsume' as well
                      as any operations to administer the topic (delete, update).
                      Required. Known values are: "admin", "consume", "produce", and
                      "produceconsume".
                    "topic": "str",  # A regex for matching the
                      topic(s) that this ACL should apply to. Required.
                    "id": "str"  # Optional. An identifier for
                      the ACL. Will be computed after the ACL is created/updated.
                }
            ],
            "mongo_user_settings": {
                "databases": [
                    "str"  # Optional. A list of databases to
                      which the user should have access. When the database is set to
                      ``admin``"" , the user will have access to all databases based on
                      the user's role i.e. a user with the role ``readOnly`` assigned
                      to the ``admin`` database will have read access to all databases.
                ],
                "role": "str"  # Optional. The role to assign to the
                  user with each role mapping to a MongoDB built-in role.  ``readOnly``
                  maps to a `read
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read>`_
                  role. ``readWrite`` maps to a `readWrite
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite>`_
                  role. ``dbAdmin`` maps to a `dbAdmin
                  <https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin>`_
                  role. Known values are: "readOnly", "readWrite", and "dbAdmin".
            },
            "opensearch_acl": [
                {
                    "index": "str",  # Optional. A regex for
                      matching the indexes that this ACL should apply to.
                    "permission": "str"  # Optional. Permission
                      set applied to the ACL. 'read' allows user to read from the
                      index. 'write' allows for user to write to the index. 'readwrite'
                      allows for both 'read' and 'write' permission. 'deny'(default)
                      restricts user from performing any operation over an index.
                      'admin' allows for 'readwrite' as well as any operations to
                      administer the index. Known values are: "deny", "admin", "read",
                      "readwrite", and "write".
                }
            ],
            "pg_allow_replication": bool  # Optional. For Postgres
              clusters, set to ``true`` for a user with replication rights. This option
              is not currently supported for other database engines.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.DedicatedInferencesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s dedicated_inferences attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Dedicated Inference.

Create a new Dedicated Inference for your team. Send a POST request to /v2/dedicated-inferences with a spec object (version, name, region, vpc, enable_public_endpoint, model_deployments) and optional access_tokens (e.g. hugging_face_token for gated models). The response code 202 Accepted indicates the request was accepted for processing; it does not indicate success or failure. The token value is returned only on create; store it securely.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "spec": {
        "enable_public_endpoint": bool,  # Whether to expose a public LLM
          endpoint. Required.
        "model_deployments": [
            {
                "accelerators": [
                    {
                        "accelerator_slug": "str",  #
                          DigitalOcean GPU slug. Required.
                        "scale": 0,  # Number of accelerator
                          instances. Required.
                        "type": "str",  # Accelerator type
                          (e.g. prefill_decode). Required.
                        "status": "str"  # Optional. Current
                          state of the Accelerator. Known values are: "new",
                          "provisioning", and "active".
                    }
                ],
                "model_id": "str",  # Optional. Used to identify an
                  existing deployment when updating; empty means create new.
                "model_provider": "str",  # Optional. Model provider.
                  "hugging_face"
                "model_slug": "str",  # Optional. Model identifier
                  (e.g. Hugging Face slug).
                "workload_config": {}  # Optional. Workload-specific
                  configuration (e.g. ISL/OSL in future).
            }
        ],
        "name": "str",  # Name of the Dedicated Inference. Must be unique
          within the team. Required.
        "region": "str",  # DigitalOcean region where the Dedicated Inference
          is hosted. Required. Known values are: "atl1", "nyc2", and "tor1".
        "version": 0,  # Spec version. Required.
        "vpc": {
            "uuid": "str"  # VPC UUID for the Dedicated Inference.
              Required.
        }
    },
    "access_tokens": {
        "str": "str"  # Optional. Key-value pairs for provider tokens (e.g.
          Hugging Face).
    }
}

# response body for status code(s): 202
response == {
    "dedicated_inference": {
        "created_at": "2020-02-20 00:00:00",  # Optional. When the Dedicated
          Inference was created.
        "endpoints": {
            "private_endpoint_fqdn": "str",  # Optional. Private VPC FQDN
              of the Dedicated Inference instance.
            "public_endpoint_fqdn": "str"  # Optional. Public FQDN of the
              Dedicated Inference instance.
        },
        "id": "str",  # Optional. Unique ID of the Dedicated Inference.
        "pending_deployment_spec": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Pending
              deployment when status is provisioning or updating.
            "enable_public_endpoint": bool,  # Optional. Whether to
              expose a public LLM endpoint.
            "id": "str",  # Optional. Deployment UUID.
            "model_deployments": [
                {
                    "accelerators": [
                        {
                            "accelerator_slug": "str",  #
                              DigitalOcean GPU slug. Required.
                            "scale": 0,  # Number of
                              accelerator instances. Required.
                            "type": "str",  # Accelerator
                              type (e.g. prefill_decode). Required.
                            "status": "str"  # Optional.
                              Current state of the Accelerator. Known values are:
                              "new", "provisioning", and "active".
                        }
                    ],
                    "model_id": "str",  # Optional. Used to
                      identify an existing deployment when updating; empty means create
                      new.
                    "model_provider": "str",  # Optional. Model
                      provider. "hugging_face"
                    "model_slug": "str",  # Optional. Model
                      identifier (e.g. Hugging Face slug).
                    "workload_config": {}  # Optional.
                      Workload-specific configuration (e.g. ISL/OSL in future).
                }
            ],
            "name": "str",  # Optional. Name of the Dedicated Inference.
              Must be unique within the team.
            "status": "str",  # Optional. Known values are:
              "provisioning" and "updating".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Pending
              deployment when status is provisioning or updating.
            "version": 0,  # Optional. Spec version.
            "vpc": {
                "uuid": "str"  # VPC UUID for the Dedicated
                  Inference. Required.
            }
        },
        "region": "str",  # Optional. DigitalOcean region where the Dedicated
          Inference is hosted.
        "spec": {
            "enable_public_endpoint": bool,  # Whether to expose a public
              LLM endpoint. Required.
            "model_deployments": [
                {
                    "accelerators": [
                        {
                            "accelerator_slug": "str",  #
                              DigitalOcean GPU slug. Required.
                            "scale": 0,  # Number of
                              accelerator instances. Required.
                            "type": "str",  # Accelerator
                              type (e.g. prefill_decode). Required.
                            "status": "str"  # Optional.
                              Current state of the Accelerator. Known values are:
                              "new", "provisioning", and "active".
                        }
                    ],
                    "model_id": "str",  # Optional. Used to
                      identify an existing deployment when updating; empty means create
                      new.
                    "model_provider": "str",  # Optional. Model
                      provider. "hugging_face"
                    "model_slug": "str",  # Optional. Model
                      identifier (e.g. Hugging Face slug).
                    "workload_config": {}  # Optional.
                      Workload-specific configuration (e.g. ISL/OSL in future).
                }
            ],
            "name": "str",  # Name of the Dedicated Inference. Must be
              unique within the team. Required.
            "region": "str",  # DigitalOcean region where the Dedicated
              Inference is hosted. Required. Known values are: "atl1", "nyc2", and
              "tor1".
            "version": 0,  # Spec version. Required.
            "vpc": {
                "uuid": "str"  # VPC UUID for the Dedicated
                  Inference. Required.
            }
        },
        "status": "str",  # Optional. Current state of the Dedicated
          Inference. Known values are: "active", "new", "provisioning", "updating",
          "deleting", and "error".
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the Dedicated
          Inference was last updated.
        "vpc_uuid": "str"  # Optional. VPC UUID of the Dedicated Inference.
    },
    "token": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Access token for
          authenticating to Dedicated Inference endpoints.
        "id": "str",  # Optional. Unique ID of the token.
        "is_managed": bool,  # Optional. When true, the token is managed by
          DigitalOcean (for example, system-provisioned). When false, the token was
          created by the user.
        "name": "str",  # Optional. Name of the token.
        "value": "str"  # Optional. Token value; only returned once on
          create. Store securely.
    }
}
create_tokens(dedicated_inference_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_tokens(dedicated_inference_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Dedicated Inference Token.

Create a new access token for a Dedicated Inference instance. Send a POST request to /v2/dedicated-inferences/{dedicated_inference_id}/tokens with a name. The token value is returned only once in the response; store it securely.

Parameters:
  • dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # Name for the new token. Required.
}

# response body for status code(s): 202
response == {
    "token": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Access token for
          authenticating to Dedicated Inference endpoints.
        "id": "str",  # Optional. Unique ID of the token.
        "is_managed": bool,  # Optional. When true, the token is managed by
          DigitalOcean (for example, system-provisioned). When false, the token was
          created by the user.
        "name": "str",  # Optional. Name of the token.
        "value": "str"  # Optional. Token value; only returned once on
          create. Store securely.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(dedicated_inference_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Dedicated Inference.

Delete an existing Dedicated Inference. Send a DELETE request to /v2/dedicated-inferences/{dedicated_inference_id}. The response 202 Accepted indicates the request was accepted for processing.

Parameters:

dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_tokens(dedicated_inference_id: str, token_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Revoke a Dedicated Inference Token.

Revoke (delete) an access token for a Dedicated Inference instance. Send a DELETE request to /v2/dedicated-inferences/{dedicated_inference_id}/tokens/{token_id}.

Parameters:
  • dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

  • token_id (str) – A unique identifier for a Dedicated Inference access token. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(dedicated_inference_id: str, **kwargs: Any) MutableMapping[str, Any]

Get a Dedicated Inference.

Retrieve an existing Dedicated Inference by ID. Send a GET request to /v2/dedicated-inferences/{dedicated_inference_id}. The status in the response is one of active, new, provisioning, updating, deleting, or error.

Parameters:

dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "dedicated_inference": {
        "created_at": "2020-02-20 00:00:00",  # Optional. When the Dedicated
          Inference was created.
        "endpoints": {
            "private_endpoint_fqdn": "str",  # Optional. Private VPC FQDN
              of the Dedicated Inference instance.
            "public_endpoint_fqdn": "str"  # Optional. Public FQDN of the
              Dedicated Inference instance.
        },
        "id": "str",  # Optional. Unique ID of the Dedicated Inference.
        "pending_deployment_spec": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Pending
              deployment when status is provisioning or updating.
            "enable_public_endpoint": bool,  # Optional. Whether to
              expose a public LLM endpoint.
            "id": "str",  # Optional. Deployment UUID.
            "model_deployments": [
                {
                    "accelerators": [
                        {
                            "accelerator_slug": "str",  #
                              DigitalOcean GPU slug. Required.
                            "scale": 0,  # Number of
                              accelerator instances. Required.
                            "type": "str",  # Accelerator
                              type (e.g. prefill_decode). Required.
                            "status": "str"  # Optional.
                              Current state of the Accelerator. Known values are:
                              "new", "provisioning", and "active".
                        }
                    ],
                    "model_id": "str",  # Optional. Used to
                      identify an existing deployment when updating; empty means create
                      new.
                    "model_provider": "str",  # Optional. Model
                      provider. "hugging_face"
                    "model_slug": "str",  # Optional. Model
                      identifier (e.g. Hugging Face slug).
                    "workload_config": {}  # Optional.
                      Workload-specific configuration (e.g. ISL/OSL in future).
                }
            ],
            "name": "str",  # Optional. Name of the Dedicated Inference.
              Must be unique within the team.
            "status": "str",  # Optional. Known values are:
              "provisioning" and "updating".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Pending
              deployment when status is provisioning or updating.
            "version": 0,  # Optional. Spec version.
            "vpc": {
                "uuid": "str"  # VPC UUID for the Dedicated
                  Inference. Required.
            }
        },
        "region": "str",  # Optional. DigitalOcean region where the Dedicated
          Inference is hosted.
        "spec": {
            "enable_public_endpoint": bool,  # Whether to expose a public
              LLM endpoint. Required.
            "model_deployments": [
                {
                    "accelerators": [
                        {
                            "accelerator_slug": "str",  #
                              DigitalOcean GPU slug. Required.
                            "scale": 0,  # Number of
                              accelerator instances. Required.
                            "type": "str",  # Accelerator
                              type (e.g. prefill_decode). Required.
                            "status": "str"  # Optional.
                              Current state of the Accelerator. Known values are:
                              "new", "provisioning", and "active".
                        }
                    ],
                    "model_id": "str",  # Optional. Used to
                      identify an existing deployment when updating; empty means create
                      new.
                    "model_provider": "str",  # Optional. Model
                      provider. "hugging_face"
                    "model_slug": "str",  # Optional. Model
                      identifier (e.g. Hugging Face slug).
                    "workload_config": {}  # Optional.
                      Workload-specific configuration (e.g. ISL/OSL in future).
                }
            ],
            "name": "str",  # Name of the Dedicated Inference. Must be
              unique within the team. Required.
            "region": "str",  # DigitalOcean region where the Dedicated
              Inference is hosted. Required. Known values are: "atl1", "nyc2", and
              "tor1".
            "version": 0,  # Spec version. Required.
            "vpc": {
                "uuid": "str"  # VPC UUID for the Dedicated
                  Inference. Required.
            }
        },
        "status": "str",  # Optional. Current state of the Dedicated
          Inference. Known values are: "active", "new", "provisioning", "updating",
          "deleting", and "error".
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the Dedicated
          Inference was last updated.
        "vpc_uuid": "str"  # Optional. VPC UUID of the Dedicated Inference.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_accelerator(dedicated_inference_id: str, accelerator_id: str, **kwargs: Any) MutableMapping[str, Any]

Get a Dedicated Inference Accelerator.

Retrieve a single accelerator by ID for a Dedicated Inference instance. Send a GET request to /v2/dedicated-inferences/{dedicated_inference_id}/accelerators/{accelerator_id}.

Parameters:
  • dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

  • accelerator_id (str) – A unique identifier for a Dedicated Inference accelerator. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "created_at": "2020-02-20 00:00:00",  # Optional.
    "id": "str",  # Optional. Unique ID of the accelerator.
    "name": "str",  # Optional. Name of the accelerator.
    "role": "str",  # Optional. Role of the accelerator (e.g. prefill_decode).
    "slug": "str",  # Optional. DigitalOcean GPU slug.
    "status": "str"  # Optional. Status of the accelerator.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_ca(dedicated_inference_id: str, **kwargs: Any) MutableMapping[str, Any]

Get Dedicated Inference CA Certificate.

Get the CA certificate for a Dedicated Inference instance (base64-encoded). Required for private endpoint connectivity. Send a GET request to /v2/dedicated-inferences/{dedicated_inference_id}/ca.

Parameters:

dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "cert": "str"  # Base64-encoded CA certificate. Required.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_gpu_model_config(**kwargs: Any) MutableMapping[str, Any]

Get Dedicated Inference GPU Model Config.

Get supported GPU and model configurations for Dedicated Inference. Use this to discover supported GPU slugs and model slugs (e.g. Hugging Face). Send a GET request to /v2/dedicated-inferences/gpu-model-config.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "gpu_model_configs": [
        {
            "gpu_slugs": [
                "str"  # Optional.
            ],
            "is_gated_model": bool,  # Optional. Whether the model
              requires gated access (e.g. Hugging Face token).
            "model_name": "str",  # Optional.
            "model_slug": "str"  # Optional.
        }
    ]
}
list(*, per_page: int = 20, page: int = 1, region: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List Dedicated Inferences.

List all Dedicated Inference instances for your team. Send a GET request to /v2/dedicated-inferences. You may filter by region and use page and per_page for pagination.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • region (str) – Filter by region. Dedicated Inference is only available in nyc2, tor1, and atl1. Known values are: “nyc2”, “tor1”, and “atl1”. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "dedicated_inferences": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. When the
              Dedicated Inference was created.
            "endpoints": {
                "private_endpoint_fqdn": "str",  # Optional. Private
                  VPC FQDN of the Dedicated Inference instance.
                "public_endpoint_fqdn": "str"  # Optional. Public
                  FQDN of the Dedicated Inference instance.
            },
            "id": "str",  # Optional. Unique ID of the Dedicated
              Inference.
            "pending_deployment_spec": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Pending deployment when status is provisioning or updating.
                "enable_public_endpoint": bool,  # Optional. Whether
                  to expose a public LLM endpoint.
                "id": "str",  # Optional. Deployment UUID.
                "model_deployments": [
                    {
                        "accelerators": [
                            {
                                "accelerator_slug":
                                  "str",  # DigitalOcean GPU slug. Required.
                                "scale": 0,  # Number
                                  of accelerator instances. Required.
                                "type": "str",  #
                                  Accelerator type (e.g. prefill_decode). Required.
                                "status": "str"  #
                                  Optional. Current state of the Accelerator. Known
                                  values are: "new", "provisioning", and "active".
                            }
                        ],
                        "model_id": "str",  # Optional. Used
                          to identify an existing deployment when updating; empty means
                          create new.
                        "model_provider": "str",  # Optional.
                          Model provider. "hugging_face"
                        "model_slug": "str",  # Optional.
                          Model identifier (e.g. Hugging Face slug).
                        "workload_config": {}  # Optional.
                          Workload-specific configuration (e.g. ISL/OSL in future).
                    }
                ],
                "name": "str",  # Optional. Name of the Dedicated
                  Inference. Must be unique within the team.
                "status": "str",  # Optional. Known values are:
                  "provisioning" and "updating".
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Pending deployment when status is provisioning or updating.
                "version": 0,  # Optional. Spec version.
                "vpc": {
                    "uuid": "str"  # VPC UUID for the Dedicated
                      Inference. Required.
                }
            },
            "region": "str",  # Optional. DigitalOcean region where the
              Dedicated Inference is hosted.
            "spec": {
                "enable_public_endpoint": bool,  # Whether to expose
                  a public LLM endpoint. Required.
                "model_deployments": [
                    {
                        "accelerators": [
                            {
                                "accelerator_slug":
                                  "str",  # DigitalOcean GPU slug. Required.
                                "scale": 0,  # Number
                                  of accelerator instances. Required.
                                "type": "str",  #
                                  Accelerator type (e.g. prefill_decode). Required.
                                "status": "str"  #
                                  Optional. Current state of the Accelerator. Known
                                  values are: "new", "provisioning", and "active".
                            }
                        ],
                        "model_id": "str",  # Optional. Used
                          to identify an existing deployment when updating; empty means
                          create new.
                        "model_provider": "str",  # Optional.
                          Model provider. "hugging_face"
                        "model_slug": "str",  # Optional.
                          Model identifier (e.g. Hugging Face slug).
                        "workload_config": {}  # Optional.
                          Workload-specific configuration (e.g. ISL/OSL in future).
                    }
                ],
                "name": "str",  # Name of the Dedicated Inference.
                  Must be unique within the team. Required.
                "region": "str",  # DigitalOcean region where the
                  Dedicated Inference is hosted. Required. Known values are: "atl1",
                  "nyc2", and "tor1".
                "version": 0,  # Spec version. Required.
                "vpc": {
                    "uuid": "str"  # VPC UUID for the Dedicated
                      Inference. Required.
                }
            },
            "status": "str",  # Optional. Current state of the Dedicated
              Inference. Known values are: "active", "new", "provisioning", "updating",
              "deleting", and "error".
            "updated_at": "2020-02-20 00:00:00",  # Optional. When the
              Dedicated Inference was last updated.
            "vpc_uuid": "str"  # Optional. VPC UUID of the Dedicated
              Inference.
        }
    ],
    "links": {
        "pages": {
            "str": "str"  # Optional. Pagination links (first, prev,
              next, last).
        }
    },
    "meta": {
        "total": 0  # Total number of results. Required.
    }
}
list_accelerators(dedicated_inference_id: str, *, per_page: int = 20, page: int = 1, slug: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List Dedicated Inference Accelerators.

List all accelerators (GPUs) in use by a Dedicated Inference instance. Send a GET request to /v2/dedicated-inferences/{dedicated_inference_id}/accelerators. Optionally filter by slug and use page/per_page for pagination.

Parameters:
  • dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • slug (str) – Filter accelerators by GPU slug. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "accelerators": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional.
            "id": "str",  # Optional. Unique ID of the accelerator.
            "name": "str",  # Optional. Name of the accelerator.
            "role": "str",  # Optional. Role of the accelerator (e.g.
              prefill_decode).
            "slug": "str",  # Optional. DigitalOcean GPU slug.
            "status": "str"  # Optional. Status of the accelerator.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_sizes(**kwargs: Any) MutableMapping[str, Any]

List Dedicated Inference Sizes.

Get available Dedicated Inference sizes and pricing for supported GPUs. Send a GET request to /v2/dedicated-inferences/sizes.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "enabled_regions": [
        "str"  # Optional. Regions where Dedicated Inference is available.
    ],
    "sizes": [
        {
            "currency": "str",  # Optional.
            "gpu_slug": "str",  # Optional.
            "price_per_hour": "str",  # Optional.
            "region": "str"  # Optional.
        }
    ]
}
list_tokens(dedicated_inference_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Dedicated Inference Tokens.

List all access tokens for a Dedicated Inference instance. Token values are not returned; only id, name, created_at, and is_managed. Send a GET request to /v2/dedicated-inferences/{dedicated_inference_id}/tokens.

Parameters:
  • dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "tokens": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional.
            "id": "str",  # Optional. Unique ID of the token.
            "is_managed": bool,  # Optional. When true, the token is
              managed by DigitalOcean (for example, system-provisioned). When false,
              the token was created by the user.
            "name": "str",  # Optional. Name of the token.
            "value": "str"  # Optional. Token value; only returned once
              on create. Store securely.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch(dedicated_inference_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(dedicated_inference_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Dedicated Inference.

Update an existing Dedicated Inference. Send a PATCH request to /v2/dedicated-inferences/{dedicated_inference_id} with updated spec and/or access_tokens. Status will move to updating and return to active when done.

Parameters:
  • dedicated_inference_id (str) – A unique identifier for a Dedicated Inference instance. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "access_tokens": {
        "hugging_face_token": "str"  # Optional. Hugging Face token required
          for gated models.
    },
    "spec": {
        "enable_public_endpoint": bool,  # Whether to expose a public LLM
          endpoint. Required.
        "model_deployments": [
            {
                "accelerators": [
                    {
                        "accelerator_slug": "str",  #
                          DigitalOcean GPU slug. Required.
                        "scale": 0,  # Number of accelerator
                          instances. Required.
                        "type": "str",  # Accelerator type
                          (e.g. prefill_decode). Required.
                        "status": "str"  # Optional. Current
                          state of the Accelerator. Known values are: "new",
                          "provisioning", and "active".
                    }
                ],
                "model_id": "str",  # Optional. Used to identify an
                  existing deployment when updating; empty means create new.
                "model_provider": "str",  # Optional. Model provider.
                  "hugging_face"
                "model_slug": "str",  # Optional. Model identifier
                  (e.g. Hugging Face slug).
                "workload_config": {}  # Optional. Workload-specific
                  configuration (e.g. ISL/OSL in future).
            }
        ],
        "name": "str",  # Name of the Dedicated Inference. Must be unique
          within the team. Required.
        "region": "str",  # DigitalOcean region where the Dedicated Inference
          is hosted. Required. Known values are: "atl1", "nyc2", and "tor1".
        "version": 0,  # Spec version. Required.
        "vpc": {
            "uuid": "str"  # VPC UUID for the Dedicated Inference.
              Required.
        }
    }
}

# response body for status code(s): 202
response == {
    "dedicated_inference": {
        "created_at": "2020-02-20 00:00:00",  # Optional. When the Dedicated
          Inference was created.
        "endpoints": {
            "private_endpoint_fqdn": "str",  # Optional. Private VPC FQDN
              of the Dedicated Inference instance.
            "public_endpoint_fqdn": "str"  # Optional. Public FQDN of the
              Dedicated Inference instance.
        },
        "id": "str",  # Optional. Unique ID of the Dedicated Inference.
        "pending_deployment_spec": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Pending
              deployment when status is provisioning or updating.
            "enable_public_endpoint": bool,  # Optional. Whether to
              expose a public LLM endpoint.
            "id": "str",  # Optional. Deployment UUID.
            "model_deployments": [
                {
                    "accelerators": [
                        {
                            "accelerator_slug": "str",  #
                              DigitalOcean GPU slug. Required.
                            "scale": 0,  # Number of
                              accelerator instances. Required.
                            "type": "str",  # Accelerator
                              type (e.g. prefill_decode). Required.
                            "status": "str"  # Optional.
                              Current state of the Accelerator. Known values are:
                              "new", "provisioning", and "active".
                        }
                    ],
                    "model_id": "str",  # Optional. Used to
                      identify an existing deployment when updating; empty means create
                      new.
                    "model_provider": "str",  # Optional. Model
                      provider. "hugging_face"
                    "model_slug": "str",  # Optional. Model
                      identifier (e.g. Hugging Face slug).
                    "workload_config": {}  # Optional.
                      Workload-specific configuration (e.g. ISL/OSL in future).
                }
            ],
            "name": "str",  # Optional. Name of the Dedicated Inference.
              Must be unique within the team.
            "status": "str",  # Optional. Known values are:
              "provisioning" and "updating".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Pending
              deployment when status is provisioning or updating.
            "version": 0,  # Optional. Spec version.
            "vpc": {
                "uuid": "str"  # VPC UUID for the Dedicated
                  Inference. Required.
            }
        },
        "region": "str",  # Optional. DigitalOcean region where the Dedicated
          Inference is hosted.
        "spec": {
            "enable_public_endpoint": bool,  # Whether to expose a public
              LLM endpoint. Required.
            "model_deployments": [
                {
                    "accelerators": [
                        {
                            "accelerator_slug": "str",  #
                              DigitalOcean GPU slug. Required.
                            "scale": 0,  # Number of
                              accelerator instances. Required.
                            "type": "str",  # Accelerator
                              type (e.g. prefill_decode). Required.
                            "status": "str"  # Optional.
                              Current state of the Accelerator. Known values are:
                              "new", "provisioning", and "active".
                        }
                    ],
                    "model_id": "str",  # Optional. Used to
                      identify an existing deployment when updating; empty means create
                      new.
                    "model_provider": "str",  # Optional. Model
                      provider. "hugging_face"
                    "model_slug": "str",  # Optional. Model
                      identifier (e.g. Hugging Face slug).
                    "workload_config": {}  # Optional.
                      Workload-specific configuration (e.g. ISL/OSL in future).
                }
            ],
            "name": "str",  # Name of the Dedicated Inference. Must be
              unique within the team. Required.
            "region": "str",  # DigitalOcean region where the Dedicated
              Inference is hosted. Required. Known values are: "atl1", "nyc2", and
              "tor1".
            "version": 0,  # Spec version. Required.
            "vpc": {
                "uuid": "str"  # VPC UUID for the Dedicated
                  Inference. Required.
            }
        },
        "status": "str",  # Optional. Current state of the Dedicated
          Inference. Known values are: "active", "new", "provisioning", "updating",
          "deleting", and "error".
        "updated_at": "2020-02-20 00:00:00",  # Optional. When the Dedicated
          Inference was last updated.
        "vpc_uuid": "str"  # Optional. VPC UUID of the Dedicated Inference.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.DomainsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s domains attribute.

create(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Domain.

To create a new domain, send a POST request to /v2/domains. Set the “name” attribute to the domain name you are adding. Optionally, you may set the “ip_address” attribute, and an A record will be automatically created pointing to the apex domain.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "ip_address": "str",  # Optional. This optional attribute may contain an IP
      address. When provided, an A record will be automatically created pointing to the
      apex domain.
    "name": "str",  # Optional. The name of the domain itself. This should follow
      the standard domain format of domain.TLD. For instance, ``example.com`` is a
      valid domain name.
    "ttl": 0,  # Optional. This value is the time to live for the records on this
      domain, in seconds. This defines the time frame that clients can cache queried
      information before a refresh should be requested.
    "zone_file": "str"  # Optional. This attribute contains the complete contents
      of the zone file for the selected domain. Individual domain record resources
      should be used to get more granular control over records. However, this attribute
      can also be used to get information about the SOA record, which is created
      automatically and is not accessible as an individual record resource.
}

# response body for status code(s): 201
response == {
    "domain": {
        "ip_address": "str",  # Optional. This optional attribute may contain
          an IP address. When provided, an A record will be automatically created
          pointing to the apex domain.
        "name": "str",  # Optional. The name of the domain itself. This
          should follow the standard domain format of domain.TLD. For instance,
          ``example.com`` is a valid domain name.
        "ttl": 0,  # Optional. This value is the time to live for the records
          on this domain, in seconds. This defines the time frame that clients can
          cache queried information before a refresh should be requested.
        "zone_file": "str"  # Optional. This attribute contains the complete
          contents of the zone file for the selected domain. Individual domain record
          resources should be used to get more granular control over records. However,
          this attribute can also be used to get information about the SOA record,
          which is created automatically and is not accessible as an individual record
          resource.
    }
}
create_record(domain_name: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_record(domain_name: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Domain Record.

To create a new record to a domain, send a POST request to /v2/domains/$DOMAIN_NAME/records.

The request must include all of the required fields for the domain record type being added.

See the attribute table for details regarding record types and their respective required attributes.

Parameters:
  • domain_name (str) – The name of the domain itself. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "domain_record": {
        "type": "str",  # The type of the DNS record. For example: A, CNAME,
          TXT, ... Required.
        "data": "str",  # Optional. Variable data depending on record type.
          For example, the "data" value for an A record would be the IPv4 address to
          which the domain will be mapped. For a CAA record, it would contain the
          domain name of the CA being granted permission to issue certificates.
        "flags": 0,  # Optional. An unsigned integer between 0-255 used for
          CAA records.
        "id": 0,  # Optional. A unique identifier for each domain record.
        "name": "str",  # Optional. The host name, alias, or service being
          defined by the record.
        "port": 0,  # Optional. The port for SRV records.
        "priority": 0,  # Optional. The priority for SRV and MX records.
        "tag": "str",  # Optional. The parameter tag for CAA records. Valid
          values are "issue", "issuewild", or "iodef".
        "ttl": 0,  # Optional. This value is the time to live for the record,
          in seconds. This defines the time frame that clients can cache queried
          information before a refresh should be requested.
        "weight": 0  # Optional. The weight for SRV records.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(domain_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Domain.

To delete a domain, send a DELETE request to /v2/domains/$DOMAIN_NAME.

Parameters:

domain_name (str) – The name of the domain itself. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_record(domain_name: str, domain_record_id: int, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Domain Record.

To delete a record for a domain, send a DELETE request to /v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID.

The record will be deleted and the response status will be a 204. This indicates a successful request with no body returned.

Parameters:
  • domain_name (str) – The name of the domain itself. Required.

  • domain_record_id (int) – The unique identifier of the domain record. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(domain_name: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Domain.

To get details about a specific domain, send a GET request to /v2/domains/$DOMAIN_NAME.

Parameters:

domain_name (str) – The name of the domain itself. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "domain": {
        "ip_address": "str",  # Optional. This optional attribute may contain
          an IP address. When provided, an A record will be automatically created
          pointing to the apex domain.
        "name": "str",  # Optional. The name of the domain itself. This
          should follow the standard domain format of domain.TLD. For instance,
          ``example.com`` is a valid domain name.
        "ttl": 0,  # Optional. This value is the time to live for the records
          on this domain, in seconds. This defines the time frame that clients can
          cache queried information before a refresh should be requested.
        "zone_file": "str"  # Optional. This attribute contains the complete
          contents of the zone file for the selected domain. Individual domain record
          resources should be used to get more granular control over records. However,
          this attribute can also be used to get information about the SOA record,
          which is created automatically and is not accessible as an individual record
          resource.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_record(domain_name: str, domain_record_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Domain Record.

To retrieve a specific domain record, send a GET request to /v2/domains/$DOMAIN_NAME/records/$RECORD_ID.

Parameters:
  • domain_name (str) – The name of the domain itself. Required.

  • domain_record_id (int) – The unique identifier of the domain record. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "domain_record": {
        "type": "str",  # The type of the DNS record. For example: A, CNAME,
          TXT, ... Required.
        "data": "str",  # Optional. Variable data depending on record type.
          For example, the "data" value for an A record would be the IPv4 address to
          which the domain will be mapped. For a CAA record, it would contain the
          domain name of the CA being granted permission to issue certificates.
        "flags": 0,  # Optional. An unsigned integer between 0-255 used for
          CAA records.
        "id": 0,  # Optional. A unique identifier for each domain record.
        "name": "str",  # Optional. The host name, alias, or service being
          defined by the record.
        "port": 0,  # Optional. The port for SRV records.
        "priority": 0,  # Optional. The priority for SRV and MX records.
        "tag": "str",  # Optional. The parameter tag for CAA records. Valid
          values are "issue", "issuewild", or "iodef".
        "ttl": 0,  # Optional. This value is the time to live for the record,
          in seconds. This defines the time frame that clients can cache queried
          information before a refresh should be requested.
        "weight": 0  # Optional. The weight for SRV records.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Domains.

To retrieve a list of all of the domains in your account, send a GET request to /v2/domains.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "domains": [
        {
            "ip_address": "str",  # Optional. This optional attribute may
              contain an IP address. When provided, an A record will be automatically
              created pointing to the apex domain.
            "name": "str",  # Optional. The name of the domain itself.
              This should follow the standard domain format of domain.TLD. For
              instance, ``example.com`` is a valid domain name.
            "ttl": 0,  # Optional. This value is the time to live for the
              records on this domain, in seconds. This defines the time frame that
              clients can cache queried information before a refresh should be
              requested.
            "zone_file": "str"  # Optional. This attribute contains the
              complete contents of the zone file for the selected domain. Individual
              domain record resources should be used to get more granular control over
              records. However, this attribute can also be used to get information
              about the SOA record, which is created automatically and is not
              accessible as an individual record resource.
        }
    ],
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    }
}
list_records(domain_name: str, *, name: Optional[str] = None, type: Optional[str] = None, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Domain Records.

To get a listing of all records configured for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records. The list of records returned can be filtered by using the name and type query parameters. For example, to only include A records for a domain, send a GET request to /v2/domains/$DOMAIN_NAME/records?type=A. name must be a fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to /v2/domains/$DOMAIN_NAME/records?name=sub.example.com. Both name and type may be used together.

Parameters:
  • domain_name (str) – The name of the domain itself. Required.

  • name (str) – A fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to /v2/domains/$DOMAIN_NAME/records?name=sub.example.com. Default value is None.

  • type (str) – The type of the DNS record. For example: A, CNAME, TXT, … Known values are: “A”, “AAAA”, “CAA”, “CNAME”, “MX”, “NS”, “SOA”, “SRV”, and “TXT”. Default value is None.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "domain_records": [
        {
            "type": "str",  # The type of the DNS record. For example: A,
              CNAME, TXT, ... Required.
            "data": "str",  # Optional. Variable data depending on record
              type. For example, the "data" value for an A record would be the IPv4
              address to which the domain will be mapped. For a CAA record, it would
              contain the domain name of the CA being granted permission to issue
              certificates.
            "flags": 0,  # Optional. An unsigned integer between 0-255
              used for CAA records.
            "id": 0,  # Optional. A unique identifier for each domain
              record.
            "name": "str",  # Optional. The host name, alias, or service
              being defined by the record.
            "port": 0,  # Optional. The port for SRV records.
            "priority": 0,  # Optional. The priority for SRV and MX
              records.
            "tag": "str",  # Optional. The parameter tag for CAA records.
              Valid values are "issue", "issuewild", or "iodef".
            "ttl": 0,  # Optional. This value is the time to live for the
              record, in seconds. This defines the time frame that clients can cache
              queried information before a refresh should be requested.
            "weight": 0  # Optional. The weight for SRV records.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch_record(domain_name: str, domain_record_id: int, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch_record(domain_name: str, domain_record_id: int, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Domain Record.

To update an existing record, send a PATCH request to /v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID. Any attribute valid for the record type can be set to a new value for the record.

See the attribute table for details regarding record types and their respective attributes.

Parameters:
  • domain_name (str) – The name of the domain itself. Required.

  • domain_record_id (int) – The unique identifier of the domain record. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "type": "str",  # The type of the DNS record. For example: A, CNAME, TXT, ...
      Required.
    "data": "str",  # Optional. Variable data depending on record type. For
      example, the "data" value for an A record would be the IPv4 address to which the
      domain will be mapped. For a CAA record, it would contain the domain name of the
      CA being granted permission to issue certificates.
    "flags": 0,  # Optional. An unsigned integer between 0-255 used for CAA
      records.
    "id": 0,  # Optional. A unique identifier for each domain record.
    "name": "str",  # Optional. The host name, alias, or service being defined by
      the record.
    "port": 0,  # Optional. The port for SRV records.
    "priority": 0,  # Optional. The priority for SRV and MX records.
    "tag": "str",  # Optional. The parameter tag for CAA records. Valid values
      are "issue", "issuewild", or "iodef".
    "ttl": 0,  # Optional. This value is the time to live for the record, in
      seconds. This defines the time frame that clients can cache queried information
      before a refresh should be requested.
    "weight": 0  # Optional. The weight for SRV records.
}

# response body for status code(s): 200
response == {
    "domain_record": {
        "type": "str",  # The type of the DNS record. For example: A, CNAME,
          TXT, ... Required.
        "data": "str",  # Optional. Variable data depending on record type.
          For example, the "data" value for an A record would be the IPv4 address to
          which the domain will be mapped. For a CAA record, it would contain the
          domain name of the CA being granted permission to issue certificates.
        "flags": 0,  # Optional. An unsigned integer between 0-255 used for
          CAA records.
        "id": 0,  # Optional. A unique identifier for each domain record.
        "name": "str",  # Optional. The host name, alias, or service being
          defined by the record.
        "port": 0,  # Optional. The port for SRV records.
        "priority": 0,  # Optional. The priority for SRV and MX records.
        "tag": "str",  # Optional. The parameter tag for CAA records. Valid
          values are "issue", "issuewild", or "iodef".
        "ttl": 0,  # Optional. This value is the time to live for the record,
          in seconds. This defines the time frame that clients can cache queried
          information before a refresh should be requested.
        "weight": 0  # Optional. The weight for SRV records.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_record(domain_name: str, domain_record_id: int, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_record(domain_name: str, domain_record_id: int, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Domain Record.

To update an existing record, send a PUT request to /v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID. Any attribute valid for the record type can be set to a new value for the record.

See the attribute table for details regarding record types and their respective attributes.

Parameters:
  • domain_name (str) – The name of the domain itself. Required.

  • domain_record_id (int) – The unique identifier of the domain record. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "type": "str",  # The type of the DNS record. For example: A, CNAME, TXT, ...
      Required.
    "data": "str",  # Optional. Variable data depending on record type. For
      example, the "data" value for an A record would be the IPv4 address to which the
      domain will be mapped. For a CAA record, it would contain the domain name of the
      CA being granted permission to issue certificates.
    "flags": 0,  # Optional. An unsigned integer between 0-255 used for CAA
      records.
    "id": 0,  # Optional. A unique identifier for each domain record.
    "name": "str",  # Optional. The host name, alias, or service being defined by
      the record.
    "port": 0,  # Optional. The port for SRV records.
    "priority": 0,  # Optional. The priority for SRV and MX records.
    "tag": "str",  # Optional. The parameter tag for CAA records. Valid values
      are "issue", "issuewild", or "iodef".
    "ttl": 0,  # Optional. This value is the time to live for the record, in
      seconds. This defines the time frame that clients can cache queried information
      before a refresh should be requested.
    "weight": 0  # Optional. The weight for SRV records.
}

# response body for status code(s): 200
response == {
    "domain_record": {
        "type": "str",  # The type of the DNS record. For example: A, CNAME,
          TXT, ... Required.
        "data": "str",  # Optional. Variable data depending on record type.
          For example, the "data" value for an A record would be the IPv4 address to
          which the domain will be mapped. For a CAA record, it would contain the
          domain name of the CA being granted permission to issue certificates.
        "flags": 0,  # Optional. An unsigned integer between 0-255 used for
          CAA records.
        "id": 0,  # Optional. A unique identifier for each domain record.
        "name": "str",  # Optional. The host name, alias, or service being
          defined by the record.
        "port": 0,  # Optional. The port for SRV records.
        "priority": 0,  # Optional. The priority for SRV and MX records.
        "tag": "str",  # Optional. The parameter tag for CAA records. Valid
          values are "issue", "issuewild", or "iodef".
        "ttl": 0,  # Optional. This value is the time to live for the record,
          in seconds. This defines the time frame that clients can cache queried
          information before a refresh should be requested.
        "weight": 0  # Optional. The weight for SRV records.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.DropletActionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s droplet_actions attribute.

get(droplet_id: int, action_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve a Droplet Action.

To retrieve a Droplet action, send a GET request to /v2/droplets/$DROPLET_ID/actions/$ACTION_ID.

The response will be a JSON object with a key called action. The value will be a Droplet action object.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • action_id (int) – A unique numeric ID that can be used to identify and reference an action. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional. A unique identifier for the resource
          that the action is associated with.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "transfer" to represent the state of
          an image transfer action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(droplet_id: int, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Actions for a Droplet.

To retrieve a list of all actions that have been executed for a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/actions.

The results will be returned as a JSON object with an actions key. This will be set to an array filled with action objects containing the standard action attributes.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "actions": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was completed.
            "id": 0,  # Optional. A unique numeric ID that can be used to
              identify and reference an action.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": "str",  # Optional. A human-readable string
              that is used as a unique identifier for each region.
            "resource_id": 0,  # Optional. A unique identifier for the
              resource that the action is associated with.
            "resource_type": "str",  # Optional. The type of resource
              that the action is associated with.
            "started_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was initiated.
            "status": "in-progress",  # Optional. Default value is
              "in-progress". The current status of the action. This can be
              "in-progress", "completed", or "errored". Known values are:
              "in-progress", "completed", and "errored".
            "type": "str"  # Optional. This is the type of action that
              the object represents. For example, this could be "transfer" to represent
              the state of an image transfer action.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post(droplet_id: int, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
post(droplet_id: int, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate a Droplet Action.

To initiate an action on a Droplet send a POST request to /v2/droplets/$DROPLET_ID/actions. In the JSON body to the request, set the type attribute to one of the supported action types:

way, similar to using the reboot command from the console.
  • <nobr>`droplet:update`</nobr>

    • <nobr>`power_cycle`</nobr>

    • Power cycles a Droplet. A powercycle action is similar to pushing the reset button

on a physical machine, it’s similar to booting from scratch.
  • <nobr>`droplet:update`</nobr>

    • <nobr>`shutdown`</nobr>

    • Shuts down a Droplet. A shutdown action is an attempt to shutdown the Droplet in a

graceful way, similar to using the shutdown command from the console. Since a shutdown command can fail, this action guarantees that the command is issued, not that it succeeds. The preferred way to turn off a Droplet is to attempt a shutdown, with a reasonable timeout, followed by a power_off action to ensure the Droplet is off.

  • <nobr>`droplet:update`</nobr>

    • <nobr>`power_off`</nobr>

    • Powers off a Droplet. A power_off event is a hard shutdown and should only be used

if the shutdown action is not successful. It is similar to cutting the power on a server and could lead to complications.

  • <nobr>`droplet:update`</nobr>

    • <nobr>`power_on`</nobr>

    • Powers on a Droplet.

    • <nobr>`droplet:update`</nobr>

    • <nobr>`restore`</nobr>

    • Restore a Droplet using a backup image. The image ID that is passed in must be a backup

of the current Droplet instance. The operation will leave any embedded SSH keys intact.
  • <nobr>`droplet:update`</nobr><br><nobr>`droplet:admin`</nobr>

    • <nobr>`password_reset`</nobr>

    • Resets the root password for a Droplet. A new password will be provided via email. It

must be changed after first use.
  • <nobr>`droplet:update`</nobr><br><nobr>`droplet:admin`</nobr>

    • <nobr>`resize`</nobr>

    • Resizes a Droplet. Set the size attribute to a size slug. If a permanent resize with

disk changes included is desired, set the disk attribute to true.
  • <nobr>`droplet:update`</nobr><br><nobr>`droplet:create`</nobr>

    • <nobr>`rebuild`</nobr>

    • Rebuilds a Droplet from a new base image. Set the image attribute to an image ID or

slug.
  • <nobr>`droplet:update`</nobr><br><nobr>`droplet:admin`</nobr>

    • <nobr>`rename`</nobr>

    • Renames a Droplet.

    • <nobr>`droplet:update`</nobr>

    • <nobr>`change_kernel`</nobr>

    • Changes a Droplet’s kernel. Only applies to Droplets with externally managed kernels.

All Droplets created after March 2017 use internal kernels by default.
  • <nobr>`droplet:update`</nobr>

    • <nobr>`enable_ipv6`</nobr>

    • Enables IPv6 for a Droplet. Once enabled for a Droplet, IPv6 can not be disabled. When

enabling IPv6 on an existing Droplet, additional OS-level configuration is required.

  • <nobr>`droplet:update`</nobr>

    • <nobr>`snapshot`</nobr>

    • Takes a snapshot of a Droplet.

    • <nobr>`droplet:update`</nobr><br><nobr>`image:create`</nobr>.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • body (JSON or IO[bytes]) – The type attribute set in the request body will specify the action that will be taken on the Droplet. Some actions will require additional attributes to be set as well. Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional. A unique identifier for the resource
          that the action is associated with.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "transfer" to represent the state of
          an image transfer action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post_by_tag(body: Optional[JSON] = None, *, tag_name: Optional[str] = None, content_type: str = 'application/json', **kwargs: Any) JSON
post_by_tag(body: Optional[IO[bytes]] = None, *, tag_name: Optional[str] = None, content_type: str = 'application/json', **kwargs: Any) JSON

Acting on Tagged Droplets.

Some actions can be performed in bulk on tagged Droplets. The actions can be initiated by sending a POST to /v2/droplets/actions?tag_name=$TAG_NAME with the action arguments.

Only a sub-set of action types are supported:

  • power_cycle

  • power_on

  • power_off

  • shutdown

  • enable_ipv6

  • enable_backups

  • disable_backups

  • snapshot (also requires image:create permission).

Parameters:
  • body (JSON or IO[bytes]) – The type attribute set in the request body will specify the action that will be taken on the Droplet. Some actions will require additional attributes to be set as well. Is either a JSON type or a IO[bytes] type. Default value is None.

  • tag_name (str) – Used to filter Droplets by a specific tag. Can not be combined with name or type.:code:<br>`Requires ``tag:read` scope. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "actions": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was completed.
            "id": 0,  # Optional. A unique numeric ID that can be used to
              identify and reference an action.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": "str",  # Optional. A human-readable string
              that is used as a unique identifier for each region.
            "resource_id": 0,  # Optional. A unique identifier for the
              resource that the action is associated with.
            "resource_type": "str",  # Optional. The type of resource
              that the action is associated with.
            "started_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was initiated.
            "status": "in-progress",  # Optional. Default value is
              "in-progress". The current status of the action. This can be
              "in-progress", "completed", or "errored". Known values are:
              "in-progress", "completed", and "errored".
            "type": "str"  # Optional. This is the type of action that
              the object represents. For example, this could be "transfer" to represent
              the state of an image transfer action.
        }
    ]
}
class pydo.operations.DropletsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s droplets attribute.

create(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Droplet.

To create a new Droplet, send a POST request to /v2/droplets setting the required attributes.

A Droplet will be created using the provided information. The response body will contain a JSON object with a key called droplet. The value will be an object containing the standard attributes for your new Droplet. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing. The actions returned as part of the response’s links object can be used to check the status of the Droplet create event.

Create Multiple Droplets

Creating multiple Droplets is very similar to creating a single Droplet. Instead of sending name as a string, send names as an array of strings. A Droplet will be created for each name you send using the associated information. Up to ten Droplets may be created this way at a time.

Rather than returning a single Droplet, the response body will contain a JSON array with a key called droplets. This will be set to an array of JSON objects, each of which will contain the standard Droplet attributes. The response code, 202 Accepted, does not indicate the success or failure of any operation, just that the request has been accepted for processing. The array of actions returned as part of the response’s links object can be used to check the status of each individual Droplet create event.

param body:

Is either a JSON type or a IO[bytes] type. Default value is None.

type body:

JSON or IO[bytes]

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# JSON input template you can fill out and use as your body input.
body = {}
destroy(droplet_id: int, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an Existing Droplet.

To delete a Droplet, send a DELETE request to /v2/droplets/$DROPLET_ID.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_by_tag(*, tag_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Deleting Droplets by Tag.

To delete all Droplets assigned to a specific tag, include the tag_name query parameter set to the name of the tag in your DELETE request. For example, /v2/droplets?tag_name=$TAG_NAME.

This endpoint requires tag:read scope.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

tag_name (str) – Specifies Droplets to be deleted by tag. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_retry_with_associated_resources(droplet_id: int, **kwargs: Any) Optional[MutableMapping[str, Any]]

Retry a Droplet Destroy with Associated Resources Request.

If the status of a request to destroy a Droplet with its associated resources reported any errors, it can be retried by sending a POST request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/retry endpoint.

Only one destroy can be active at a time per Droplet. If a retry is issued while another destroy is in progress for the Droplet a 409 status code will be returned. A successful response will include a 202 response code and no content.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404, 409
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_with_associated_resources_dangerous(droplet_id: int, *, x_dangerous: bool, **kwargs: Any) Optional[MutableMapping[str, Any]]

Destroy a Droplet and All of its Associated Resources (Dangerous).

To destroy a Droplet along with all of its associated resources, send a DELETE request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/dangerous endpoint. The headers of this request must include an X-Dangerous key set to true. To preview which resources will be destroyed, first query the Droplet’s associated resources. This operation can not be reverse and should be used with caution.

A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • x_dangerous (bool) – Acknowledge this action will destroy the Droplet and all associated resources and can not be reversed. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_with_associated_resources_selective(droplet_id: int, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
destroy_with_associated_resources_selective(droplet_id: int, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Selectively Destroy a Droplet and its Associated Resources.

To destroy a Droplet along with a sub-set of its associated resources, send a DELETE request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/selective endpoint. The JSON body of the request should include reserved_ips, snapshots, volumes, or volume_snapshots keys each set to an array of IDs for the associated resources to be destroyed. The IDs can be found by querying the Droplet’s associated resources. Any associated resource not included in the request will remain and continue to accrue changes on your account.

A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "floating_ips": [
        "str"  # Optional. An array of unique identifiers for the floating
          IPs to be scheduled for deletion.
    ],
    "reserved_ips": [
        "str"  # Optional. An array of unique identifiers for the reserved
          IPs to be scheduled for deletion.
    ],
    "snapshots": [
        "str"  # Optional. An array of unique identifiers for the snapshots
          to be scheduled for deletion.
    ],
    "volume_snapshots": [
        "str"  # Optional. An array of unique identifiers for the volume
          snapshots to be scheduled for deletion.
    ],
    "volumes": [
        "str"  # Optional. An array of unique identifiers for the volumes to
          be scheduled for deletion.
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(droplet_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Droplet.

To show information about an individual Droplet, send a GET request to /v2/droplets/$DROPLET_ID.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "droplet": {
        "backup_ids": [
            0  # An array of backup IDs of any backups that have been
              taken of the Droplet instance.  Droplet backups are enabled at the time
              of the instance creation.:code:`<br>`Requires ``image:read`` scope.
              Required.
        ],
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the Droplet was created.
          Required.
        "disk": 0,  # The size of the Droplet's disk in gigabytes. Required.
        "features": [
            "str"  # An array of features enabled on this Droplet.
              Required.
        ],
        "id": 0,  # A unique identifier for each Droplet instance. This is
          automatically generated upon Droplet creation. Required.
        "image": {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the image was created.
            "description": "str",  # Optional. An optional free-form text
              field to describe an image.
            "distribution": "str",  # Optional. The name of a custom
              image's distribution. Currently, the valid values are  ``Arch Linux``"" ,
              ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora
              Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" , ``openSUSE``"" ,
              ``RancherOS``"" , ``Rocky Linux``"" , ``Ubuntu``"" , and ``Unknown``.
              Any other value will be accepted but ignored, and ``Unknown`` will be
              used in its place. Known values are: "Arch Linux", "CentOS", "CoreOS",
              "Debian", "Fedora", "Fedora Atomic", "FreeBSD", "Gentoo", "openSUSE",
              "RancherOS", "Rocky Linux", "Ubuntu", and "Unknown".
            "error_message": "str",  # Optional. A string containing
              information about errors that may occur when importing  a custom image.
            "id": 0,  # Optional. A unique number that can be used to
              identify and reference a specific image.
            "min_disk_size": 0,  # Optional. The minimum disk size in GB
              required for a Droplet to use this image.
            "name": "str",  # Optional. The display name that has been
              given to an image.  This is what is shown in the control panel and is
              generally a descriptive title for the image in question.
            "public": bool,  # Optional. This is a boolean value that
              indicates whether the image in question is public or not. An image that
              is public is available to all accounts. A non-public image is only
              accessible from your account.
            "regions": [
                "str"  # Optional. This attribute is an array of the
                  regions that the image is available in. The regions are represented
                  by their identifying slug values.
            ],
            "size_gigabytes": 0.0,  # Optional. The size of the image in
              gigabytes.
            "slug": "str",  # Optional. A uniquely identifying string
              that is associated with each of the DigitalOcean-provided public images.
              These can be used to reference a public image as an alternative to the
              numeric id.
            "status": "str",  # Optional. A status string indicating the
              state of a custom image. This may be ``NEW``"" ,  ``available``"" ,
              ``pending``"" , ``deleted``"" , or ``retired``. Known values are: "NEW",
              "available", "pending", "deleted", and "retired".
            "tags": [
                "str"  # Optional. A flat array of tag names as
                  strings to be applied to the resource. Tag names may be for either
                  existing or new tags. :code:`<br>`:code:`<br>`Requires ``tag:create``
                  scope.
            ],
            "type": "str"  # Optional. Describes the kind of image. It
              may be one of ``base``"" , ``snapshot``"" , ``backup``"" , ``custom``"" ,
              or ``admin``. Respectively, this specifies whether an image is a
              DigitalOcean base OS image, user-generated Droplet snapshot,
              automatically created Droplet backup, user-provided virtual machine
              image, or an image used for DigitalOcean managed resources (e.g. DOKS
              worker nodes). Known values are: "base", "snapshot", "backup", "custom",
              and "admin".
        },
        "locked": bool,  # A boolean value indicating whether the Droplet has
          been locked, preventing actions by users. Required.
        "memory": 0,  # Memory of the Droplet in megabytes. Required.
        "name": "str",  # The human-readable name set for the Droplet
          instance. Required.
        "networks": {
            "v4": [
                {
                    "gateway": "str",  # Optional. The gateway of
                      the specified IPv4 network interface.  For private interfaces, a
                      gateway is not provided. This is denoted by returning ``nil`` as
                      its value.
                    "ip_address": "str",  # Optional. The IP
                      address of the IPv4 network interface.
                    "netmask": "str",  # Optional. The netmask of
                      the IPv4 network interface.
                    "type": "str"  # Optional. The type of the
                      IPv4 network interface. Known values are: "public" and "private".
                }
            ],
            "v6": [
                {
                    "gateway": "str",  # Optional. The gateway of
                      the specified IPv6 network interface.
                    "ip_address": "str",  # Optional. The IP
                      address of the IPv6 network interface.
                    "netmask": 0,  # Optional. The netmask of the
                      IPv6 network interface.
                    "type": "str"  # Optional. The type of the
                      IPv6 network interface.  **Note**"" : IPv6 private  networking is
                      not currently supported. "public"
                }
            ]
        },
        "next_backup_window": {
            "end": "2020-02-20 00:00:00",  # Optional. A time value given
              in ISO8601 combined date and time format specifying the end of the
              Droplet's backup window.
            "start": "2020-02-20 00:00:00"  # Optional. A time value
              given in ISO8601 combined date and time format specifying the start of
              the Droplet's backup window.
        },
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "size": {
            "available": True,  # Default value is True. This is a
              boolean value that represents whether new Droplets can be created with
              this size.
            "description": "str",  # A string describing the class of
              Droplets created from this size. For example: Basic, General Purpose,
              CPU-Optimized, Memory-Optimized, or Storage-Optimized. Required.
            "disk": 0,  # The amount of disk space set aside for Droplets
              of this size. The value is represented in gigabytes. Required.
            "memory": 0,  # The amount of RAM allocated to Droplets
              created of this size. The value is represented in megabytes. Required.
            "price_hourly": 0.0,  # This describes the price of the
              Droplet size as measured hourly. The value is measured in US dollars.
              Required.
            "price_monthly": 0.0,  # This attribute describes the monthly
              cost of this Droplet size if the Droplet is kept for an entire month. The
              value is measured in US dollars. Required.
            "regions": [
                "str"  # An array containing the region slugs where
                  this size is available for Droplet creates. Required.
            ],
            "slug": "str",  # A human-readable string that is used to
              uniquely identify each size. Required.
            "transfer": 0.0,  # The amount of transfer bandwidth that is
              available for Droplets created in this size. This only counts traffic on
              the public interface. The value is given in terabytes. Required.
            "vcpus": 0,  # The number of CPUs allocated to Droplets of
              this size. Required.
            "disk_info": [
                {
                    "size": {
                        "amount": 0,  # Optional. The amount
                          of space allocated to the disk.
                        "unit": "str"  # Optional. The unit
                          of measure for the disk size.
                    },
                    "type": "str"  # Optional. The type of disk.
                      All Droplets contain a ``local`` disk. Additionally, GPU Droplets
                      can also have a ``scratch`` disk for non-persistent data. Known
                      values are: "local" and "scratch".
                }
            ],
            "gpu_info": {
                "count": 0,  # Optional. The number of GPUs allocated
                  to the Droplet.
                "model": "str",  # Optional. The model of the GPU.
                "vram": {
                    "amount": 0,  # Optional. The amount of VRAM
                      allocated to the GPU.
                    "unit": "str"  # Optional. The unit of
                      measure for the VRAM.
                }
            }
        },
        "size_slug": "str",  # The unique slug identifier for the size of
          this Droplet. Required.
        "snapshot_ids": [
            0  # An array of snapshot IDs of any snapshots created from
              the Droplet instance.:code:`<br>`Requires ``image:read`` scope. Required.
        ],
        "status": "str",  # A status string indicating the state of the
          Droplet instance. This may be "new", "active", "off", or "archive". Required.
          Known values are: "new", "active", "off", and "archive".
        "tags": [
            "str"  # An array of Tags the Droplet has been tagged
              with.:code:`<br>`Requires ``tag:read`` scope. Required.
        ],
        "vcpus": 0,  # The number of virtual CPUs. Required.
        "volume_ids": [
            "str"  # A flat array including the unique identifier for
              each Block Storage volume attached to the Droplet.:code:`<br>`Requires
              ``block_storage:read`` scope. Required.
        ],
        "disk_info": [
            {
                "size": {
                    "amount": 0,  # Optional. The amount of space
                      allocated to the disk.
                    "unit": "str"  # Optional. The unit of
                      measure for the disk size.
                },
                "type": "str"  # Optional. The type of disk. All
                  Droplets contain a ``local`` disk. Additionally, GPU Droplets can
                  also have a ``scratch`` disk for non-persistent data. Known values
                  are: "local" and "scratch".
            }
        ],
        "gpu_info": {
            "count": 0,  # Optional. The number of GPUs allocated to the
              Droplet.
            "model": "str",  # Optional. The model of the GPU.
            "vram": {
                "amount": 0,  # Optional. The amount of VRAM
                  allocated to the GPU.
                "unit": "str"  # Optional. The unit of measure for
                  the VRAM.
            }
        },
        "kernel": {
            "id": 0,  # Optional. A unique number used to identify and
              reference a specific kernel.
            "name": "str",  # Optional. The display name of the kernel.
              This is shown in the web UI and is generally a descriptive title for the
              kernel in question.
            "version": "str"  # Optional. A standard kernel version
              string representing the version, patch, and release information.
        },
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the Droplet is assigned.:code:`<br>`Requires ``vpc:read`` scope.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_backup_policy(droplet_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve the Backup Policy for an Existing Droplet.

To show information about an individual Droplet’s backup policy, send a GET request to /v2/droplets/$DROPLET_ID/backups/policy.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "policy": {
        "backup_enabled": bool,  # Optional. A boolean value indicating
          whether backups are enabled for the Droplet.
        "backup_policy": {
            "hour": 0,  # Optional. The hour of the day that the backup
              window will start. Known values are: 0, 4, 8, 12, 16, and 20.
            "plan": "str",  # Optional. The backup plan used for the
              Droplet. The plan can be either ``daily`` or ``weekly``. Known values
              are: "daily" and "weekly".
            "retention_period_days": 0,  # Optional. The number of days
              the backup will be retained.
            "weekday": "str",  # Optional. The day of the week on which
              the backup will occur. Known values are: "SUN", "MON", "TUE", "WED",
              "THU", "FRI", and "SAT".
            "window_length_hours": 0  # Optional. The length of the
              backup window starting from ``hour``.
        },
        "droplet_id": 0,  # Optional. The unique identifier for the Droplet.
        "next_backup_window": {
            "end": "2020-02-20 00:00:00",  # Optional. A time value given
              in ISO8601 combined date and time format specifying the end of the
              Droplet's backup window.
            "start": "2020-02-20 00:00:00"  # Optional. A time value
              given in ISO8601 combined date and time format specifying the start of
              the Droplet's backup window.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_destroy_associated_resources_status(droplet_id: int, **kwargs: Any) MutableMapping[str, Any]

Check Status of a Droplet Destroy with Associated Resources Request.

To check on the status of a request to destroy a Droplet with its associated resources, send a GET request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/status endpoint.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "completed_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format indicating when the requested action was
      completed.
    "droplet": {
        "destroyed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format indicating when the resource
          was destroyed if the request was successful.
        "error_message": "str",  # Optional. A string indicating that the
          resource was not successfully destroyed and providing additional information.
        "id": "str",  # Optional. The unique identifier for the resource
          scheduled for deletion.
        "name": "str"  # Optional. The name of the resource scheduled for
          deletion.
    },
    "failures": 0,  # Optional. A count of the associated resources that failed
      to be destroyed, if any.
    "resources": {
        "floating_ips": [
            {
                "destroyed_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format indicating
                  when the resource was destroyed if the request was successful.
                "error_message": "str",  # Optional. A string
                  indicating that the resource was not successfully destroyed and
                  providing additional information.
                "id": "str",  # Optional. The unique identifier for
                  the resource scheduled for deletion.
                "name": "str"  # Optional. The name of the resource
                  scheduled for deletion.
            }
        ],
        "reserved_ips": [
            {
                "destroyed_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format indicating
                  when the resource was destroyed if the request was successful.
                "error_message": "str",  # Optional. A string
                  indicating that the resource was not successfully destroyed and
                  providing additional information.
                "id": "str",  # Optional. The unique identifier for
                  the resource scheduled for deletion.
                "name": "str"  # Optional. The name of the resource
                  scheduled for deletion.
            }
        ],
        "snapshots": [
            {
                "destroyed_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format indicating
                  when the resource was destroyed if the request was successful.
                "error_message": "str",  # Optional. A string
                  indicating that the resource was not successfully destroyed and
                  providing additional information.
                "id": "str",  # Optional. The unique identifier for
                  the resource scheduled for deletion.
                "name": "str"  # Optional. The name of the resource
                  scheduled for deletion.
            }
        ],
        "volume_snapshots": [
            {
                "destroyed_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format indicating
                  when the resource was destroyed if the request was successful.
                "error_message": "str",  # Optional. A string
                  indicating that the resource was not successfully destroyed and
                  providing additional information.
                "id": "str",  # Optional. The unique identifier for
                  the resource scheduled for deletion.
                "name": "str"  # Optional. The name of the resource
                  scheduled for deletion.
            }
        ],
        "volumes": [
            {
                "destroyed_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format indicating
                  when the resource was destroyed if the request was successful.
                "error_message": "str",  # Optional. A string
                  indicating that the resource was not successfully destroyed and
                  providing additional information.
                "id": "str",  # Optional. The unique identifier for
                  the resource scheduled for deletion.
                "name": "str"  # Optional. The name of the resource
                  scheduled for deletion.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, tag_name: Optional[str] = None, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All Droplets.

To list all Droplets in your account, send a GET request to /v2/droplets.

The response body will be a JSON object with a key of droplets. This will be set to an array containing objects each representing a Droplet. These will contain the standard Droplet attributes.

Filtering Results by Tag

It’s possible to request filtered results by including certain query parameters. To only list Droplets assigned to a specific tag, include the tag_name query parameter set to the name of the tag in your GET request. For example, /v2/droplets?tag_name=$TAG_NAME.

GPU Droplets

By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the type query parameter to gpus. For example, /v2/droplets?type=gpus.

keyword per_page:

Number of items returned per page. Default value is 20.

paramtype per_page:

int

keyword page:

Which ‘page’ of paginated results to return. Default value is 1.

paramtype page:

int

keyword tag_name:

Used to filter Droplets by a specific tag. Can not be combined with name or type.:code:<br>`Requires ``tag:read` scope. Default value is None.

paramtype tag_name:

str

keyword name:

Used to filter list response by Droplet name returning only exact matches. It is case-insensitive and can not be combined with tag_name. Default value is None.

paramtype name:

str

keyword type:

When type is set to gpus, only GPU Droplets will be returned. By default, only non-GPU Droplets are returned. Can not be combined with tag_name. Known values are: “droplets” and “gpus”. Default value is None.

paramtype type:

str

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "droplets": [
        {
            "backup_ids": [
                0  # An array of backup IDs of any backups that have
                  been taken of the Droplet instance.  Droplet backups are enabled at
                  the time of the instance creation.:code:`<br>`Requires ``image:read``
                  scope. Required.
            ],
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the Droplet
              was created. Required.
            "disk": 0,  # The size of the Droplet's disk in gigabytes.
              Required.
            "features": [
                "str"  # An array of features enabled on this
                  Droplet. Required.
            ],
            "id": 0,  # A unique identifier for each Droplet instance.
              This is automatically generated upon Droplet creation. Required.
            "image": {
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the image was created.
                "description": "str",  # Optional. An optional
                  free-form text field to describe an image.
                "distribution": "str",  # Optional. The name of a
                  custom image's distribution. Currently, the valid values are  ``Arch
                  Linux``"" , ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``""
                  , ``Fedora Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" ,
                  ``openSUSE``"" , ``RancherOS``"" , ``Rocky Linux``"" , ``Ubuntu``"" ,
                  and ``Unknown``.  Any other value will be accepted but ignored, and
                  ``Unknown`` will be used in its place. Known values are: "Arch
                  Linux", "CentOS", "CoreOS", "Debian", "Fedora", "Fedora Atomic",
                  "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Rocky Linux",
                  "Ubuntu", and "Unknown".
                "error_message": "str",  # Optional. A string
                  containing information about errors that may occur when importing  a
                  custom image.
                "id": 0,  # Optional. A unique number that can be
                  used to identify and reference a specific image.
                "min_disk_size": 0,  # Optional. The minimum disk
                  size in GB required for a Droplet to use this image.
                "name": "str",  # Optional. The display name that has
                  been given to an image.  This is what is shown in the control panel
                  and is generally a descriptive title for the image in question.
                "public": bool,  # Optional. This is a boolean value
                  that indicates whether the image in question is public or not. An
                  image that is public is available to all accounts. A non-public image
                  is only accessible from your account.
                "regions": [
                    "str"  # Optional. This attribute is an array
                      of the regions that the image is available in. The regions are
                      represented by their identifying slug values.
                ],
                "size_gigabytes": 0.0,  # Optional. The size of the
                  image in gigabytes.
                "slug": "str",  # Optional. A uniquely identifying
                  string that is associated with each of the DigitalOcean-provided
                  public images. These can be used to reference a public image as an
                  alternative to the numeric id.
                "status": "str",  # Optional. A status string
                  indicating the state of a custom image. This may be ``NEW``"" ,
                  ``available``"" , ``pending``"" , ``deleted``"" , or ``retired``.
                  Known values are: "NEW", "available", "pending", "deleted", and
                  "retired".
                "tags": [
                    "str"  # Optional. A flat array of tag names
                      as strings to be applied to the resource. Tag names may be for
                      either existing or new tags. :code:`<br>`:code:`<br>`Requires
                      ``tag:create`` scope.
                ],
                "type": "str"  # Optional. Describes the kind of
                  image. It may be one of ``base``"" , ``snapshot``"" , ``backup``"" ,
                  ``custom``"" , or ``admin``. Respectively, this specifies whether an
                  image is a DigitalOcean base OS image, user-generated Droplet
                  snapshot, automatically created Droplet backup, user-provided virtual
                  machine image, or an image used for DigitalOcean managed resources
                  (e.g. DOKS worker nodes). Known values are: "base", "snapshot",
                  "backup", "custom", and "admin".
            },
            "locked": bool,  # A boolean value indicating whether the
              Droplet has been locked, preventing actions by users. Required.
            "memory": 0,  # Memory of the Droplet in megabytes. Required.
            "name": "str",  # The human-readable name set for the Droplet
              instance. Required.
            "networks": {
                "v4": [
                    {
                        "gateway": "str",  # Optional. The
                          gateway of the specified IPv4 network interface.  For private
                          interfaces, a gateway is not provided. This is denoted by
                          returning ``nil`` as its value.
                        "ip_address": "str",  # Optional. The
                          IP address of the IPv4 network interface.
                        "netmask": "str",  # Optional. The
                          netmask of the IPv4 network interface.
                        "type": "str"  # Optional. The type
                          of the IPv4 network interface. Known values are: "public" and
                          "private".
                    }
                ],
                "v6": [
                    {
                        "gateway": "str",  # Optional. The
                          gateway of the specified IPv6 network interface.
                        "ip_address": "str",  # Optional. The
                          IP address of the IPv6 network interface.
                        "netmask": 0,  # Optional. The
                          netmask of the IPv6 network interface.
                        "type": "str"  # Optional. The type
                          of the IPv6 network interface.  **Note**"" : IPv6 private
                          networking is not currently supported. "public"
                    }
                ]
            },
            "next_backup_window": {
                "end": "2020-02-20 00:00:00",  # Optional. A time
                  value given in ISO8601 combined date and time format specifying the
                  end of the Droplet's backup window.
                "start": "2020-02-20 00:00:00"  # Optional. A time
                  value given in ISO8601 combined date and time format specifying the
                  start of the Droplet's backup window.
            },
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "size": {
                "available": True,  # Default value is True. This is
                  a boolean value that represents whether new Droplets can be created
                  with this size.
                "description": "str",  # A string describing the
                  class of Droplets created from this size. For example: Basic, General
                  Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized.
                  Required.
                "disk": 0,  # The amount of disk space set aside for
                  Droplets of this size. The value is represented in gigabytes.
                  Required.
                "memory": 0,  # The amount of RAM allocated to
                  Droplets created of this size. The value is represented in megabytes.
                  Required.
                "price_hourly": 0.0,  # This describes the price of
                  the Droplet size as measured hourly. The value is measured in US
                  dollars. Required.
                "price_monthly": 0.0,  # This attribute describes the
                  monthly cost of this Droplet size if the Droplet is kept for an
                  entire month. The value is measured in US dollars. Required.
                "regions": [
                    "str"  # An array containing the region slugs
                      where this size is available for Droplet creates. Required.
                ],
                "slug": "str",  # A human-readable string that is
                  used to uniquely identify each size. Required.
                "transfer": 0.0,  # The amount of transfer bandwidth
                  that is available for Droplets created in this size. This only counts
                  traffic on the public interface. The value is given in terabytes.
                  Required.
                "vcpus": 0,  # The number of CPUs allocated to
                  Droplets of this size. Required.
                "disk_info": [
                    {
                        "size": {
                            "amount": 0,  # Optional. The
                              amount of space allocated to the disk.
                            "unit": "str"  # Optional.
                              The unit of measure for the disk size.
                        },
                        "type": "str"  # Optional. The type
                          of disk. All Droplets contain a ``local`` disk. Additionally,
                          GPU Droplets can also have a ``scratch`` disk for
                          non-persistent data. Known values are: "local" and "scratch".
                    }
                ],
                "gpu_info": {
                    "count": 0,  # Optional. The number of GPUs
                      allocated to the Droplet.
                    "model": "str",  # Optional. The model of the
                      GPU.
                    "vram": {
                        "amount": 0,  # Optional. The amount
                          of VRAM allocated to the GPU.
                        "unit": "str"  # Optional. The unit
                          of measure for the VRAM.
                    }
                }
            },
            "size_slug": "str",  # The unique slug identifier for the
              size of this Droplet. Required.
            "snapshot_ids": [
                0  # An array of snapshot IDs of any snapshots
                  created from the Droplet instance.:code:`<br>`Requires ``image:read``
                  scope. Required.
            ],
            "status": "str",  # A status string indicating the state of
              the Droplet instance. This may be "new", "active", "off", or "archive".
              Required. Known values are: "new", "active", "off", and "archive".
            "tags": [
                "str"  # An array of Tags the Droplet has been tagged
                  with.:code:`<br>`Requires ``tag:read`` scope. Required.
            ],
            "vcpus": 0,  # The number of virtual CPUs. Required.
            "volume_ids": [
                "str"  # A flat array including the unique identifier
                  for each Block Storage volume attached to the
                  Droplet.:code:`<br>`Requires ``block_storage:read`` scope. Required.
            ],
            "disk_info": [
                {
                    "size": {
                        "amount": 0,  # Optional. The amount
                          of space allocated to the disk.
                        "unit": "str"  # Optional. The unit
                          of measure for the disk size.
                    },
                    "type": "str"  # Optional. The type of disk.
                      All Droplets contain a ``local`` disk. Additionally, GPU Droplets
                      can also have a ``scratch`` disk for non-persistent data. Known
                      values are: "local" and "scratch".
                }
            ],
            "gpu_info": {
                "count": 0,  # Optional. The number of GPUs allocated
                  to the Droplet.
                "model": "str",  # Optional. The model of the GPU.
                "vram": {
                    "amount": 0,  # Optional. The amount of VRAM
                      allocated to the GPU.
                    "unit": "str"  # Optional. The unit of
                      measure for the VRAM.
                }
            },
            "kernel": {
                "id": 0,  # Optional. A unique number used to
                  identify and reference a specific kernel.
                "name": "str",  # Optional. The display name of the
                  kernel. This is shown in the web UI and is generally a descriptive
                  title for the kernel in question.
                "version": "str"  # Optional. A standard kernel
                  version string representing the version, patch, and release
                  information.
            },
            "vpc_uuid": "str"  # Optional. A string specifying the UUID
              of the VPC to which the Droplet is assigned.:code:`<br>`Requires
              ``vpc:read`` scope.
        }
    ],
    "links": {
        "pages": {}
    }
}
list_associated_resources(droplet_id: int, **kwargs: Any) MutableMapping[str, Any]

List Associated Resources for a Droplet.

To list the associated billable resources that can be destroyed along with a Droplet, send a GET request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources endpoint.

This endpoint will only return resources that you are authorized to see. For example, to see associated Reserved IPs, include the reserved_ip:read scope.

The response will be a JSON object containing snapshots, volumes, and volume_snapshots keys. Each will be set to an array of objects containing information about the associated resources.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "floating_ips": [
        {
            "cost": "str",  # Optional. The cost of the resource in USD
              per month if the resource is retained after the Droplet is destroyed.
            "id": "str",  # Optional. The unique identifier for the
              resource associated with the Droplet.
            "name": "str"  # Optional. The name of the resource
              associated with the Droplet.
        }
    ],
    "reserved_ips": [
        {
            "cost": "str",  # Optional. The cost of the resource in USD
              per month if the resource is retained after the Droplet is destroyed.
            "id": "str",  # Optional. The unique identifier for the
              resource associated with the Droplet.
            "name": "str"  # Optional. The name of the resource
              associated with the Droplet.
        }
    ],
    "snapshots": [
        {
            "cost": "str",  # Optional. The cost of the resource in USD
              per month if the resource is retained after the Droplet is destroyed.
            "id": "str",  # Optional. The unique identifier for the
              resource associated with the Droplet.
            "name": "str"  # Optional. The name of the resource
              associated with the Droplet.
        }
    ],
    "volume_snapshots": [
        {
            "cost": "str",  # Optional. The cost of the resource in USD
              per month if the resource is retained after the Droplet is destroyed.
            "id": "str",  # Optional. The unique identifier for the
              resource associated with the Droplet.
            "name": "str"  # Optional. The name of the resource
              associated with the Droplet.
        }
    ],
    "volumes": [
        {
            "cost": "str",  # Optional. The cost of the resource in USD
              per month if the resource is retained after the Droplet is destroyed.
            "id": "str",  # Optional. The unique identifier for the
              resource associated with the Droplet.
            "name": "str"  # Optional. The name of the resource
              associated with the Droplet.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_backup_policies(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Backup Policies for All Existing Droplets.

To list information about the backup policies for all Droplets in the account, send a GET request to /v2/droplets/backups/policies.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "policies": {
        "str": {
            "backup_enabled": bool,  # Optional. A boolean value
              indicating whether backups are enabled for the Droplet.
            "backup_policy": {
                "hour": 0,  # Optional. The hour of the day that the
                  backup window will start. Known values are: 0, 4, 8, 12, 16, and 20.
                "plan": "str",  # Optional. The backup plan used for
                  the Droplet. The plan can be either ``daily`` or ``weekly``. Known
                  values are: "daily" and "weekly".
                "retention_period_days": 0,  # Optional. The number
                  of days the backup will be retained.
                "weekday": "str",  # Optional. The day of the week on
                  which the backup will occur. Known values are: "SUN", "MON", "TUE",
                  "WED", "THU", "FRI", and "SAT".
                "window_length_hours": 0  # Optional. The length of
                  the backup window starting from ``hour``.
            },
            "droplet_id": 0,  # Optional. The unique identifier for the
              Droplet.
            "next_backup_window": {
                "end": "2020-02-20 00:00:00",  # Optional. A time
                  value given in ISO8601 combined date and time format specifying the
                  end of the Droplet's backup window.
                "start": "2020-02-20 00:00:00"  # Optional. A time
                  value given in ISO8601 combined date and time format specifying the
                  start of the Droplet's backup window.
            }
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_backups(droplet_id: int, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Backups for a Droplet.

To retrieve any backups associated with a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/backups.

You will get back a JSON object that has a backups key. This will be set to an array of backup objects, each of which contain the standard Droplet backup attributes.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "backups": [
        {
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the snapshot
              was created. Required.
            "min_disk_size": 0,  # The minimum size in GB required for a
              volume or Droplet to use this snapshot. Required.
            "name": "str",  # A human-readable name for the snapshot.
              Required.
            "regions": [
                "str"  # An array of the regions that the snapshot is
                  available in. The regions are represented by their identifying slug
                  values. Required.
            ],
            "size_gigabytes": 0.0,  # The billable size of the snapshot
              in gigabytes. Required.
            "type": "str"  # Describes the kind of image. It may be one
              of ``snapshot`` or ``backup``. This specifies whether an image is a
              user-generated Droplet snapshot or automatically created Droplet backup.
              Required. Known values are: "snapshot" and "backup".
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_firewalls(droplet_id: int, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List all Firewalls Applied to a Droplet.

To retrieve a list of all firewalls available to a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/firewalls

The response will be a JSON object that has a key called firewalls. This will be set to an array of firewall objects, each of which contain the standard firewall attributes.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "firewalls": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the firewall was created.
            "droplet_ids": [
                0  # Optional. An array containing the IDs of the
                  Droplets assigned to the firewall. :code:`<br>`:code:`<br>`Requires
                  ``droplet:read`` scope.
            ],
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a firewall.
            "inbound_rules": [
                {
                    "ports": "str",  # The ports on which traffic
                      will be allowed specified as a string containing a single port, a
                      range (e.g. "8000-9000"), or "0" when all ports are open for a
                      protocol. For ICMP rules this parameter will always return "0".
                      Required.
                    "protocol": "str",  # The type of traffic to
                      be allowed. This may be one of ``tcp``"" , ``udp``"" , or
                      ``icmp``. Required. Known values are: "tcp", "udp", and "icmp".
                    "sources": {
                        "addresses": [
                            "str"  # Optional. An array
                              of strings containing the IPv4 addresses, IPv6 addresses,
                              IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will
                              allow traffic.
                        ],
                        "droplet_ids": [
                            0  # Optional. An array
                              containing the IDs of the Droplets to which the firewall
                              will allow traffic.
                        ],
                        "kubernetes_ids": [
                            "str"  # Optional. An array
                              containing the IDs of the Kubernetes clusters to which
                              the firewall will allow traffic.
                        ],
                        "load_balancer_uids": [
                            "str"  # Optional. An array
                              containing the IDs of the load balancers to which the
                              firewall will allow traffic.
                        ],
                        "tags": {}  # Optional. Any object.
                    }
                }
            ],
            "name": "str",  # Optional. A human-readable name for a
              firewall. The name must begin with an alphanumeric character. Subsequent
              characters must either be alphanumeric characters, a period (.), or a
              dash (-).
            "outbound_rules": [
                {
                    "destinations": {
                        "addresses": [
                            "str"  # Optional. An array
                              of strings containing the IPv4 addresses, IPv6 addresses,
                              IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will
                              allow traffic.
                        ],
                        "droplet_ids": [
                            0  # Optional. An array
                              containing the IDs of the Droplets to which the firewall
                              will allow traffic.
                        ],
                        "kubernetes_ids": [
                            "str"  # Optional. An array
                              containing the IDs of the Kubernetes clusters to which
                              the firewall will allow traffic.
                        ],
                        "load_balancer_uids": [
                            "str"  # Optional. An array
                              containing the IDs of the load balancers to which the
                              firewall will allow traffic.
                        ],
                        "tags": {}  # Optional. Any object.
                    },
                    "ports": "str",  # The ports on which traffic
                      will be allowed specified as a string containing a single port, a
                      range (e.g. "8000-9000"), or "0" when all ports are open for a
                      protocol. For ICMP rules this parameter will always return "0".
                      Required.
                    "protocol": "str"  # The type of traffic to
                      be allowed. This may be one of ``tcp``"" , ``udp``"" , or
                      ``icmp``. Required. Known values are: "tcp", "udp", and "icmp".
                }
            ],
            "pending_changes": [
                {
                    "droplet_id": 0,  # Optional. An array of
                      objects each containing the fields "droplet_id", "removing", and
                      "status". It is provided to detail exactly which Droplets are
                      having their security policies updated. When empty, all changes
                      have been successfully applied.
                    "removing": bool,  # Optional. An array of
                      objects each containing the fields "droplet_id", "removing", and
                      "status". It is provided to detail exactly which Droplets are
                      having their security policies updated. When empty, all changes
                      have been successfully applied.
                    "status": "str"  # Optional. An array of
                      objects each containing the fields "droplet_id", "removing", and
                      "status". It is provided to detail exactly which Droplets are
                      having their security policies updated. When empty, all changes
                      have been successfully applied.
                }
            ],
            "status": "str",  # Optional. A status string indicating the
              current state of the firewall. This can be "waiting", "succeeded", or
              "failed". Known values are: "waiting", "succeeded", and "failed".
            "tags": {}  # Optional. Any object.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_kernels(droplet_id: int, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Available Kernels for a Droplet.

To retrieve a list of all kernels available to a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/kernels

The response will be a JSON object that has a key called kernels. This will be set to an array of kernel objects, each of which contain the standard kernel attributes.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "kernels": [
        {
            "id": 0,  # Optional. A unique number used to identify and
              reference a specific kernel.
            "name": "str",  # Optional. The display name of the kernel.
              This is shown in the web UI and is generally a descriptive title for the
              kernel in question.
            "version": "str"  # Optional. A standard kernel version
              string representing the version, patch, and release information.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_neighbors(droplet_id: int, **kwargs: Any) MutableMapping[str, Any]

List Neighbors for a Droplet.

To retrieve a list of any “neighbors” (i.e. Droplets that are co-located on the same physical hardware) for a specific Droplet, send a GET request to /v2/droplets/$DROPLET_ID/neighbors.

The results will be returned as a JSON object with a key of droplets. This will be set to an array containing objects representing any other Droplets that share the same physical hardware. An empty array indicates that the Droplet is not co-located any other Droplets associated with your account.

Parameters:

droplet_id (int) – A unique identifier for a Droplet instance. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "droplets": [
        {
            "backup_ids": [
                0  # An array of backup IDs of any backups that have
                  been taken of the Droplet instance.  Droplet backups are enabled at
                  the time of the instance creation.:code:`<br>`Requires ``image:read``
                  scope. Required.
            ],
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the Droplet
              was created. Required.
            "disk": 0,  # The size of the Droplet's disk in gigabytes.
              Required.
            "features": [
                "str"  # An array of features enabled on this
                  Droplet. Required.
            ],
            "id": 0,  # A unique identifier for each Droplet instance.
              This is automatically generated upon Droplet creation. Required.
            "image": {
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the image was created.
                "description": "str",  # Optional. An optional
                  free-form text field to describe an image.
                "distribution": "str",  # Optional. The name of a
                  custom image's distribution. Currently, the valid values are  ``Arch
                  Linux``"" , ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``""
                  , ``Fedora Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" ,
                  ``openSUSE``"" , ``RancherOS``"" , ``Rocky Linux``"" , ``Ubuntu``"" ,
                  and ``Unknown``.  Any other value will be accepted but ignored, and
                  ``Unknown`` will be used in its place. Known values are: "Arch
                  Linux", "CentOS", "CoreOS", "Debian", "Fedora", "Fedora Atomic",
                  "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Rocky Linux",
                  "Ubuntu", and "Unknown".
                "error_message": "str",  # Optional. A string
                  containing information about errors that may occur when importing  a
                  custom image.
                "id": 0,  # Optional. A unique number that can be
                  used to identify and reference a specific image.
                "min_disk_size": 0,  # Optional. The minimum disk
                  size in GB required for a Droplet to use this image.
                "name": "str",  # Optional. The display name that has
                  been given to an image.  This is what is shown in the control panel
                  and is generally a descriptive title for the image in question.
                "public": bool,  # Optional. This is a boolean value
                  that indicates whether the image in question is public or not. An
                  image that is public is available to all accounts. A non-public image
                  is only accessible from your account.
                "regions": [
                    "str"  # Optional. This attribute is an array
                      of the regions that the image is available in. The regions are
                      represented by their identifying slug values.
                ],
                "size_gigabytes": 0.0,  # Optional. The size of the
                  image in gigabytes.
                "slug": "str",  # Optional. A uniquely identifying
                  string that is associated with each of the DigitalOcean-provided
                  public images. These can be used to reference a public image as an
                  alternative to the numeric id.
                "status": "str",  # Optional. A status string
                  indicating the state of a custom image. This may be ``NEW``"" ,
                  ``available``"" , ``pending``"" , ``deleted``"" , or ``retired``.
                  Known values are: "NEW", "available", "pending", "deleted", and
                  "retired".
                "tags": [
                    "str"  # Optional. A flat array of tag names
                      as strings to be applied to the resource. Tag names may be for
                      either existing or new tags. :code:`<br>`:code:`<br>`Requires
                      ``tag:create`` scope.
                ],
                "type": "str"  # Optional. Describes the kind of
                  image. It may be one of ``base``"" , ``snapshot``"" , ``backup``"" ,
                  ``custom``"" , or ``admin``. Respectively, this specifies whether an
                  image is a DigitalOcean base OS image, user-generated Droplet
                  snapshot, automatically created Droplet backup, user-provided virtual
                  machine image, or an image used for DigitalOcean managed resources
                  (e.g. DOKS worker nodes). Known values are: "base", "snapshot",
                  "backup", "custom", and "admin".
            },
            "locked": bool,  # A boolean value indicating whether the
              Droplet has been locked, preventing actions by users. Required.
            "memory": 0,  # Memory of the Droplet in megabytes. Required.
            "name": "str",  # The human-readable name set for the Droplet
              instance. Required.
            "networks": {
                "v4": [
                    {
                        "gateway": "str",  # Optional. The
                          gateway of the specified IPv4 network interface.  For private
                          interfaces, a gateway is not provided. This is denoted by
                          returning ``nil`` as its value.
                        "ip_address": "str",  # Optional. The
                          IP address of the IPv4 network interface.
                        "netmask": "str",  # Optional. The
                          netmask of the IPv4 network interface.
                        "type": "str"  # Optional. The type
                          of the IPv4 network interface. Known values are: "public" and
                          "private".
                    }
                ],
                "v6": [
                    {
                        "gateway": "str",  # Optional. The
                          gateway of the specified IPv6 network interface.
                        "ip_address": "str",  # Optional. The
                          IP address of the IPv6 network interface.
                        "netmask": 0,  # Optional. The
                          netmask of the IPv6 network interface.
                        "type": "str"  # Optional. The type
                          of the IPv6 network interface.  **Note**"" : IPv6 private
                          networking is not currently supported. "public"
                    }
                ]
            },
            "next_backup_window": {
                "end": "2020-02-20 00:00:00",  # Optional. A time
                  value given in ISO8601 combined date and time format specifying the
                  end of the Droplet's backup window.
                "start": "2020-02-20 00:00:00"  # Optional. A time
                  value given in ISO8601 combined date and time format specifying the
                  start of the Droplet's backup window.
            },
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "size": {
                "available": True,  # Default value is True. This is
                  a boolean value that represents whether new Droplets can be created
                  with this size.
                "description": "str",  # A string describing the
                  class of Droplets created from this size. For example: Basic, General
                  Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized.
                  Required.
                "disk": 0,  # The amount of disk space set aside for
                  Droplets of this size. The value is represented in gigabytes.
                  Required.
                "memory": 0,  # The amount of RAM allocated to
                  Droplets created of this size. The value is represented in megabytes.
                  Required.
                "price_hourly": 0.0,  # This describes the price of
                  the Droplet size as measured hourly. The value is measured in US
                  dollars. Required.
                "price_monthly": 0.0,  # This attribute describes the
                  monthly cost of this Droplet size if the Droplet is kept for an
                  entire month. The value is measured in US dollars. Required.
                "regions": [
                    "str"  # An array containing the region slugs
                      where this size is available for Droplet creates. Required.
                ],
                "slug": "str",  # A human-readable string that is
                  used to uniquely identify each size. Required.
                "transfer": 0.0,  # The amount of transfer bandwidth
                  that is available for Droplets created in this size. This only counts
                  traffic on the public interface. The value is given in terabytes.
                  Required.
                "vcpus": 0,  # The number of CPUs allocated to
                  Droplets of this size. Required.
                "disk_info": [
                    {
                        "size": {
                            "amount": 0,  # Optional. The
                              amount of space allocated to the disk.
                            "unit": "str"  # Optional.
                              The unit of measure for the disk size.
                        },
                        "type": "str"  # Optional. The type
                          of disk. All Droplets contain a ``local`` disk. Additionally,
                          GPU Droplets can also have a ``scratch`` disk for
                          non-persistent data. Known values are: "local" and "scratch".
                    }
                ],
                "gpu_info": {
                    "count": 0,  # Optional. The number of GPUs
                      allocated to the Droplet.
                    "model": "str",  # Optional. The model of the
                      GPU.
                    "vram": {
                        "amount": 0,  # Optional. The amount
                          of VRAM allocated to the GPU.
                        "unit": "str"  # Optional. The unit
                          of measure for the VRAM.
                    }
                }
            },
            "size_slug": "str",  # The unique slug identifier for the
              size of this Droplet. Required.
            "snapshot_ids": [
                0  # An array of snapshot IDs of any snapshots
                  created from the Droplet instance.:code:`<br>`Requires ``image:read``
                  scope. Required.
            ],
            "status": "str",  # A status string indicating the state of
              the Droplet instance. This may be "new", "active", "off", or "archive".
              Required. Known values are: "new", "active", "off", and "archive".
            "tags": [
                "str"  # An array of Tags the Droplet has been tagged
                  with.:code:`<br>`Requires ``tag:read`` scope. Required.
            ],
            "vcpus": 0,  # The number of virtual CPUs. Required.
            "volume_ids": [
                "str"  # A flat array including the unique identifier
                  for each Block Storage volume attached to the
                  Droplet.:code:`<br>`Requires ``block_storage:read`` scope. Required.
            ],
            "disk_info": [
                {
                    "size": {
                        "amount": 0,  # Optional. The amount
                          of space allocated to the disk.
                        "unit": "str"  # Optional. The unit
                          of measure for the disk size.
                    },
                    "type": "str"  # Optional. The type of disk.
                      All Droplets contain a ``local`` disk. Additionally, GPU Droplets
                      can also have a ``scratch`` disk for non-persistent data. Known
                      values are: "local" and "scratch".
                }
            ],
            "gpu_info": {
                "count": 0,  # Optional. The number of GPUs allocated
                  to the Droplet.
                "model": "str",  # Optional. The model of the GPU.
                "vram": {
                    "amount": 0,  # Optional. The amount of VRAM
                      allocated to the GPU.
                    "unit": "str"  # Optional. The unit of
                      measure for the VRAM.
                }
            },
            "kernel": {
                "id": 0,  # Optional. A unique number used to
                  identify and reference a specific kernel.
                "name": "str",  # Optional. The display name of the
                  kernel. This is shown in the web UI and is generally a descriptive
                  title for the kernel in question.
                "version": "str"  # Optional. A standard kernel
                  version string representing the version, patch, and release
                  information.
            },
            "vpc_uuid": "str"  # Optional. A string specifying the UUID
              of the VPC to which the Droplet is assigned.:code:`<br>`Requires
              ``vpc:read`` scope.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_neighbors_ids(**kwargs: Any) MutableMapping[str, Any]

List All Droplet Neighbors.

To retrieve a list of all Droplets that are co-located on the same physical hardware, send a GET request to /v2/reports/droplet_neighbors_ids.

The results will be returned as a JSON object with a key of neighbor_ids. This will be set to an array of arrays. Each array will contain a set of Droplet IDs for Droplets that share a physical server. An empty array indicates that all Droplets associated with your account are located on separate physical hardware.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "neighbor_ids": [
        [
            0  # Optional. An array of arrays. Each array will contain a
              set of Droplet IDs for Droplets that share a physical server.
        ]
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_snapshots(droplet_id: int, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Snapshots for a Droplet.

To retrieve the snapshots that have been created from a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/snapshots.

You will get back a JSON object that has a snapshots key. This will be set to an array of snapshot objects, each of which contain the standard Droplet snapshot attributes.

Parameters:
  • droplet_id (int) – A unique identifier for a Droplet instance. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "snapshots": [
        {
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the snapshot
              was created. Required.
            "min_disk_size": 0,  # The minimum size in GB required for a
              volume or Droplet to use this snapshot. Required.
            "name": "str",  # A human-readable name for the snapshot.
              Required.
            "regions": [
                "str"  # An array of the regions that the snapshot is
                  available in. The regions are represented by their identifying slug
                  values. Required.
            ],
            "size_gigabytes": 0.0,  # The billable size of the snapshot
              in gigabytes. Required.
            "type": "str"  # Describes the kind of image. It may be one
              of ``snapshot`` or ``backup``. This specifies whether an image is a
              user-generated Droplet snapshot or automatically created Droplet backup.
              Required. Known values are: "snapshot" and "backup".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_supported_backup_policies(**kwargs: Any) MutableMapping[str, Any]

List Supported Droplet Backup Policies.

To retrieve a list of all supported Droplet backup policies, send a GET request to /v2/droplets/backups/supported_policies.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "supported_policies": [
        {
            "name": "str",  # Optional. The name of the Droplet backup
              plan.
            "possible_days": [
                "str"  # Optional. The day of the week the backup
                  will occur.
            ],
            "possible_window_starts": [
                0  # Optional. An array of integers representing the
                  hours of the day that a backup can start.
            ],
            "retention_period_days": 0,  # Optional. The number of days
              that a backup will be kept.
            "window_length_hours": 0  # Optional. The number of hours
              that a backup window is open.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.FirewallsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s firewalls attribute.

add_rules(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
add_rules(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Add Rules to a Firewall.

To add additional access rules to a firewall, send a POST request to /v2/firewalls/$FIREWALL_ID/rules. The body of the request may include an inbound_rules and/or outbound_rules attribute containing an array of rules to be added.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "inbound_rules": [
        {
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str",  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
            "sources": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            }
        }
    ],
    "outbound_rules": [
        {
            "destinations": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            },
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str"  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
        }
    ]
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
add_tags(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
add_tags(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Add Tags to a Firewall.

To assign a tag representing a group of Droplets to a firewall, send a POST request to /v2/firewalls/$FIREWALL_ID/tags. In the body of the request, there should be a tags attribute containing a list of tag names.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "tags": {}  # Any object. Required.
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
assign_droplets(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
assign_droplets(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Add Droplets to a Firewall.

To assign a Droplet to a firewall, send a POST request to /v2/firewalls/$FIREWALL_ID/droplets. In the body of the request, there should be a droplet_ids attribute containing a list of Droplet IDs.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "droplet_ids": [
        0  # An array containing the IDs of the Droplets to be assigned to
          the firewall. Required.
    ]
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Firewall.

To create a new firewall, send a POST request to /v2/firewalls. The request must contain at least one inbound or outbound access rule.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the firewall was
      created.
    "droplet_ids": [
        0  # Optional. An array containing the IDs of the Droplets assigned
          to the firewall. :code:`<br>`:code:`<br>`Requires ``droplet:read`` scope.
    ],
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a firewall.
    "inbound_rules": [
        {
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str",  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
            "sources": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            }
        }
    ],
    "name": "str",  # Optional. A human-readable name for a firewall. The name
      must begin with an alphanumeric character. Subsequent characters must either be
      alphanumeric characters, a period (.), or a dash (-).
    "outbound_rules": [
        {
            "destinations": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            },
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str"  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
        }
    ],
    "pending_changes": [
        {
            "droplet_id": 0,  # Optional. An array of objects each
              containing the fields "droplet_id", "removing", and "status". It is
              provided to detail exactly which Droplets are having their security
              policies updated. When empty, all changes have been successfully applied.
            "removing": bool,  # Optional. An array of objects each
              containing the fields "droplet_id", "removing", and "status". It is
              provided to detail exactly which Droplets are having their security
              policies updated. When empty, all changes have been successfully applied.
            "status": "str"  # Optional. An array of objects each
              containing the fields "droplet_id", "removing", and "status". It is
              provided to detail exactly which Droplets are having their security
              policies updated. When empty, all changes have been successfully applied.
        }
    ],
    "status": "str",  # Optional. A status string indicating the current state of
      the firewall. This can be "waiting", "succeeded", or "failed". Known values are:
      "waiting", "succeeded", and "failed".
    "tags": {}  # Optional. Any object.
}

# response body for status code(s): 202
response == {
    "firewall": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the firewall
          was created.
        "droplet_ids": [
            0  # Optional. An array containing the IDs of the Droplets
              assigned to the firewall. :code:`<br>`:code:`<br>`Requires
              ``droplet:read`` scope.
        ],
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a firewall.
        "inbound_rules": [
            {
                "ports": "str",  # The ports on which traffic will be
                  allowed specified as a string containing a single port, a range (e.g.
                  "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
                  rules this parameter will always return "0". Required.
                "protocol": "str",  # The type of traffic to be
                  allowed. This may be one of ``tcp``"" , ``udp``"" , or ``icmp``.
                  Required. Known values are: "tcp", "udp", and "icmp".
                "sources": {
                    "addresses": [
                        "str"  # Optional. An array of
                          strings containing the IPv4 addresses, IPv6 addresses, IPv4
                          CIDRs, and/or IPv6 CIDRs to which the firewall will allow
                          traffic.
                    ],
                    "droplet_ids": [
                        0  # Optional. An array containing
                          the IDs of the Droplets to which the firewall will allow
                          traffic.
                    ],
                    "kubernetes_ids": [
                        "str"  # Optional. An array
                          containing the IDs of the Kubernetes clusters to which the
                          firewall will allow traffic.
                    ],
                    "load_balancer_uids": [
                        "str"  # Optional. An array
                          containing the IDs of the load balancers to which the
                          firewall will allow traffic.
                    ],
                    "tags": {}  # Optional. Any object.
                }
            }
        ],
        "name": "str",  # Optional. A human-readable name for a firewall. The
          name must begin with an alphanumeric character. Subsequent characters must
          either be alphanumeric characters, a period (.), or a dash (-).
        "outbound_rules": [
            {
                "destinations": {
                    "addresses": [
                        "str"  # Optional. An array of
                          strings containing the IPv4 addresses, IPv6 addresses, IPv4
                          CIDRs, and/or IPv6 CIDRs to which the firewall will allow
                          traffic.
                    ],
                    "droplet_ids": [
                        0  # Optional. An array containing
                          the IDs of the Droplets to which the firewall will allow
                          traffic.
                    ],
                    "kubernetes_ids": [
                        "str"  # Optional. An array
                          containing the IDs of the Kubernetes clusters to which the
                          firewall will allow traffic.
                    ],
                    "load_balancer_uids": [
                        "str"  # Optional. An array
                          containing the IDs of the load balancers to which the
                          firewall will allow traffic.
                    ],
                    "tags": {}  # Optional. Any object.
                },
                "ports": "str",  # The ports on which traffic will be
                  allowed specified as a string containing a single port, a range (e.g.
                  "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
                  rules this parameter will always return "0". Required.
                "protocol": "str"  # The type of traffic to be
                  allowed. This may be one of ``tcp``"" , ``udp``"" , or ``icmp``.
                  Required. Known values are: "tcp", "udp", and "icmp".
            }
        ],
        "pending_changes": [
            {
                "droplet_id": 0,  # Optional. An array of objects
                  each containing the fields "droplet_id", "removing", and "status". It
                  is provided to detail exactly which Droplets are having their
                  security policies updated. When empty, all changes have been
                  successfully applied.
                "removing": bool,  # Optional. An array of objects
                  each containing the fields "droplet_id", "removing", and "status". It
                  is provided to detail exactly which Droplets are having their
                  security policies updated. When empty, all changes have been
                  successfully applied.
                "status": "str"  # Optional. An array of objects each
                  containing the fields "droplet_id", "removing", and "status". It is
                  provided to detail exactly which Droplets are having their security
                  policies updated. When empty, all changes have been successfully
                  applied.
            }
        ],
        "status": "str",  # Optional. A status string indicating the current
          state of the firewall. This can be "waiting", "succeeded", or "failed". Known
          values are: "waiting", "succeeded", and "failed".
        "tags": {}  # Optional. Any object.
    }
}
# response body for status code(s): 400
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(firewall_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Firewall.

To delete a firewall send a DELETE request to /v2/firewalls/$FIREWALL_ID.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:

firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_droplets(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
delete_droplets(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Remove Droplets from a Firewall.

To remove a Droplet from a firewall, send a DELETE request to /v2/firewalls/$FIREWALL_ID/droplets. In the body of the request, there should be a droplet_ids attribute containing a list of Droplet IDs.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "droplet_ids": [
        0  # An array containing the IDs of the Droplets to be removed from
          the firewall. Required.
    ]
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_rules(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
delete_rules(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Remove Rules from a Firewall.

To remove access rules from a firewall, send a DELETE request to /v2/firewalls/$FIREWALL_ID/rules. The body of the request may include an inbound_rules and/or outbound_rules attribute containing an array of rules to be removed.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "inbound_rules": [
        {
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str",  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
            "sources": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            }
        }
    ],
    "outbound_rules": [
        {
            "destinations": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            },
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str"  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
        }
    ]
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_tags(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
delete_tags(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Remove Tags from a Firewall.

To remove a tag representing a group of Droplets from a firewall, send a DELETE request to /v2/firewalls/$FIREWALL_ID/tags. In the body of the request, there should be a tags attribute containing a list of tag names.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "tags": {}  # Any object. Required.
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(firewall_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Firewall.

To show information about an existing firewall, send a GET request to /v2/firewalls/$FIREWALL_ID.

Parameters:

firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "firewall": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the firewall
          was created.
        "droplet_ids": [
            0  # Optional. An array containing the IDs of the Droplets
              assigned to the firewall. :code:`<br>`:code:`<br>`Requires
              ``droplet:read`` scope.
        ],
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a firewall.
        "inbound_rules": [
            {
                "ports": "str",  # The ports on which traffic will be
                  allowed specified as a string containing a single port, a range (e.g.
                  "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
                  rules this parameter will always return "0". Required.
                "protocol": "str",  # The type of traffic to be
                  allowed. This may be one of ``tcp``"" , ``udp``"" , or ``icmp``.
                  Required. Known values are: "tcp", "udp", and "icmp".
                "sources": {
                    "addresses": [
                        "str"  # Optional. An array of
                          strings containing the IPv4 addresses, IPv6 addresses, IPv4
                          CIDRs, and/or IPv6 CIDRs to which the firewall will allow
                          traffic.
                    ],
                    "droplet_ids": [
                        0  # Optional. An array containing
                          the IDs of the Droplets to which the firewall will allow
                          traffic.
                    ],
                    "kubernetes_ids": [
                        "str"  # Optional. An array
                          containing the IDs of the Kubernetes clusters to which the
                          firewall will allow traffic.
                    ],
                    "load_balancer_uids": [
                        "str"  # Optional. An array
                          containing the IDs of the load balancers to which the
                          firewall will allow traffic.
                    ],
                    "tags": {}  # Optional. Any object.
                }
            }
        ],
        "name": "str",  # Optional. A human-readable name for a firewall. The
          name must begin with an alphanumeric character. Subsequent characters must
          either be alphanumeric characters, a period (.), or a dash (-).
        "outbound_rules": [
            {
                "destinations": {
                    "addresses": [
                        "str"  # Optional. An array of
                          strings containing the IPv4 addresses, IPv6 addresses, IPv4
                          CIDRs, and/or IPv6 CIDRs to which the firewall will allow
                          traffic.
                    ],
                    "droplet_ids": [
                        0  # Optional. An array containing
                          the IDs of the Droplets to which the firewall will allow
                          traffic.
                    ],
                    "kubernetes_ids": [
                        "str"  # Optional. An array
                          containing the IDs of the Kubernetes clusters to which the
                          firewall will allow traffic.
                    ],
                    "load_balancer_uids": [
                        "str"  # Optional. An array
                          containing the IDs of the load balancers to which the
                          firewall will allow traffic.
                    ],
                    "tags": {}  # Optional. Any object.
                },
                "ports": "str",  # The ports on which traffic will be
                  allowed specified as a string containing a single port, a range (e.g.
                  "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
                  rules this parameter will always return "0". Required.
                "protocol": "str"  # The type of traffic to be
                  allowed. This may be one of ``tcp``"" , ``udp``"" , or ``icmp``.
                  Required. Known values are: "tcp", "udp", and "icmp".
            }
        ],
        "pending_changes": [
            {
                "droplet_id": 0,  # Optional. An array of objects
                  each containing the fields "droplet_id", "removing", and "status". It
                  is provided to detail exactly which Droplets are having their
                  security policies updated. When empty, all changes have been
                  successfully applied.
                "removing": bool,  # Optional. An array of objects
                  each containing the fields "droplet_id", "removing", and "status". It
                  is provided to detail exactly which Droplets are having their
                  security policies updated. When empty, all changes have been
                  successfully applied.
                "status": "str"  # Optional. An array of objects each
                  containing the fields "droplet_id", "removing", and "status". It is
                  provided to detail exactly which Droplets are having their security
                  policies updated. When empty, all changes have been successfully
                  applied.
            }
        ],
        "status": "str",  # Optional. A status string indicating the current
          state of the firewall. This can be "waiting", "succeeded", or "failed". Known
          values are: "waiting", "succeeded", and "failed".
        "tags": {}  # Optional. Any object.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Firewalls.

To list all of the firewalls available on your account, send a GET request to /v2/firewalls.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "firewalls": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the firewall was created.
            "droplet_ids": [
                0  # Optional. An array containing the IDs of the
                  Droplets assigned to the firewall. :code:`<br>`:code:`<br>`Requires
                  ``droplet:read`` scope.
            ],
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a firewall.
            "inbound_rules": [
                {
                    "ports": "str",  # The ports on which traffic
                      will be allowed specified as a string containing a single port, a
                      range (e.g. "8000-9000"), or "0" when all ports are open for a
                      protocol. For ICMP rules this parameter will always return "0".
                      Required.
                    "protocol": "str",  # The type of traffic to
                      be allowed. This may be one of ``tcp``"" , ``udp``"" , or
                      ``icmp``. Required. Known values are: "tcp", "udp", and "icmp".
                    "sources": {
                        "addresses": [
                            "str"  # Optional. An array
                              of strings containing the IPv4 addresses, IPv6 addresses,
                              IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will
                              allow traffic.
                        ],
                        "droplet_ids": [
                            0  # Optional. An array
                              containing the IDs of the Droplets to which the firewall
                              will allow traffic.
                        ],
                        "kubernetes_ids": [
                            "str"  # Optional. An array
                              containing the IDs of the Kubernetes clusters to which
                              the firewall will allow traffic.
                        ],
                        "load_balancer_uids": [
                            "str"  # Optional. An array
                              containing the IDs of the load balancers to which the
                              firewall will allow traffic.
                        ],
                        "tags": {}  # Optional. Any object.
                    }
                }
            ],
            "name": "str",  # Optional. A human-readable name for a
              firewall. The name must begin with an alphanumeric character. Subsequent
              characters must either be alphanumeric characters, a period (.), or a
              dash (-).
            "outbound_rules": [
                {
                    "destinations": {
                        "addresses": [
                            "str"  # Optional. An array
                              of strings containing the IPv4 addresses, IPv6 addresses,
                              IPv4 CIDRs, and/or IPv6 CIDRs to which the firewall will
                              allow traffic.
                        ],
                        "droplet_ids": [
                            0  # Optional. An array
                              containing the IDs of the Droplets to which the firewall
                              will allow traffic.
                        ],
                        "kubernetes_ids": [
                            "str"  # Optional. An array
                              containing the IDs of the Kubernetes clusters to which
                              the firewall will allow traffic.
                        ],
                        "load_balancer_uids": [
                            "str"  # Optional. An array
                              containing the IDs of the load balancers to which the
                              firewall will allow traffic.
                        ],
                        "tags": {}  # Optional. Any object.
                    },
                    "ports": "str",  # The ports on which traffic
                      will be allowed specified as a string containing a single port, a
                      range (e.g. "8000-9000"), or "0" when all ports are open for a
                      protocol. For ICMP rules this parameter will always return "0".
                      Required.
                    "protocol": "str"  # The type of traffic to
                      be allowed. This may be one of ``tcp``"" , ``udp``"" , or
                      ``icmp``. Required. Known values are: "tcp", "udp", and "icmp".
                }
            ],
            "pending_changes": [
                {
                    "droplet_id": 0,  # Optional. An array of
                      objects each containing the fields "droplet_id", "removing", and
                      "status". It is provided to detail exactly which Droplets are
                      having their security policies updated. When empty, all changes
                      have been successfully applied.
                    "removing": bool,  # Optional. An array of
                      objects each containing the fields "droplet_id", "removing", and
                      "status". It is provided to detail exactly which Droplets are
                      having their security policies updated. When empty, all changes
                      have been successfully applied.
                    "status": "str"  # Optional. An array of
                      objects each containing the fields "droplet_id", "removing", and
                      "status". It is provided to detail exactly which Droplets are
                      having their security policies updated. When empty, all changes
                      have been successfully applied.
                }
            ],
            "status": "str",  # Optional. A status string indicating the
              current state of the firewall. This can be "waiting", "succeeded", or
              "failed". Known values are: "waiting", "succeeded", and "failed".
            "tags": {}  # Optional. Any object.
        }
    ],
    "links": {
        "pages": {}
    }
}
update(firewall_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(firewall_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Firewall.

To update the configuration of an existing firewall, send a PUT request to /v2/firewalls/$FIREWALL_ID. The request should contain a full representation of the firewall including existing attributes. Note that any attributes that are not provided will be reset to their default values. <br><br>`You must have read access (e.g. ``droplet:read`) to all resources attached to the firewall to successfully update the firewall.

Parameters:
  • firewall_id (str) – A unique ID that can be used to identify and reference a firewall. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the firewall was
      created.
    "droplet_ids": [
        0  # Optional. An array containing the IDs of the Droplets assigned
          to the firewall. :code:`<br>`:code:`<br>`Requires ``droplet:read`` scope.
    ],
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a firewall.
    "inbound_rules": [
        {
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str",  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
            "sources": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            }
        }
    ],
    "name": "str",  # Optional. A human-readable name for a firewall. The name
      must begin with an alphanumeric character. Subsequent characters must either be
      alphanumeric characters, a period (.), or a dash (-).
    "outbound_rules": [
        {
            "destinations": {
                "addresses": [
                    "str"  # Optional. An array of strings
                      containing the IPv4 addresses, IPv6 addresses, IPv4 CIDRs, and/or
                      IPv6 CIDRs to which the firewall will allow traffic.
                ],
                "droplet_ids": [
                    0  # Optional. An array containing the IDs of
                      the Droplets to which the firewall will allow traffic.
                ],
                "kubernetes_ids": [
                    "str"  # Optional. An array containing the
                      IDs of the Kubernetes clusters to which the firewall will allow
                      traffic.
                ],
                "load_balancer_uids": [
                    "str"  # Optional. An array containing the
                      IDs of the load balancers to which the firewall will allow
                      traffic.
                ],
                "tags": {}  # Optional. Any object.
            },
            "ports": "str",  # The ports on which traffic will be allowed
              specified as a string containing a single port, a range (e.g.
              "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
              rules this parameter will always return "0". Required.
            "protocol": "str"  # The type of traffic to be allowed. This
              may be one of ``tcp``"" , ``udp``"" , or ``icmp``. Required. Known values
              are: "tcp", "udp", and "icmp".
        }
    ],
    "pending_changes": [
        {
            "droplet_id": 0,  # Optional. An array of objects each
              containing the fields "droplet_id", "removing", and "status". It is
              provided to detail exactly which Droplets are having their security
              policies updated. When empty, all changes have been successfully applied.
            "removing": bool,  # Optional. An array of objects each
              containing the fields "droplet_id", "removing", and "status". It is
              provided to detail exactly which Droplets are having their security
              policies updated. When empty, all changes have been successfully applied.
            "status": "str"  # Optional. An array of objects each
              containing the fields "droplet_id", "removing", and "status". It is
              provided to detail exactly which Droplets are having their security
              policies updated. When empty, all changes have been successfully applied.
        }
    ],
    "status": "str",  # Optional. A status string indicating the current state of
      the firewall. This can be "waiting", "succeeded", or "failed". Known values are:
      "waiting", "succeeded", and "failed".
    "tags": {}  # Optional. Any object.
}

# response body for status code(s): 200
response == {
    "firewall": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the firewall
          was created.
        "droplet_ids": [
            0  # Optional. An array containing the IDs of the Droplets
              assigned to the firewall. :code:`<br>`:code:`<br>`Requires
              ``droplet:read`` scope.
        ],
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a firewall.
        "inbound_rules": [
            {
                "ports": "str",  # The ports on which traffic will be
                  allowed specified as a string containing a single port, a range (e.g.
                  "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
                  rules this parameter will always return "0". Required.
                "protocol": "str",  # The type of traffic to be
                  allowed. This may be one of ``tcp``"" , ``udp``"" , or ``icmp``.
                  Required. Known values are: "tcp", "udp", and "icmp".
                "sources": {
                    "addresses": [
                        "str"  # Optional. An array of
                          strings containing the IPv4 addresses, IPv6 addresses, IPv4
                          CIDRs, and/or IPv6 CIDRs to which the firewall will allow
                          traffic.
                    ],
                    "droplet_ids": [
                        0  # Optional. An array containing
                          the IDs of the Droplets to which the firewall will allow
                          traffic.
                    ],
                    "kubernetes_ids": [
                        "str"  # Optional. An array
                          containing the IDs of the Kubernetes clusters to which the
                          firewall will allow traffic.
                    ],
                    "load_balancer_uids": [
                        "str"  # Optional. An array
                          containing the IDs of the load balancers to which the
                          firewall will allow traffic.
                    ],
                    "tags": {}  # Optional. Any object.
                }
            }
        ],
        "name": "str",  # Optional. A human-readable name for a firewall. The
          name must begin with an alphanumeric character. Subsequent characters must
          either be alphanumeric characters, a period (.), or a dash (-).
        "outbound_rules": [
            {
                "destinations": {
                    "addresses": [
                        "str"  # Optional. An array of
                          strings containing the IPv4 addresses, IPv6 addresses, IPv4
                          CIDRs, and/or IPv6 CIDRs to which the firewall will allow
                          traffic.
                    ],
                    "droplet_ids": [
                        0  # Optional. An array containing
                          the IDs of the Droplets to which the firewall will allow
                          traffic.
                    ],
                    "kubernetes_ids": [
                        "str"  # Optional. An array
                          containing the IDs of the Kubernetes clusters to which the
                          firewall will allow traffic.
                    ],
                    "load_balancer_uids": [
                        "str"  # Optional. An array
                          containing the IDs of the load balancers to which the
                          firewall will allow traffic.
                    ],
                    "tags": {}  # Optional. Any object.
                },
                "ports": "str",  # The ports on which traffic will be
                  allowed specified as a string containing a single port, a range (e.g.
                  "8000-9000"), or "0" when all ports are open for a protocol. For ICMP
                  rules this parameter will always return "0". Required.
                "protocol": "str"  # The type of traffic to be
                  allowed. This may be one of ``tcp``"" , ``udp``"" , or ``icmp``.
                  Required. Known values are: "tcp", "udp", and "icmp".
            }
        ],
        "pending_changes": [
            {
                "droplet_id": 0,  # Optional. An array of objects
                  each containing the fields "droplet_id", "removing", and "status". It
                  is provided to detail exactly which Droplets are having their
                  security policies updated. When empty, all changes have been
                  successfully applied.
                "removing": bool,  # Optional. An array of objects
                  each containing the fields "droplet_id", "removing", and "status". It
                  is provided to detail exactly which Droplets are having their
                  security policies updated. When empty, all changes have been
                  successfully applied.
                "status": "str"  # Optional. An array of objects each
                  containing the fields "droplet_id", "removing", and "status". It is
                  provided to detail exactly which Droplets are having their security
                  policies updated. When empty, all changes have been successfully
                  applied.
            }
        ],
        "status": "str",  # Optional. A status string indicating the current
          state of the firewall. This can be "waiting", "succeeded", or "failed". Known
          values are: "waiting", "succeeded", and "failed".
        "tags": {}  # Optional. Any object.
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.FunctionsAccessKeyOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s functions_access_key attribute.

create(namespace_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(namespace_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Namespace Access Key.

Creates a new access key for a serverless functions namespace. The access key can be used to authenticate requests to the namespace’s functions. The secret key is only returned once upon creation.

To create an access key, send a POST request to /v2/functions/namespaces/{namespace_id}/keys.

Parameters:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The access key's name. Required.
    "expires_in": "str"  # Optional. The duration after which the access key
      expires, specified as a human-readable duration string in the format ``<int>h``
      (hours) or ``<int>d`` (days). Minimum value is ``1h``. If omitted, the key will
      never expire.
}

# response body for status code(s): 201
response == {
    "access_key": {
        "created_at": "2020-02-20 00:00:00",  # Optional. The date and time
          the key was created.
        "expires_at": "2020-02-20 00:00:00",  # Optional. When the key
          expires (null for non-expiring keys).
        "id": "str",  # Optional. The access key's unique identifier with
          prefix 'dof"" *v1*"" '.
        "name": "str",  # Optional. The access key's name.
        "secret": "str",  # Optional. The secret key used to authenticate.
          This is only returned once upon creation. Make sure to copy and securely
          store it.
        "updated_at": "2020-02-20 00:00:00"  # Optional. The date and time
          the key was last updated.
    }
}
# response body for status code(s): 400, 404, 409
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(namespace_id: str, key_id: str, **kwargs: Any) MutableMapping[str, Any]

Delete a Namespace Access Key.

Deletes an access key for a serverless functions namespace.

To delete an access key, send a DELETE request to /v2/functions/namespaces/{namespace_id}/keys/{key_id}.

Parameters:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • key_id (str) – The ID of the access key to be managed. Required.

Returns:

JSON or JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(namespace_id: str, **kwargs: Any) MutableMapping[str, Any]

List Namespace Access Keys.

Lists all access keys for a serverless functions namespace.

To list access keys, send a GET request to /v2/functions/namespaces/{namespace_id}/keys.

Parameters:

namespace_id (str) – The ID of the namespace to be managed. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "access_keys": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. The date
              and time the key was created.
            "expires_at": "2020-02-20 00:00:00",  # Optional. When the
              key expires (null for non-expiring keys).
            "id": "str",  # Optional. The access key's unique identifier
              with prefix 'dof"" *v1*"" '.
            "name": "str",  # Optional. The access key's name.
            "updated_at": "2020-02-20 00:00:00"  # Optional. The date and
              time the key was last updated.
        }
    ],
    "count": 0  # Optional. Total number of access keys.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(namespace_id: str, key_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(namespace_id: str, key_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Namespace Access Key.

Updates the name of an access key for a serverless functions namespace.

To update an access key, send a PUT request to /v2/functions/namespaces/{namespace_id}/keys/{key_id}.

Parameters:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • key_id (str) – The ID of the access key to be managed. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # The new name for the access key. Required.
}

# response body for status code(s): 200
response == {
    "access_key": {
        "created_at": "2020-02-20 00:00:00",  # Optional. The date and time
          the key was created.
        "expires_at": "2020-02-20 00:00:00",  # Optional. When the key
          expires (null for non-expiring keys).
        "id": "str",  # Optional. The access key's unique identifier with
          prefix 'dof"" *v1*"" '.
        "name": "str",  # Optional. The access key's name.
        "updated_at": "2020-02-20 00:00:00"  # Optional. The date and time
          the key was last updated.
    }
}
# response body for status code(s): 400, 404, 409
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.FunctionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s functions attribute.

create_namespace(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_namespace(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Namespace.

Creates a new serverless functions namespace in the desired region and associates it with the provided label. A namespace is a collection of functions and their associated packages, triggers, and project specifications. To create a namespace, send a POST request to /v2/functions/namespaces with the region and label properties.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "label": "str",  # The namespace's unique name. Required.
    "region": "str"  # The `datacenter region
      <https://docs.digitalocean.com/products/platform/availability-matrix/#available-datacenters>`_
      in which to create the namespace. Required.
}

# response body for status code(s): 200
response == {
    "namespace": {
        "api_host": "str",  # Optional. The namespace's API hostname. Each
          function in a namespace is provided an endpoint at the namespace's hostname.
        "created_at": "str",  # Optional. UTC time string.
        "key": "str",  # Optional. A random alpha numeric string. This key is
          used in conjunction with the namespace's UUID to authenticate  a user to use
          the namespace via ``doctl``"" , DigitalOcean's official CLI.
        "label": "str",  # Optional. The namespace's unique name.
        "namespace": "str",  # Optional. A unique string format of UUID with
          a prefix fn-.
        "region": "str",  # Optional. The namespace's datacenter region.
        "updated_at": "str",  # Optional. UTC time string.
        "uuid": "str"  # Optional. The namespace's Universally Unique
          Identifier.
    }
}
# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_trigger(namespace_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_trigger(namespace_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Trigger.

Creates a new trigger for a given function in a namespace. To create a trigger, send a POST request to /v2/functions/namespaces/$NAMESPACE_ID/triggers with the name, function, type, is_enabled and scheduled_details properties.

Parameters:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "function": "str",  # Name of function(action) that exists in the given
      namespace. Required.
    "is_enabled": bool,  # Indicates weather the trigger is paused or unpaused.
      Required.
    "name": "str",  # The trigger's unique name within the namespace. Required.
    "scheduled_details": {
        "cron": "str",  # valid cron expression string which is required for
          SCHEDULED type triggers. Required.
        "body": {
            "name": "str"  # Optional. Optional data to be sent to
              function while triggering the function.
        }
    },
    "type": "str"  # One of different type of triggers. Currently only SCHEDULED
      is supported. Required.
}

# response body for status code(s): 200
response == {
    "trigger": {
        "created_at": "str",  # Optional. UTC time string.
        "function": "str",  # Optional. Name of function(action) that exists
          in the given namespace.
        "is_enabled": bool,  # Optional. Indicates weather the trigger is
          paused or unpaused.
        "name": "str",  # Optional. The trigger's unique name within the
          namespace.
        "namespace": "str",  # Optional. A unique string format of UUID with
          a prefix fn-.
        "scheduled_details": {
            "cron": "str",  # valid cron expression string which is
              required for SCHEDULED type triggers. Required.
            "body": {
                "name": "str"  # Optional. Optional data to be sent
                  to function while triggering the function.
            }
        },
        "scheduled_runs": {
            "last_run_at": "str",  # Optional. Indicates last run time.
              null value indicates trigger not run yet.
            "next_run_at": "str"  # Optional. Indicates next run time.
              null value indicates trigger will not run.
        },
        "type": "str",  # Optional. String which indicates the type of
          trigger source like SCHEDULED.
        "updated_at": "str"  # Optional. UTC time string.
    }
}
# response body for status code(s): 400, 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_namespace(namespace_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Namespace.

Deletes the given namespace. When a namespace is deleted all assets, in the namespace are deleted, this includes packages, functions and triggers. Deleting a namespace is a destructive operation and assets in the namespace are not recoverable after deletion. Some metadata is retained, such as activations, or soft deleted for reporting purposes. To delete namespace, send a DELETE request to /v2/functions/namespaces/$NAMESPACE_ID. A successful deletion returns a 204 response.

Parameters:

namespace_id (str) – The ID of the namespace to be managed. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_trigger(namespace_id: str, trigger_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Trigger.

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:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • trigger_name (str) – The name of the trigger to be managed. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_namespace(namespace_id: str, **kwargs: Any) MutableMapping[str, Any]

Get Namespace.

Gets the namespace details for the given namespace UUID. To get namespace details, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID with no parameters.

Parameters:

namespace_id (str) – The ID of the namespace to be managed. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "namespace": {
        "api_host": "str",  # Optional. The namespace's API hostname. Each
          function in a namespace is provided an endpoint at the namespace's hostname.
        "created_at": "str",  # Optional. UTC time string.
        "key": "str",  # Optional. A random alpha numeric string. This key is
          used in conjunction with the namespace's UUID to authenticate  a user to use
          the namespace via ``doctl``"" , DigitalOcean's official CLI.
        "label": "str",  # Optional. The namespace's unique name.
        "namespace": "str",  # Optional. A unique string format of UUID with
          a prefix fn-.
        "region": "str",  # Optional. The namespace's datacenter region.
        "updated_at": "str",  # Optional. UTC time string.
        "uuid": "str"  # Optional. The namespace's Universally Unique
          Identifier.
    }
}
# response body for status code(s): 403, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_trigger(namespace_id: str, trigger_name: str, **kwargs: Any) MutableMapping[str, Any]

Get Trigger.

Gets the trigger details. To get the trigger details, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME.

Parameters:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • trigger_name (str) – The name of the trigger to be managed. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "trigger": {
        "created_at": "str",  # Optional. UTC time string.
        "function": "str",  # Optional. Name of function(action) that exists
          in the given namespace.
        "is_enabled": bool,  # Optional. Indicates weather the trigger is
          paused or unpaused.
        "name": "str",  # Optional. The trigger's unique name within the
          namespace.
        "namespace": "str",  # Optional. A unique string format of UUID with
          a prefix fn-.
        "scheduled_details": {
            "cron": "str",  # valid cron expression string which is
              required for SCHEDULED type triggers. Required.
            "body": {
                "name": "str"  # Optional. Optional data to be sent
                  to function while triggering the function.
            }
        },
        "scheduled_runs": {
            "last_run_at": "str",  # Optional. Indicates last run time.
              null value indicates trigger not run yet.
            "next_run_at": "str"  # Optional. Indicates next run time.
              null value indicates trigger will not run.
        },
        "type": "str",  # Optional. String which indicates the type of
          trigger source like SCHEDULED.
        "updated_at": "str"  # Optional. UTC time string.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_namespaces(**kwargs: Any) MutableMapping[str, Any]

List Namespaces.

Returns a list of namespaces associated with the current user. To get all namespaces, send a GET request to /v2/functions/namespaces.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "namespaces": [
        {
            "api_host": "str",  # Optional. The namespace's API hostname.
              Each function in a namespace is provided an endpoint at the namespace's
              hostname.
            "created_at": "str",  # Optional. UTC time string.
            "key": "str",  # Optional. A random alpha numeric string.
              This key is used in conjunction with the namespace's UUID to authenticate
              a user to use the namespace via ``doctl``"" , DigitalOcean's official
              CLI.
            "label": "str",  # Optional. The namespace's unique name.
            "namespace": "str",  # Optional. A unique string format of
              UUID with a prefix fn-.
            "region": "str",  # Optional. The namespace's datacenter
              region.
            "updated_at": "str",  # Optional. UTC time string.
            "uuid": "str"  # Optional. The namespace's Universally Unique
              Identifier.
        }
    ]
}
list_triggers(namespace_id: str, **kwargs: Any) MutableMapping[str, Any]

List Triggers.

Returns a list of triggers associated with the current user and namespace. To get all triggers, send a GET request to /v2/functions/namespaces/$NAMESPACE_ID/triggers.

Parameters:

namespace_id (str) – The ID of the namespace to be managed. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "triggers": [
        {
            "created_at": "str",  # Optional. UTC time string.
            "function": "str",  # Optional. Name of function(action) that
              exists in the given namespace.
            "is_enabled": bool,  # Optional. Indicates weather the
              trigger is paused or unpaused.
            "name": "str",  # Optional. The trigger's unique name within
              the namespace.
            "namespace": "str",  # Optional. A unique string format of
              UUID with a prefix fn-.
            "scheduled_details": {
                "cron": "str",  # valid cron expression string which
                  is required for SCHEDULED type triggers. Required.
                "body": {
                    "name": "str"  # Optional. Optional data to
                      be sent to function while triggering the function.
                }
            },
            "scheduled_runs": {
                "last_run_at": "str",  # Optional. Indicates last run
                  time. null value indicates trigger not run yet.
                "next_run_at": "str"  # Optional. Indicates next run
                  time. null value indicates trigger will not run.
            },
            "type": "str",  # Optional. String which indicates the type
              of trigger source like SCHEDULED.
            "updated_at": "str"  # Optional. UTC time string.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_trigger(namespace_id: str, trigger_name: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_trigger(namespace_id: str, trigger_name: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Trigger.

Updates the details of the given trigger. To update a trigger, send a PUT request to /v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME with new values for the is_enabled or scheduled_details properties.

Parameters:
  • namespace_id (str) – The ID of the namespace to be managed. Required.

  • trigger_name (str) – The name of the trigger to be managed. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "is_enabled": bool,  # Optional. Indicates weather the trigger is paused or
      unpaused.
    "scheduled_details": {
        "cron": "str",  # valid cron expression string which is required for
          SCHEDULED type triggers. Required.
        "body": {
            "name": "str"  # Optional. Optional data to be sent to
              function while triggering the function.
        }
    }
}

# response body for status code(s): 200
response == {
    "trigger": {
        "created_at": "str",  # Optional. UTC time string.
        "function": "str",  # Optional. Name of function(action) that exists
          in the given namespace.
        "is_enabled": bool,  # Optional. Indicates weather the trigger is
          paused or unpaused.
        "name": "str",  # Optional. The trigger's unique name within the
          namespace.
        "namespace": "str",  # Optional. A unique string format of UUID with
          a prefix fn-.
        "scheduled_details": {
            "cron": "str",  # valid cron expression string which is
              required for SCHEDULED type triggers. Required.
            "body": {
                "name": "str"  # Optional. Optional data to be sent
                  to function while triggering the function.
            }
        },
        "scheduled_runs": {
            "last_run_at": "str",  # Optional. Indicates last run time.
              null value indicates trigger not run yet.
            "next_run_at": "str"  # Optional. Indicates next run time.
              null value indicates trigger will not run.
        },
        "type": "str",  # Optional. String which indicates the type of
          trigger source like SCHEDULED.
        "updated_at": "str"  # Optional. UTC time string.
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.GenaiOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s genai attribute.

attach_agent(parent_agent_uuid: str, child_agent_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
attach_agent(parent_agent_uuid: str, child_agent_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Add Agent Route to an Agent.

To add an agent route to an agent, send a POST request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}.

Parameters:
  • parent_agent_uuid (str) – A unique identifier for the parent agent. Required.

  • child_agent_uuid (str) – Routed agent id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "child_agent_uuid": "str",  # Optional. Routed agent id.
    "if_case": "str",  # Optional.
    "parent_agent_uuid": "str",  # Optional. A unique identifier for the parent
      agent.
    "route_name": "str"  # Optional. Name of route.
}

# response body for status code(s): 200
response == {
    "child_agent_uuid": "str",  # Optional. Routed agent id.
    "parent_agent_uuid": "str"  # Optional. A unique identifier for the parent
      agent.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
attach_agent_function(agent_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
attach_agent_function(agent_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Add Function Route to an Agent.

To create a function route for an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/functions.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuid": "str",  # Optional. Agent id.
    "description": "str",  # Optional. Function description.
    "faas_name": "str",  # Optional. The name of the function in the DigitalOcean
      functions platform.
    "faas_namespace": "str",  # Optional. The namespace of the function in the
      DigitalOcean functions platform.
    "function_name": "str",  # Optional. Function name.
    "input_schema": {},  # Optional. Describe the input schema for the function
      so the agent may call it.
    "output_schema": {}  # Optional. Describe the output schema for the function
      so the agent handle its response.
}

# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
attach_agent_guardrails(agent_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
attach_agent_guardrails(agent_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Attach Guardrails to an Agent.

To attach guardrails to an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/guardrails.

Parameters:
  • agent_uuid (str) – The UUID of the agent. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuid": "str",  # Optional. The UUID of the agent.
    "guardrails": [
        {
            "guardrail_uuid": "str",  # Optional. Guardrail uuid.
            "priority": 0  # Optional. Priority of the guardrail.
        }
    ]
}

# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
attach_knowledge_base(agent_uuid: str, knowledge_base_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Attach Knowledge Base to an Agent.

To attach a knowledge base to an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}.

Parameters:
  • agent_uuid (str) – A unique identifier for an agent. Required.

  • knowledge_base_uuid (str) – A unique identifier for a knowledge base. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
attach_knowledge_bases(agent_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Attach Knowledge Bases to an Agent.

To attach knowledge bases to an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/knowledge_bases.

Parameters:

agent_uuid (str) – A unique identifier for an agent. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
cancel_indexing_job(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
cancel_indexing_job(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Cancel Indexing Job for a Knowledge Base.

To cancel an indexing job for a knowledge base, send a PUT request to /v2/gen-ai/indexing_jobs/{uuid}/cancel.

Parameters:
  • uuid (str) – A unique identifier for an indexing job. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "uuid": "str"  # Optional. A unique identifier for an indexing job.
}

# response body for status code(s): 200
response == {
    "job": {
        "completed_datasources": 0,  # Optional. Number of datasources
          indexed completed.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "data_source_jobs": [
            {
                "completed_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source completed indexing.
                "data_source_uuid": "str",  # Optional. Uuid of the
                  indexed data source.
                "error_details": "str",  # Optional. A detailed error
                  description.
                "error_msg": "str",  # Optional. A string code
                  provinding a hint which part of the system experienced an error.
                "failed_item_count": "str",  # Optional. Total count
                  of files that have failed.
                "indexed_file_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "indexed_item_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "removed_item_count": "str",  # Optional. Total count
                  of files that have been removed.
                "skipped_item_count": "str",  # Optional. Total count
                  of files that have been skipped.
                "started_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source started indexing.
                "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                  Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                  "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
                  "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                  "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
                  "DATA_SOURCE_STATUS_CANCELLED".
                "total_bytes": "str",  # Optional. Total size of
                  files in data source in bytes.
                "total_bytes_indexed": "str",  # Optional. Total size
                  of files in data source in bytes that have been indexed.
                "total_file_count": "str"  # Optional. Total file
                  count in the data source.
            }
        ],
        "data_source_uuids": [
            "str"  # Optional. IndexingJob description.
        ],
        "finished_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
          description.
        "is_report_available": bool,  # Optional. Boolean value to determine
          if the indexing job details are available.
        "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
        "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
          "BATCH_JOB_PHASE_UNKNOWN". Known values are: "BATCH_JOB_PHASE_UNKNOWN",
          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
        "started_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
          description.
        "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
          "INDEX_JOB_STATUS_UNKNOWN". Known values are: "INDEX_JOB_STATUS_UNKNOWN",
          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
          "INDEX_JOB_STATUS_CANCELLED".
        "tokens": 0,  # Optional. Number of tokens [This field is
          deprecated].
        "total_datasources": 0,  # Optional. Number of datasources being
          indexed.
        "total_tokens": "str",  # Optional. Total Tokens Consumed By the
          Indexing Job.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_agent(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_agent(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create an Agent.

To create a new agent, send a POST request to /v2/gen-ai/agents. The response body contains a JSON object with the newly created agent object.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "anthropic_key_uuid": "str",  # Optional. Optional Anthropic API key ID to
      use with Anthropic models.
    "description": "str",  # Optional. A text description of the agent, not used
      in inference.
    "instruction": "str",  # Optional. Agent instruction. Instructions help your
      agent to perform its job effectively. See `Write Effective Agent Instructions
      <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
      for best practices.
    "knowledge_base_uuid": [
        "str"  # Optional. Ids of the knowledge base(s) to attach to the
          agent.
    ],
    "mcp_servers": [
        {
            "allowed_tools": [
                "str"  # Optional. Optional list of allowed tool
                  names to expose from this server.
            ],
            "authorization": "str",  # Optional. Optional authorization
              header value for the MCP server.
            "headers": {
                "str": "str"  # Optional. Optional additional headers
                  to send to the MCP server.
            },
            "server_label": "str",  # Optional. A label identifying this
              MCP server.
            "server_url": "str"  # Optional. The URL of the MCP server.
        }
    ],
    "model_provider_key_uuid": "str",  # Optional.
    "model_router_uuid": "str",  # Optional.
    "model_uuid": "str",  # Optional. Identifier for the foundation model.
    "name": "str",  # Optional. Agent name.
    "open_ai_key_uuid": "str",  # Optional. Optional OpenAI API key ID to use
      with OpenAI models.
    "project_id": "str",  # Optional. The id of the DigitalOcean project this
      agent will belong to.
    "reasoning_effort": "str",  # Optional.
    "region": "str",  # Optional. The DigitalOcean region to deploy your agent
      in.
    "router_preset_slug": "str",  # Optional.
    "tags": [
        "str"  # Optional. Agent tag to organize related resources.
    ],
    "thinking_token_budget": 0,  # Optional.
    "workspace_uuid": "str"  # Optional. Identifier for the workspace.
}

# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_agent_api_key(agent_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_agent_api_key(agent_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create an Agent API Key.

To create an agent API key, send a POST request to /v2/gen-ai/agents/{agent_uuid}/api_keys.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuid": "str",  # Optional. Agent id.
    "name": "str"  # Optional. A human friendly name to identify the key.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Agent API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_anthropic_api_key(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_anthropic_api_key(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Anthropic API Key.

To create an Anthropic API key, send a POST request to /v2/gen-ai/anthropic/keys.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "api_key": "str",  # Optional. Anthropic API key.
    "name": "str"  # Optional. Name of the key.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_data_source_file_upload_presigned_urls(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_data_source_file_upload_presigned_urls(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Presigned URLs for Data Source File Upload.

To create presigned URLs for knowledge base data source file upload, send a POST request to /v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "files": [
        {
            "file_name": "str",  # Optional. Local filename.
            "file_size": "str"  # Optional. The size of the file in
              bytes.
        }
    ]
}

# response body for status code(s): 200
response == {
    "request_id": "str",  # Optional. The ID generated for the request for
      Presigned URLs.
    "uploads": [
        {
            "expires_at": "2020-02-20 00:00:00",  # Optional. The time
              the url expires at.
            "object_key": "str",  # Optional. The unique object key to
              store the file as.
            "original_file_name": "str",  # Optional. The original file
              name.
            "presigned_url": "str"  # Optional. The actual presigned URL
              the client can use to upload the file directly.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_evaluation_dataset(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_evaluation_dataset(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Evaluation Dataset.

To create an evaluation dataset, send a POST request to /v2/gen-ai/evaluation_datasets.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
      is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
      "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK",
      "EVALUATION_DATASET_TYPE_NON_ADK", and "EVALUATION_DATASET_TYPE_MODEL".
    "file_upload_dataset": {
        "original_file_name": "str",  # Optional. The original file name.
        "size_in_bytes": "str",  # Optional. The size of the file in bytes.
        "stored_object_key": "str"  # Optional. The object key the file was
          stored as.
    },
    "name": "str"  # Optional. The name of the agent evaluation dataset.
}

# response body for status code(s): 200
response == {
    "evaluation_dataset_uuid": "str"  # Optional. Evaluation dataset uuid.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_evaluation_dataset_file_upload_presigned_urls(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_evaluation_dataset_file_upload_presigned_urls(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Presigned URLs for Evaluation Dataset File Upload.

To create presigned URLs for evaluation dataset file upload, send a POST request to /v2/gen-ai/evaluation_datasets/file_upload_presigned_urls.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "files": [
        {
            "file_name": "str",  # Optional. Local filename.
            "file_size": "str"  # Optional. The size of the file in
              bytes.
        }
    ]
}

# response body for status code(s): 200
response == {
    "request_id": "str",  # Optional. The ID generated for the request for
      Presigned URLs.
    "uploads": [
        {
            "expires_at": "2020-02-20 00:00:00",  # Optional. The time
              the url expires at.
            "object_key": "str",  # Optional. The unique object key to
              store the file as.
            "original_file_name": "str",  # Optional. The original file
              name.
            "presigned_url": "str"  # Optional. The actual presigned URL
              the client can use to upload the file directly.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_evaluation_test_case(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_evaluation_test_case(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Evaluation Test Case.

To create an evaluation test-case send a POST request to /v2/gen-ai/evaluation_test_cases.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_workspace_name": "str",  # Optional.
    "dataset_uuid": "str",  # Optional. Dataset against which the test"u2011case
      is executed.
    "description": "str",  # Optional. Description of the test case.
    "metrics": [
        "str"  # Optional. Full metric list to use for evaluation test case.
    ],
    "name": "str",  # Optional. Name of the test case.
    "star_metric": {
        "metric_uuid": "str",  # Optional.
        "name": "str",  # Optional.
        "success_threshold": 0.0,  # Optional. The success threshold for the
          star metric. This is a value that the metric must reach to be considered
          successful.
        "success_threshold_pct": 0  # Optional. The success threshold for the
          star metric. This is a percentage value between 0 and 100.
    },
    "workspace_uuid": "str"  # Optional. The workspace uuid.
}

# response body for status code(s): 200
response == {
    "test_case_uuid": "str"  # Optional. Test"u2011case UUID.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_indexing_job(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_indexing_job(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Start Indexing Job for a Knowledge Base.

To start an indexing job for a knowledge base, send a POST request to /v2/gen-ai/indexing_jobs.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "data_source_uuids": [
        "str"  # Optional. List of data source ids to index, if none are
          provided, all data sources will be indexed.
    ],
    "knowledge_base_uuid": "str"  # Optional. Knowledge base id.
}

# response body for status code(s): 200
response == {
    "job": {
        "completed_datasources": 0,  # Optional. Number of datasources
          indexed completed.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "data_source_jobs": [
            {
                "completed_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source completed indexing.
                "data_source_uuid": "str",  # Optional. Uuid of the
                  indexed data source.
                "error_details": "str",  # Optional. A detailed error
                  description.
                "error_msg": "str",  # Optional. A string code
                  provinding a hint which part of the system experienced an error.
                "failed_item_count": "str",  # Optional. Total count
                  of files that have failed.
                "indexed_file_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "indexed_item_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "removed_item_count": "str",  # Optional. Total count
                  of files that have been removed.
                "skipped_item_count": "str",  # Optional. Total count
                  of files that have been skipped.
                "started_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source started indexing.
                "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                  Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                  "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
                  "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                  "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
                  "DATA_SOURCE_STATUS_CANCELLED".
                "total_bytes": "str",  # Optional. Total size of
                  files in data source in bytes.
                "total_bytes_indexed": "str",  # Optional. Total size
                  of files in data source in bytes that have been indexed.
                "total_file_count": "str"  # Optional. Total file
                  count in the data source.
            }
        ],
        "data_source_uuids": [
            "str"  # Optional. IndexingJob description.
        ],
        "finished_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
          description.
        "is_report_available": bool,  # Optional. Boolean value to determine
          if the indexing job details are available.
        "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
        "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
          "BATCH_JOB_PHASE_UNKNOWN". Known values are: "BATCH_JOB_PHASE_UNKNOWN",
          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
        "started_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
          description.
        "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
          "INDEX_JOB_STATUS_UNKNOWN". Known values are: "INDEX_JOB_STATUS_UNKNOWN",
          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
          "INDEX_JOB_STATUS_CANCELLED".
        "tokens": 0,  # Optional. Number of tokens [This field is
          deprecated].
        "total_datasources": 0,  # Optional. Number of datasources being
          indexed.
        "total_tokens": "str",  # Optional. Total Tokens Consumed By the
          Indexing Job.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_knowledge_base(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_knowledge_base(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Knowledge Base.

To create a knowledge base, send a POST request to /v2/gen-ai/knowledge_bases.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "database_id": "str",  # Optional. Identifier of the DigitalOcean OpenSearch
      database this knowledge base will use, optional. If not provided, we create a new
      database for the knowledge base in the same region as the knowledge base.
    "datasources": [
        {
            "aws_data_source": {
                "bucket_name": "str",  # Optional. Spaces bucket
                  name.
                "item_path": "str",  # Optional. AWS S3 Data Source.
                "key_id": "str",  # Optional. The AWS Key ID.
                "region": "str",  # Optional. Region of bucket.
                "secret_key": "str"  # Optional. The AWS Secret Key.
            },
            "bucket_name": "str",  # Optional. Deprecated, moved to
              data_source_details.
            "bucket_region": "str",  # Optional. Deprecated, moved to
              data_source_details.
            "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",  #
              Optional. Default value is "CHUNKING_ALGORITHM_UNKNOWN". Known values
              are: "CHUNKING_ALGORITHM_UNKNOWN", "CHUNKING_ALGORITHM_SECTION_BASED",
              "CHUNKING_ALGORITHM_HIERARCHICAL", "CHUNKING_ALGORITHM_SEMANTIC", and
              "CHUNKING_ALGORITHM_FIXED_LENGTH".
            "chunking_options": {
                "child_chunk_size": 0,  # Optional. Optional data
                  sources to attach at creation. Omit or use an empty list to create
                  the knowledge base without sources, then add sources (with chunking
                  strategy and sizes) using `Add a Data Source to a Knowledge Base
                  <#operation/create_knowledge_base_data_source>`_. When provided, see
                  `Organize Data Sources
                  <https://docs.digitalocean.com/products/gradient-ai-platform/how-to/create-manage-agent-knowledge-bases/#add-data-sources>`_
                  for best practices.
                "max_chunk_size": 0,  # Optional. Common options.
                "parent_chunk_size": 0,  # Optional. Hierarchical
                  options.
                "semantic_threshold": 0.0  # Optional. Semantic
                  options.
            },
            "dropbox_data_source": {
                "folder": "str",  # Optional. Dropbox Data Source.
                "refresh_token": "str"  # Optional. Refresh token.
                  you can obrain a refresh token by following the oauth2 flow. see
                  /v2/gen-ai/oauth2/dropbox/tokens for reference.
            },
            "file_upload_data_source": {
                "original_file_name": "str",  # Optional. The
                  original file name.
                "size_in_bytes": "str",  # Optional. The size of the
                  file in bytes.
                "stored_object_key": "str"  # Optional. The object
                  key the file was stored as.
            },
            "google_drive_data_source": {
                "folder_id": "str",  # Optional. Google Drive Data
                  Source.
                "refresh_token": "str"  # Optional. Refresh token.
                  you can obrain a refresh token by following the oauth2 flow. see
                  /v2/gen-ai/oauth2/google/tokens for reference.
            },
            "item_path": "str",  # Optional. Optional data sources to
              attach at creation. Omit or use an empty list to create the knowledge
              base without sources, then add sources (with chunking strategy and sizes)
              using `Add a Data Source to a Knowledge Base
              <#operation/create_knowledge_base_data_source>`_. When provided, see
              `Organize Data Sources
              <https://docs.digitalocean.com/products/gradient-ai-platform/how-to/create-manage-agent-knowledge-bases/#add-data-sources>`_
              for best practices.
            "spaces_data_source": {
                "bucket_name": "str",  # Optional. Spaces bucket
                  name.
                "item_path": "str",  # Optional. Spaces Bucket Data
                  Source.
                "region": "str"  # Optional. Region of bucket.
            },
            "web_crawler_data_source": {
                "base_url": "str",  # Optional. The base url to
                  crawl.
                "crawling_option": "UNKNOWN",  # Optional. Default
                  value is "UNKNOWN". Options for specifying how URLs found on pages
                  should be handled.   * UNKNOWN: Default unknown value * SCOPED: Only
                  include the base URL. * PATH: Crawl the base URL and linked pages
                  within the URL path. * DOMAIN: Crawl the base URL and linked pages
                  within the same domain. * SUBDOMAINS: Crawl the base URL and linked
                  pages for any subdomain. * SITEMAP: Crawl URLs discovered in the
                  sitemap. Known values are: "UNKNOWN", "SCOPED", "PATH", "DOMAIN",
                  "SUBDOMAINS", and "SITEMAP".
                "embed_media": bool,  # Optional. Whether to ingest
                  and index media (images, etc.) on web pages.
                "exclude_tags": [
                    "str"  # Optional. Declaring which tags to
                      exclude in web pages while webcrawling.
                ]
            }
        }
    ],
    "embedding_model_uuid": "str",  # Optional. Identifier for the `embedding
      model
      <https://docs.digitalocean.com/products/genai-platform/details/models/#embedding-models>`_.
    "name": "str",  # Optional. Name of the knowledge base.
    "project_id": "str",  # Optional. Identifier of the DigitalOcean project this
      knowledge base will belong to.
    "region": "str",  # Optional. The datacenter region to deploy the knowledge
      base in.
    "reranking_config": {
        "enabled": bool,  # Optional. Whether reranking is enabled for
          retrieval.
        "model": "str"  # Optional. Reranker model internal name.
    },
    "size": "OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED",  # Optional. Default value is
      "OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED". Known values are:
      "OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED", "OPEN_SEARCH_PLAN_SIZE_SMALL",
      "OPEN_SEARCH_PLAN_SIZE_MEDIUM", "OPEN_SEARCH_PLAN_SIZE_LARGE", and
      "OPEN_SEARCH_PLAN_SIZE_EXTRA_LARGE".
    "tags": [
        "str"  # Optional. Tags to organize your knowledge base.
    ],
    "vpc_uuid": "str"  # Optional. The VPC to deploy the knowledge base database
      in.
}

# response body for status code(s): 200
response == {
    "knowledge_base": {
        "added_to_agent_at": "2020-02-20 00:00:00",  # Optional. Time when
          the knowledge base was added to the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "database_id": "str",  # Optional. Knowledgebase Description.
        "embedding_model_uuid": "str",  # Optional. Knowledgebase
          Description.
        "is_public": bool,  # Optional. Whether the knowledge base is public
          or not.
        "last_indexing_job": {
            "completed_datasources": 0,  # Optional. Number of
              datasources indexed completed.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "data_source_jobs": [
                {
                    "completed_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source completed indexing.
                    "data_source_uuid": "str",  # Optional. Uuid
                      of the indexed data source.
                    "error_details": "str",  # Optional. A
                      detailed error description.
                    "error_msg": "str",  # Optional. A string
                      code provinding a hint which part of the system experienced an
                      error.
                    "failed_item_count": "str",  # Optional.
                      Total count of files that have failed.
                    "indexed_file_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "indexed_item_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "removed_item_count": "str",  # Optional.
                      Total count of files that have been removed.
                    "skipped_item_count": "str",  # Optional.
                      Total count of files that have been skipped.
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source started indexing.
                    "status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                      Optional. Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known
                      values are: "DATA_SOURCE_STATUS_UNKNOWN",
                      "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED",
                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                      "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED",
                      and "DATA_SOURCE_STATUS_CANCELLED".
                    "total_bytes": "str",  # Optional. Total size
                      of files in data source in bytes.
                    "total_bytes_indexed": "str",  # Optional.
                      Total size of files in data source in bytes that have been
                      indexed.
                    "total_file_count": "str"  # Optional. Total
                      file count in the data source.
                }
            ],
            "data_source_uuids": [
                "str"  # Optional. IndexingJob description.
            ],
            "finished_at": "2020-02-20 00:00:00",  # Optional.
              IndexingJob description.
            "is_report_available": bool,  # Optional. Boolean value to
              determine if the indexing job details are available.
            "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
            "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default
              value is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
              "BATCH_JOB_PHASE_CANCELLED".
            "started_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
              description.
            "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
              value is "INDEX_JOB_STATUS_UNKNOWN". Known values are:
              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
              "INDEX_JOB_STATUS_IN_PROGRESS", "INDEX_JOB_STATUS_COMPLETED",
              "INDEX_JOB_STATUS_FAILED", "INDEX_JOB_STATUS_NO_CHANGES",
              "INDEX_JOB_STATUS_PENDING", and "INDEX_JOB_STATUS_CANCELLED".
            "tokens": 0,  # Optional. Number of tokens [This field is
              deprecated].
            "total_datasources": 0,  # Optional. Number of datasources
              being indexed.
            "total_tokens": "str",  # Optional. Total Tokens Consumed By
              the Indexing Job.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Name of knowledge base.
        "project_id": "str",  # Optional. Knowledgebase Description.
        "region": "str",  # Optional. Region code.
        "reranking_config": {
            "enabled": bool,  # Optional. Whether reranking is enabled
              for retrieval.
            "model": "str"  # Optional. Reranker model internal name.
        },
        "tags": [
            "str"  # Optional. Tags to organize related resources.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "user_id": "str",  # Optional. Id of user that created the knowledge
          base.
        "uuid": "str"  # Optional. Unique id for knowledge base.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_knowledge_base_data_source(knowledge_base_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_knowledge_base_data_source(knowledge_base_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Add Data Source to a Knowledge Base.

To add a data source to a knowledge base, send a POST request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources.

Parameters:
  • knowledge_base_uuid (str) – Knowledge base id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "aws_data_source": {
        "bucket_name": "str",  # Optional. Spaces bucket name.
        "item_path": "str",  # Optional. AWS S3 Data Source.
        "key_id": "str",  # Optional. The AWS Key ID.
        "region": "str",  # Optional. Region of bucket.
        "secret_key": "str"  # Optional. The AWS Secret Key.
    },
    "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",  # Optional. Default
      value is "CHUNKING_ALGORITHM_UNKNOWN". Known values are:
      "CHUNKING_ALGORITHM_UNKNOWN", "CHUNKING_ALGORITHM_SECTION_BASED",
      "CHUNKING_ALGORITHM_HIERARCHICAL", "CHUNKING_ALGORITHM_SEMANTIC", and
      "CHUNKING_ALGORITHM_FIXED_LENGTH".
    "chunking_options": {
        "child_chunk_size": 0,  # Optional.
        "max_chunk_size": 0,  # Optional. Common options.
        "parent_chunk_size": 0,  # Optional. Hierarchical options.
        "semantic_threshold": 0.0  # Optional. Semantic options.
    },
    "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
    "spaces_data_source": {
        "bucket_name": "str",  # Optional. Spaces bucket name.
        "item_path": "str",  # Optional. Spaces Bucket Data Source.
        "region": "str"  # Optional. Region of bucket.
    },
    "web_crawler_data_source": {
        "base_url": "str",  # Optional. The base url to crawl.
        "crawling_option": "UNKNOWN",  # Optional. Default value is
          "UNKNOWN". Options for specifying how URLs found on pages should be handled.
          * UNKNOWN: Default unknown value * SCOPED: Only include the base URL. * PATH:
          Crawl the base URL and linked pages within the URL path. * DOMAIN: Crawl the
          base URL and linked pages within the same domain. * SUBDOMAINS: Crawl the
          base URL and linked pages for any subdomain. * SITEMAP: Crawl URLs discovered
          in the sitemap. Known values are: "UNKNOWN", "SCOPED", "PATH", "DOMAIN",
          "SUBDOMAINS", and "SITEMAP".
        "embed_media": bool,  # Optional. Whether to ingest and index media
          (images, etc.) on web pages.
        "exclude_tags": [
            "str"  # Optional. Declaring which tags to exclude in web
              pages while webcrawling.
        ]
    }
}

# response body for status code(s): 200
response == {
    "knowledge_base_data_source": {
        "aws_data_source": {
            "bucket_name": "str",  # Optional. Spaces bucket name.
            "item_path": "str",  # Optional. AWS S3 Data Source for
              Display.
            "region": "str"  # Optional. Region of bucket.
        },
        "bucket_name": "str",  # Optional. Name of storage bucket -
          Deprecated, moved to data_source_details.
        "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",  # Optional.
          Default value is "CHUNKING_ALGORITHM_UNKNOWN". Known values are:
          "CHUNKING_ALGORITHM_UNKNOWN", "CHUNKING_ALGORITHM_SECTION_BASED",
          "CHUNKING_ALGORITHM_HIERARCHICAL", "CHUNKING_ALGORITHM_SEMANTIC", and
          "CHUNKING_ALGORITHM_FIXED_LENGTH".
        "chunking_options": {
            "child_chunk_size": 0,  # Optional. Data Source configuration
              for Knowledge Bases.
            "max_chunk_size": 0,  # Optional. Common options.
            "parent_chunk_size": 0,  # Optional. Hierarchical options.
            "semantic_threshold": 0.0  # Optional. Semantic options.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "dropbox_data_source": {
            "folder": "str"  # Optional. Dropbox Data Source for Display.
        },
        "file_upload_data_source": {
            "original_file_name": "str",  # Optional. The original file
              name.
            "size_in_bytes": "str",  # Optional. The size of the file in
              bytes.
            "stored_object_key": "str"  # Optional. The object key the
              file was stored as.
        },
        "google_drive_data_source": {
            "folder_id": "str",  # Optional. Google Drive Data Source for
              Display.
            "folder_name": "str"  # Optional. Name of the selected folder
              if available.
        },
        "item_path": "str",  # Optional. Path of folder or object in bucket -
          Deprecated, moved to data_source_details.
        "last_datasource_indexing_job": {
            "completed_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when data source completed indexing.
            "data_source_uuid": "str",  # Optional. Uuid of the indexed
              data source.
            "error_details": "str",  # Optional. A detailed error
              description.
            "error_msg": "str",  # Optional. A string code provinding a
              hint which part of the system experienced an error.
            "failed_item_count": "str",  # Optional. Total count of files
              that have failed.
            "indexed_file_count": "str",  # Optional. Total count of
              files that have been indexed.
            "indexed_item_count": "str",  # Optional. Total count of
              files that have been indexed.
            "removed_item_count": "str",  # Optional. Total count of
              files that have been removed.
            "skipped_item_count": "str",  # Optional. Total count of
              files that have been skipped.
            "started_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when data source started indexing.
            "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
              value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
              "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
              "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
              "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
              "DATA_SOURCE_STATUS_CANCELLED".
            "total_bytes": "str",  # Optional. Total size of files in
              data source in bytes.
            "total_bytes_indexed": "str",  # Optional. Total size of
              files in data source in bytes that have been indexed.
            "total_file_count": "str"  # Optional. Total file count in
              the data source.
        },
        "region": "str",  # Optional. Region code - Deprecated, moved to
          data_source_details.
        "spaces_data_source": {
            "bucket_name": "str",  # Optional. Spaces bucket name.
            "item_path": "str",  # Optional. Spaces Bucket Data Source.
            "region": "str"  # Optional. Region of bucket.
        },
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str",  # Optional. Unique id of knowledge base.
        "web_crawler_data_source": {
            "base_url": "str",  # Optional. The base url to crawl.
            "crawling_option": "UNKNOWN",  # Optional. Default value is
              "UNKNOWN". Options for specifying how URLs found on pages should be
              handled.   * UNKNOWN: Default unknown value * SCOPED: Only include the
              base URL. * PATH: Crawl the base URL and linked pages within the URL
              path. * DOMAIN: Crawl the base URL and linked pages within the same
              domain. * SUBDOMAINS: Crawl the base URL and linked pages for any
              subdomain. * SITEMAP: Crawl URLs discovered in the sitemap. Known values
              are: "UNKNOWN", "SCOPED", "PATH", "DOMAIN", "SUBDOMAINS", and "SITEMAP".
            "embed_media": bool,  # Optional. Whether to ingest and index
              media (images, etc.) on web pages.
            "exclude_tags": [
                "str"  # Optional. Declaring which tags to exclude in
                  web pages while webcrawling.
            ]
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_model_api_key(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_model_api_key(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Model API Key.

To create a model API key, send a POST request to /v2/gen-ai/models/api_keys.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # Optional. A human friendly name to identify the key.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Model API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_model_eval_dataset_upload_presigned_urls(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_model_eval_dataset_upload_presigned_urls(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Presigned URLs for Model Evaluation Dataset File Upload.

To create presigned URLs for model evaluation dataset file upload, send a POST request to /v2/genai/model_evaluation/datasets/file_upload_presigned_urls.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "files": [
        {
            "file_name": "str",  # Optional. Local filename.
            "file_size": "str"  # Optional. The size of the file in
              bytes.
        }
    ]
}

# response body for status code(s): 200
response == {
    "request_id": "str",  # Optional. The ID generated for the request for
      Presigned URLs.
    "uploads": [
        {
            "expires_at": "2020-02-20 00:00:00",  # Optional. The time
              the url expires at.
            "object_key": "str",  # Optional. The unique object key to
              store the file as.
            "original_file_name": "str",  # Optional. The original file
              name.
            "presigned_url": "str"  # Optional. The actual presigned URL
              the client can use to upload the file directly.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_model_evaluation_run(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_model_evaluation_run(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Model Evaluation Run.

To create a model evaluation run, send a POST request to /v2/genai/model_evaluation_runs.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "candidate_inference_config": {
        "max_tokens": 0,  # Optional. Inference configuration for the
          candidate model during evaluation.
        "stop_token": "str",  # Optional. Inference configuration for the
          candidate model during evaluation.
        "system_prompt": "str",  # Optional. Inference configuration for the
          candidate model during evaluation.
        "temperature": 0.0  # Optional. Inference configuration for the
          candidate model during evaluation.
    },
    "candidate_model_name": "str",  # Optional. Model slug used to call the
      candidate model API. For dedicated inference, this is the model slug from the
      deployment. For serverless, this should match the model's internal name.
    "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS",  # Optional.
      Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether inference runs
      against the serverless platform, a dedicated deployment, or a model router. Known
      values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS",
      "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER".
    "candidate_model_uuid": "str",  # Optional. UUID of the candidate model to
      evaluate.
    "dataset_uuid": "str",  # Optional. UUID of the dataset to use for
      evaluation.
    "eval_preset_uuid": "str",  # Optional.
    "judge_model_uuid": "str",  # Optional. UUID of the judge model used to score
      responses.
    "metric_uuids": [
        "str"  # Optional. UUIDs of metrics to evaluate (selected from
          ListModelEvaluationMetrics).
    ],
    "name": "str",  # Optional.
    "preset_name": "str",  # Optional.
    "save_as_preset": bool,  # Optional. .. role:: raw-html-m2r(raw)    :format:
      html   If true, saves the inline config as a reusable preset""
      :raw-html-m2r:`<br>` Ignored when eval_preset_uuid is provided.
    "source": "str",  # Optional. Source of the run creation (api, sdk, cli).
    "star_metric": {
        "metric_uuid": "str",  # Optional.
        "name": "str",  # Optional.
        "success_threshold": 0.0,  # Optional. The success threshold for the
          star metric. This is a value that the metric must reach to be considered
          successful.
        "success_threshold_pct": 0  # Optional. The success threshold for the
          star metric. This is a percentage value between 0 and 100.
    }
}

# response body for status code(s): 200
response == {
    "eval_run_uuid": "str"  # Optional. UUID of the created evaluation run.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_model_router(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_model_router(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Model Router.

To create a model router, send a POST request to /v2/gen-ai/models/routers.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "description": "str",  # Optional. Model router description.
    "fallback_models": [
        "str"  # Optional. Fallback models.
    ],
    "name": "str",  # Optional. Model router name.
    "policies": [
        {
            "custom_task": {
                "description": "str",  # Optional. Short task
                  description.
                "name": "str"  # Optional. Task name.
            },
            "models": [
                "str"  # Optional. Models assigned to the task.
            ],
            "selection_policy": {
                "prefer": "str"  # Optional. One of: none, cheapest,
                  fastest.
            },
            "task_slug": "str"  # Optional. Task slug.
        }
    ],
    "regions": [
        "str"  # Optional. Target regions for the router.
    ]
}

# response body for status code(s): 200
response == {
    "model_router": {
        "config": {
            "fallback_models": [
                "str"  # Optional. Router-level fallback models.
            ],
            "policies": [
                {
                    "custom_task": {
                        "description": "str",  # Optional.
                          Short task description.
                        "name": "str"  # Optional. Task name.
                    },
                    "models": [
                        "str"  # Optional. Models assigned to
                          the task.
                    ],
                    "selection_policy": {
                        "prefer": "str"  # Optional. One of:
                          none, cheapest, fastest.
                    },
                    "task_slug": "str"  # Optional. Task slug.
                }
            ]
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "description": "str",  # Optional. Description.
        "name": "str",  # Optional. Name of the model router.
        "regions": [
            "str"  # Optional. Target regions for the router.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_oauth2_dropbox_tokens(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_oauth2_dropbox_tokens(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Get Oauth2 Dropbox Tokens.

To obtain the refresh token, needed for creation of data sources, send a GET request to /v2/gen-ai/oauth2/dropbox/tokens. Pass the code you obtrained from the oauth flow in the field ‘code’.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "code": "str",  # Optional. The oauth2 code from google.
    "redirect_url": "str"  # Optional. Redirect url.
}

# response body for status code(s): 200
response == {
    "refresh_token": "str",  # Optional. The refresh token.
    "token": "str"  # Optional. The access token.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_openai_api_key(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_openai_api_key(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create OpenAI API Key.

To create an OpenAI API key, send a POST request to /v2/gen-ai/openai/keys.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "api_key": "str",  # Optional. OpenAI API key.
    "name": "str"  # Optional. Name of the key.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "models": [
            {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            }
        ],
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_scheduled_indexing(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_scheduled_indexing(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create scheduled indexing for knowledge base.

To create scheduled indexing for a knowledge base, send a POST request to /v2/gen-ai/scheduled-indexing.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "days": [
        0  # Optional. Days for execution (day is represented same as in a
          cron expression, e.g. Monday begins with 1 ).
    ],
    "knowledge_base_uuid": "str",  # Optional. Knowledge base uuid for which the
      schedule is created.
    "time": "str"  # Optional. Time of execution (HH:MM) UTC.
}

# response body for status code(s): 200
response == {
    "indexing_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Created at
          timestamp.
        "days": [
            0  # Optional. Days for execution (day is represented same as
              in a cron expression, e.g. Monday begins with 1 ).
        ],
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted at
          timestamp (if soft deleted).
        "is_active": bool,  # Optional. Whether the schedule is currently
          active.
        "knowledge_base_uuid": "str",  # Optional. Knowledge base uuid
          associated with this schedule.
        "last_ran_at": "2020-02-20 00:00:00",  # Optional. Last time the
          schedule was executed.
        "next_run_at": "2020-02-20 00:00:00",  # Optional. Next scheduled
          run.
        "time": "str",  # Optional. Scheduled time of execution (HH:MM:SS
          format).
        "updated_at": "2020-02-20 00:00:00",  # Optional. Updated at
          timestamp.
        "uuid": "str"  # Optional. Unique identifier for the scheduled
          indexing entry.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_workspace(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_workspace(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Workspace.

To create a new workspace, send a POST request to /v2/gen-ai/workspaces. The response body contains a JSON object with the newly created workspace object.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuids": [
        "str"  # Optional. Ids of the agents(s) to attach to the workspace.
    ],
    "description": "str",  # Optional. Description of the workspace.
    "name": "str"  # Optional. Name of the workspace.
}

# response body for status code(s): 200
response == {
    "workspace": {
        "agents": [
            {
                "anthropic_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "api_key_infos": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date.
                        "created_by": "str",  # Optional.
                          Created by.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Deleted date.
                        "name": "str",  # Optional. Name.
                        "secret_key": "str",  # Optional. Api
                          key infos.
                        "uuid": "str"  # Optional. Uuid.
                    }
                ],
                "api_keys": [
                    {
                        "api_key": "str"  # Optional. Api
                          key.
                    }
                ],
                "chatbot": {
                    "allowed_domains": [
                        "str"  # Optional. A Chatbot.
                    ],
                    "button_background_color": "str",  #
                      Optional. A Chatbot.
                    "logo": "str",  # Optional. A Chatbot.
                    "name": "str",  # Optional. Name of chatbot.
                    "primary_color": "str",  # Optional. A
                      Chatbot.
                    "secondary_color": "str",  # Optional. A
                      Chatbot.
                    "starting_message": "str"  # Optional. A
                      Chatbot.
                },
                "chatbot_identifiers": [
                    {
                        "agent_chatbot_identifier": "str"  #
                          Optional. Agent chatbot identifier.
                    }
                ],
                "child_agents": [
                    ...
                ],
                "conversation_logs_enabled": bool,  # Optional.
                  Whether conversation logs are enabled for the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "deployment": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "name": "str",  # Optional. Name.
                    "status": "STATUS_UNKNOWN",  # Optional.
                      Default value is "STATUS_UNKNOWN". Known values are:
                      "STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT",
                      "STATUS_DEPLOYING", "STATUS_RUNNING", "STATUS_FAILED",
                      "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
                      "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and
                      "STATUS_BUILDING".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Access your
                      deployed agent here.
                    "uuid": "str",  # Optional. Unique id.
                    "visibility": "VISIBILITY_UNKNOWN"  #
                      Optional. Default value is "VISIBILITY_UNKNOWN". *
                      VISIBILITY_UNKNOWN: The status of the deployment is unknown    *
                      VISIBILITY_DISABLED: The deployment is disabled and will no
                      longer service requests   * VISIBILITY_PLAYGROUND: Deprecated: No
                      longer a valid state   * VISIBILITY_PUBLIC: The deployment is
                      public and will service requests from the public internet   *
                      VISIBILITY_PRIVATE: The deployment is private and will only
                      service requests from other agents, or through API keys. Known
                      values are: "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED",
                      "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC", and
                      "VISIBILITY_PRIVATE".
                },
                "description": "str",  # Optional. Description of
                  agent.
                "functions": [
                    {
                        "api_key": "str",  # Optional. Api
                          key.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "description": "str",  # Optional.
                          Agent description.
                        "faas_name": "str",  # Optional.
                          Agents.
                        "faas_namespace": "str",  # Optional.
                          Agents.
                        "input_schema": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. Name.
                        "output_schema": {},  # Optional. Any
                          object.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "url": "str",  # Optional. Download
                          your agent here.
                        "uuid": "str"  # Optional. Unique id.
                    }
                ],
                "guardrails": [
                    {
                        "agent_uuid": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "default_response": "str",  #
                          Optional. The guardrails the agent is attached to.
                        "description": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "guardrail_uuid": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "is_attached": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "is_default": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "metadata": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "priority": 0,  # Optional. The
                          guardrails the agent is attached to.
                        "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                          Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known
                          values are: "GUARDRAIL_TYPE_UNKNOWN",
                          "GUARDRAIL_TYPE_JAILBREAK", "GUARDRAIL_TYPE_SENSITIVE_DATA",
                          and "GUARDRAIL_TYPE_CONTENT_MODERATION".
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "uuid": "str"  # Optional. The
                          guardrails the agent is attached to.
                    }
                ],
                "if_case": "str",  # Optional. Agents.
                "instruction": "str",  # Optional. Agent instruction.
                  Instructions help your agent to perform its job effectively. See
                  `Write Effective Agent Instructions
                  <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
                  for best practices.
                "k": 0,  # Optional. Agents.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          Knowledge bases.
                        "embedding_model_uuid": "str",  #
                          Optional. Knowledge bases.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          Knowledge bases.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "logging_config": {
                    "galileo_project_id": "str",  # Optional.
                      Galileo project identifier.
                    "galileo_project_name": "str",  # Optional.
                      Name of the Galileo project.
                    "insights_enabled": bool,  # Optional.
                      Whether insights are enabled.
                    "insights_enabled_at": "2020-02-20 00:00:00",
                      # Optional. Timestamp when insights were enabled.
                    "log_stream_id": "str",  # Optional.
                      Identifier for the log stream.
                    "log_stream_name": "str"  # Optional. Name of
                      the log stream.
                },
                "max_tokens": 0,  # Optional. Agents.
                "mcp_servers": [
                    {
                        "allowed_tools": [
                            "str"  # Optional. Optional
                              list of allowed tool names to expose from this server.
                        ],
                        "authorization": "str",  # Optional.
                          Optional authorization header value for the MCP server.
                        "headers": {
                            "str": "str"  # Optional.
                              Optional additional headers to send to the MCP server.
                        },
                        "server_label": "str",  # Optional. A
                          label identifying this MCP server.
                        "server_url": "str"  # Optional. The
                          URL of the MCP server.
                    }
                ],
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "model_provider_key": {
                    "api_key_uuid": "str",  # Optional. API key
                      ID.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name of the key.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "updated_at": "2020-02-20 00:00:00"  #
                      Optional. Key last updated date.
                },
                "model_router": {
                    "config": {
                        "fallback_models": [
                            "str"  # Optional.
                              Router-level fallback models.
                        ],
                        "policies": [
                            {
                                "custom_task": {
"description": "str",  # Optional. Short task
                                      description.
                                    "name": "str"
                                      # Optional. Task name.
                                },
                                "models": [
                                    "str"  #
                                      Optional. Models assigned to the task.
                                ],
                                "selection_policy": {
                                    "prefer":
                                      "str"  # Optional. One of: none, cheapest,
                                      fastest.
                                },
                                "task_slug": "str"  #
                                  Optional. Task slug.
                            }
                        ]
                    },
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "description": "str",  # Optional.
                      Description.
                    "name": "str",  # Optional. Name of the model
                      router.
                    "regions": [
                        "str"  # Optional. Target regions for
                          the router.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Agent name.
                "openai_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "parent_agents": [
                    ...
                ],
                "project_id": "str",  # Optional. Agents.
                "provide_citations": bool,  # Optional. Whether the
                  agent should provide in-response citations.
                "reasoning_effort": "str",  # Optional. The reasoning
                  effort for the agent.
                "region": "str",  # Optional. Region code.
                "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  #
                  Optional. Default value is "RETRIEVAL_METHOD_UNKNOWN". *
                  RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown    *
                  RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite   *
                  RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back   *
                  RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries   *
                  RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
                  are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
                  "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
                  "RETRIEVAL_METHOD_NONE".
                "route_created_at": "2020-02-20 00:00:00",  #
                  Optional. Creation of route date / time.
                "route_created_by": "str",  # Optional. Agents.
                "route_name": "str",  # Optional. Route name.
                "route_uuid": "str",  # Optional. Agents.
                "tags": [
                    "str"  # Optional. Agent tag to organize
                      related resources.
                ],
                "temperature": 0.0,  # Optional. Agents.
                "template": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's creation date.
                    "description": "str",  # Optional. Deprecated
                      - Use summary instead.
                    "guardrails": [
                        {
                            "priority": 0,  # Optional.
                              Priority of the guardrail.
                            "uuid": "str"  # Optional.
                              Uuid of the guardrail.
                        }
                    ],
                    "instruction": "str",  # Optional.
                      Instructions for the agent template.
                    "k": 0,  # Optional. The 'k' value for the
                      agent template.
                    "knowledge_bases": [
                        {
                            "added_to_agent_at":
                              "2020-02-20 00:00:00",  # Optional. Time when the
                              knowledge base was added to the agent.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "database_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "embedding_model_uuid":
                              "str",  # Optional. List of knowledge bases associated
                              with the agent template.
                            "is_public": bool,  #
                              Optional. Whether the knowledge base is public or not.
                            "last_indexing_job": {
"completed_datasources": 0,  # Optional. Number of
                                  datasources indexed completed.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "data_source_jobs": [
                                    {
"completed_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source
                                          completed indexing.
"data_source_uuid": "str",  # Optional. Uuid
                                          of the indexed data source.
"error_details": "str",  # Optional. A
                                          detailed error description.
"error_msg": "str",  # Optional. A string
                                          code provinding a hint which part of the
                                          system experienced an error.
"failed_item_count": "str",  # Optional.
                                          Total count of files that have failed.
"indexed_file_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"indexed_item_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"removed_item_count": "str",  # Optional.
                                          Total count of files that have been removed.
"skipped_item_count": "str",  # Optional.
                                          Total count of files that have been skipped.
"started_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source started
                                          indexing.
"status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                                          Optional. Default value is
                                          "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                          are: "DATA_SOURCE_STATUS_UNKNOWN",
                                          "DATA_SOURCE_STATUS_IN_PROGRESS",
                                          "DATA_SOURCE_STATUS_UPDATED",
                                          "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                          "DATA_SOURCE_STATUS_NOT_UPDATED",
                                          "DATA_SOURCE_STATUS_FAILED", and
                                          "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size
                                          of files in data source in bytes.
"total_bytes_indexed": "str",  # Optional.
                                          Total size of files in data source in bytes
                                          that have been indexed.
"total_file_count": "str"  # Optional. Total
                                          file count in the data source.
                                    }
                                ],
                                "data_source_uuids":
                                  [
                                    "str"  #
                                      Optional. IndexingJob description.
                                ],
                                "finished_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
"is_report_available": bool,  # Optional. Boolean
                                  value to determine if the indexing job details are
                                  available.
"knowledge_base_uuid": "str",  # Optional. Knowledge
                                  base id.
                                "phase":
                                  "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value
                                  is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                                  "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                                  "BATCH_JOB_PHASE_RUNNING",
                                  "BATCH_JOB_PHASE_SUCCEEDED",
                                  "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR",
                                  and "BATCH_JOB_PHASE_CANCELLED".
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
                                "status":
                                  "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
                                  value is "INDEX_JOB_STATUS_UNKNOWN". Known values
                                  are: "INDEX_JOB_STATUS_UNKNOWN",
                                  "INDEX_JOB_STATUS_PARTIAL",
                                  "INDEX_JOB_STATUS_IN_PROGRESS",
                                  "INDEX_JOB_STATUS_COMPLETED",
                                  "INDEX_JOB_STATUS_FAILED",
                                  "INDEX_JOB_STATUS_NO_CHANGES",
                                  "INDEX_JOB_STATUS_PENDING", and
                                  "INDEX_JOB_STATUS_CANCELLED".
                                "tokens": 0,  #
                                  Optional. Number of tokens [This field is
                                  deprecated].
                                "total_datasources":
                                  0,  # Optional. Number of datasources being indexed.
                                "total_tokens":
                                  "str",  # Optional. Total Tokens Consumed By the
                                  Indexing Job.
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "uuid": "str"  #
                                  Optional. Unique id.
                            },
                            "name": "str",  # Optional.
                              Name of knowledge base.
                            "project_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "region": "str",  # Optional.
                              Region code.
                            "reranking_config": {
                                "enabled": bool,  #
                                  Optional. Whether reranking is enabled for retrieval.
                                "model": "str"  #
                                  Optional. Reranker model internal name.
                            },
                            "tags": [
                                "str"  # Optional.
                                  Tags to organize related resources.
                            ],
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "user_id": "str",  #
                              Optional. Id of user that created the knowledge base.
                            "uuid": "str"  # Optional.
                              Unique id for knowledge base.
                        }
                    ],
                    "long_description": "str",  # Optional. The
                      long description of the agent template.
                    "max_tokens": 0,  # Optional. The max_tokens
                      setting for the agent template.
                    "model": {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    },
                    "name": "str",  # Optional. Name of the agent
                      template.
                    "short_description": "str",  # Optional. The
                      short description of the agent template.
                    "summary": "str",  # Optional. The summary of
                      the agent template.
                    "tags": [
                        "str"  # Optional. List of tags
                          associated with the agent template.
                    ],
                    "temperature": 0.0,  # Optional. The
                      temperature setting for the agent template.
                    "template_type":
                      "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional. Default value is
                      "AGENT_TEMPLATE_TYPE_STANDARD". * AGENT_TEMPLATE_TYPE_STANDARD:
                      The standard agent template    * AGENT_TEMPLATE_TYPE_ONE_CLICK:
                      The one click agent template. Known values are:
                      "AGENT_TEMPLATE_TYPE_STANDARD" and
                      "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                    "top_p": 0.0,  # Optional. The top_p setting
                      for the agent template.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's last updated date.
                    "uuid": "str"  # Optional. Unique id.
                },
                "thinking_token_budget": 0,  # Optional. The thinking
                  token budget for Anthropic extended thinking (0 = disabled).
                "top_p": 0.0,  # Optional. Agents.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your agent under
                  this url.
                "user_id": "str",  # Optional. Id of user that
                  created the agent.
                "uuid": "str",  # Optional. Unique agent id.
                "version_hash": "str",  # Optional. The latest
                  version of the agent.
                "vpc_egress_ips": [
                    "str"  # Optional. VPC Egress IPs.
                ],
                "vpc_uuid": "str",  # Optional. Agents.
                "workspace": ...
            }
        ],
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. The id of user who created this
          workspace.
        "created_by_email": "str",  # Optional. The email of the user who
          created this workspace.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "description": "str",  # Optional. Description of the workspace.
        "evaluation_test_cases": [
            {
                "archived_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_by_user_email": "str",  # Optional.
                  Evaluations.
                "created_by_user_id": "str",  # Optional.
                  Evaluations.
                "dataset": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Time created at.
                    "dataset_name": "str",  # Optional. Name of
                      the dataset.
                    "dataset_type":
                      "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value is
                      "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                      "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK",
                      "EVALUATION_DATASET_TYPE_NON_ADK", and
                      "EVALUATION_DATASET_TYPE_MODEL".
                    "dataset_uuid": "str",  # Optional. UUID of
                      the dataset.
                    "file_size": "str",  # Optional. The size of
                      the dataset uploaded file in bytes.
                    "has_ground_truth": bool,  # Optional. Does
                      the dataset have a ground truth column?.
                    "row_count": 0  # Optional. Number of rows in
                      the dataset.
                },
                "dataset_name": "str",  # Optional. Evaluations.
                "dataset_uuid": "str",  # Optional. Evaluations.
                "description": "str",  # Optional. Evaluations.
                "latest_version_number_of_runs": 0,  # Optional.
                  Evaluations.
                "metrics": [
                    {
                        "category":
                          "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                          "METRIC_CATEGORY_UNSPECIFIED", "METRIC_CATEGORY_CORRECTNESS",
                          "METRIC_CATEGORY_USER_OUTCOMES",
                          "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                          "METRIC_CATEGORY_CONTEXT_QUALITY", and
                          "METRIC_CATEGORY_MODEL_FIT".
                        "description": "str",  # Optional.
                          Evaluations.
                        "evaluation_scope":
                          "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default value is
                          "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether
                          a metric belongs to agent evaluation or model evaluation. For
                          backwards compatibility, UNSPECIFIED defaults to agent
                          metrics only in list operations. Known values are:
                          "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                          "EVALUATION_SCOPE_MODEL".
                        "inverted": bool,  # Optional. If
                          true, the metric is inverted, meaning that a lower value is
                          better.
                        "is_metric_goal": bool,  # Optional.
                          Evaluations.
                        "metric_name": "str",  # Optional.
                          Evaluations.
                        "metric_rank": 0,  # Optional.
                          Evaluations.
                        "metric_type":
                          "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                          "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
                          "METRIC_TYPE_MODEL_SAFETY".
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "metric_value_type":
                          "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value
                          is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                          "METRIC_VALUE_TYPE_STRING", and
                          "METRIC_VALUE_TYPE_PERCENTAGE".
                        "range_max": 0.0,  # Optional. The
                          maximum value for the metric.
                        "range_min": 0.0  # Optional. The
                          minimum value for the metric.
                    }
                ],
                "name": "str",  # Optional. Evaluations.
                "star_metric": {
                    "metric_uuid": "str",  # Optional.
                      Evaluations.
                    "name": "str",  # Optional. Evaluations.
                    "success_threshold": 0.0,  # Optional. The
                      success threshold for the star metric. This is a value that the
                      metric must reach to be considered successful.
                    "success_threshold_pct": 0  # Optional. The
                      success threshold for the star metric. This is a percentage value
                      between 0 and 100.
                },
                "test_case_uuid": "str",  # Optional. Evaluations.
                "total_runs": 0,  # Optional. Evaluations.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "updated_by_user_email": "str",  # Optional.
                  Evaluations.
                "updated_by_user_id": "str",  # Optional.
                  Evaluations.
                "version": 0  # Optional. Evaluations.
            }
        ],
        "name": "str",  # Optional. Name of the workspace.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Update date.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_agent(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete an Agent.

To delete an agent, send a DELETE request to /v2/gen-ai/agents/{uuid}.

Parameters:

uuid (str) – Unique agent id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_agent_api_key(agent_uuid: str, api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete API Key for an Agent.

To delete an API key for an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}.

Parameters:
  • agent_uuid (str) – A unique identifier for your agent. Required.

  • api_key_uuid (str) – API key for an agent. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Agent API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_anthropic_api_key(api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete Anthropic API Key.

To delete an Anthropic API key, send a DELETE request to /v2/gen-ai/anthropic/keys/{api_key_uuid}.

Parameters:

api_key_uuid (str) – API key ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_custom_model(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete Custom Model.

To delete a custom model, send a DELETE request to /v2/genai/custom_models/{uuid}.

Parameters:

uuid (str) – UUID of the custom model to delete. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "error": "str",  # Optional. Error message if deletion failed.
    "status": "DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED"  # Optional. Default value
      is "DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED". Status of delete operation. Known
      values are: "DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED",
      "DELETE_CUSTOM_MODEL_STATUS_SUCCESS", and "DELETE_CUSTOM_MODEL_STATUS_FAIL".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_knowledge_base(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete a Knowledge Base.

To delete a knowledge base, send a DELETE request to /v2/gen-ai/knowledge_bases/{uuid}.

Parameters:

uuid (str) – Knowledge base id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "uuid": "str"  # Optional. The id of the deleted knowledge base.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_knowledge_base_data_source(knowledge_base_uuid: str, data_source_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete a Data Source from a Knowledge Base.

To delete a data source from a knowledge base, send a DELETE request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}.

Parameters:
  • knowledge_base_uuid (str) – Knowledge base id. Required.

  • data_source_uuid (str) – Data source id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data_source_uuid": "str",  # Optional. Data source id.
    "knowledge_base_uuid": "str"  # Optional. Knowledge base id.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_model_api_key(api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete API Key for a Model.

To delete an API key for a model, send a DELETE request to /v2/gen-ai/models/api_keys/{api_key_uuid}.

Parameters:

api_key_uuid (str) – API key for an agent. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Model API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_model_router(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete a Model Router.

To delete a model router, send a DELETE request to /v2/gen-ai/models/routers/{uuid}.

Parameters:

uuid (str) – Model router id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "uuid": "str"  # Optional. The id of the deleted model router.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_openai_api_key(api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete OpenAI API Key.

To delete an OpenAI API key, send a DELETE request to /v2/gen-ai/openai/keys/{api_key_uuid}.

Parameters:

api_key_uuid (str) – API key ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "models": [
            {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            }
        ],
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_scheduled_indexing(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete Scheduled Indexing.

Delete Scheduled Indexing for knowledge base, send a DELETE request to /v2/gen-ai/scheduled-indexing/{uuid}.

Parameters:

uuid (str) – UUID of the scheduled indexing. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "indexing_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Created at
          timestamp.
        "days": [
            0  # Optional. Days for execution (day is represented same as
              in a cron expression, e.g. Monday begins with 1 ).
        ],
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted at
          timestamp (if soft deleted).
        "is_active": bool,  # Optional. Whether the schedule is currently
          active.
        "knowledge_base_uuid": "str",  # Optional. Knowledge base uuid
          associated with this schedule.
        "last_ran_at": "2020-02-20 00:00:00",  # Optional. Last time the
          schedule was executed.
        "next_run_at": "2020-02-20 00:00:00",  # Optional. Next scheduled
          run.
        "time": "str",  # Optional. Scheduled time of execution (HH:MM:SS
          format).
        "updated_at": "2020-02-20 00:00:00",  # Optional. Updated at
          timestamp.
        "uuid": "str"  # Optional. Unique identifier for the scheduled
          indexing entry.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_workspace(workspace_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete a Workspace.

To delete a workspace, send a DELETE request to /v2/gen-ai/workspace/{workspace_uuid}.

Parameters:

workspace_uuid (str) – Workspace UUID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "workspace_uuid": "str"  # Optional. Workspace.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
detach_agent(parent_agent_uuid: str, child_agent_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete Agent Route for an Agent.

To delete an agent route from a parent agent, send a DELETE request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}.

Parameters:
  • parent_agent_uuid (str) – Pagent agent id. Required.

  • child_agent_uuid (str) – Routed agent id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "child_agent_uuid": "str",  # Optional. Routed agent id.
    "parent_agent_uuid": "str"  # Optional. Pagent agent id.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
detach_agent_function(agent_uuid: str, function_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Delete Function Route for an Agent.

To delete a function route from an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}.

Parameters:
  • agent_uuid (str) – The id of the agent the function route belongs to. Required.

  • function_uuid (str) – The function route to be destroyed. This does not destroy the function itself. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
detach_agent_guardrail(agent_uuid: str, guardrail_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Detach a Guardrail from an Agent.

To detach a guardrail from an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}.

Parameters:
  • agent_uuid (str) – The UUID of the agent. Required.

  • guardrail_uuid (str) – The UUID of the guardrail to detach. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
detach_knowledge_base(agent_uuid: str, knowledge_base_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Detach Knowledge Base from an Agent.

To detach a knowledge base from an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • knowledge_base_uuid (str) – Knowledge base id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_agent(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Agent.

To retrieve details of an agent, GET request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.

Parameters:

uuid (str) – Unique agent id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_agent_children(uuid: str, **kwargs: Any) MutableMapping[str, Any]

View Agent Routes.

To view agent routes for an agent, send a GET requtest to /v2/gen-ai/agents/{uuid}/child_agents.

Parameters:

uuid (str) – Agent id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "children": [
        {
            "anthropic_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "api_key_infos": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date.
                    "created_by": "str",  # Optional. Created by.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Deleted date.
                    "name": "str",  # Optional. Name.
                    "secret_key": "str",  # Optional. Api key
                      infos.
                    "uuid": "str"  # Optional. Uuid.
                }
            ],
            "api_keys": [
                {
                    "api_key": "str"  # Optional. Api key.
                }
            ],
            "chatbot": {
                "allowed_domains": [
                    "str"  # Optional. A Chatbot.
                ],
                "button_background_color": "str",  # Optional. A
                  Chatbot.
                "logo": "str",  # Optional. A Chatbot.
                "name": "str",  # Optional. Name of chatbot.
                "primary_color": "str",  # Optional. A Chatbot.
                "secondary_color": "str",  # Optional. A Chatbot.
                "starting_message": "str"  # Optional. A Chatbot.
            },
            "chatbot_identifiers": [
                {
                    "agent_chatbot_identifier": "str"  #
                      Optional. Agent chatbot identifier.
                }
            ],
            "child_agents": [
                ...
            ],
            "conversation_logs_enabled": bool,  # Optional. Whether
              conversation logs are enabled for the agent.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "deployment": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "name": "str",  # Optional. Name.
                "status": "STATUS_UNKNOWN",  # Optional. Default
                  value is "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
                  "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING",
                  "STATUS_RUNNING", "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT",
                  "STATUS_UNDEPLOYING", "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED",
                  and "STATUS_BUILDING".
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your deployed agent
                  here.
                "uuid": "str",  # Optional. Unique id.
                "visibility": "VISIBILITY_UNKNOWN"  # Optional.
                  Default value is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The
                  status of the deployment is unknown    * VISIBILITY_DISABLED: The
                  deployment is disabled and will no longer service requests   *
                  VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state   *
                  VISIBILITY_PUBLIC: The deployment is public and will service requests
                  from the public internet   * VISIBILITY_PRIVATE: The deployment is
                  private and will only service requests from other agents, or through
                  API keys. Known values are: "VISIBILITY_UNKNOWN",
                  "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC",
                  and "VISIBILITY_PRIVATE".
            },
            "description": "str",  # Optional. Description of agent.
            "functions": [
                {
                    "api_key": "str",  # Optional. Api key.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "description": "str",  # Optional. Agent
                      description.
                    "faas_name": "str",  # Optional. Child
                      agents.
                    "faas_namespace": "str",  # Optional. Child
                      agents.
                    "input_schema": {},  # Optional. Any object.
                    "name": "str",  # Optional. Name.
                    "output_schema": {},  # Optional. Any object.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Download your
                      agent here.
                    "uuid": "str"  # Optional. Unique id.
                }
            ],
            "guardrails": [
                {
                    "agent_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "default_response": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "description": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "guardrail_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "is_attached": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "is_default": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "metadata": {},  # Optional. Any object.
                    "name": "str",  # Optional. The guardrails
                      the agent is attached to.
                    "priority": 0,  # Optional. The guardrails
                      the agent is attached to.
                    "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                      Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values
                      are: "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                      "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                      "GUARDRAIL_TYPE_CONTENT_MODERATION".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "uuid": "str"  # Optional. The guardrails the
                      agent is attached to.
                }
            ],
            "if_case": "str",  # Optional. Child agents.
            "instruction": "str",  # Optional. Agent instruction.
              Instructions help your agent to perform its job effectively. See `Write
              Effective Agent Instructions
              <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
              for best practices.
            "k": 0,  # Optional. Child agents.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. Knowledge
                      bases.
                    "embedding_model_uuid": "str",  # Optional.
                      Knowledge bases.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. Knowledge
                      bases.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "logging_config": {
                "galileo_project_id": "str",  # Optional. Galileo
                  project identifier.
                "galileo_project_name": "str",  # Optional. Name of
                  the Galileo project.
                "insights_enabled": bool,  # Optional. Whether
                  insights are enabled.
                "insights_enabled_at": "2020-02-20 00:00:00",  #
                  Optional. Timestamp when insights were enabled.
                "log_stream_id": "str",  # Optional. Identifier for
                  the log stream.
                "log_stream_name": "str"  # Optional. Name of the log
                  stream.
            },
            "max_tokens": 0,  # Optional. Child agents.
            "mcp_servers": [
                {
                    "allowed_tools": [
                        "str"  # Optional. Optional list of
                          allowed tool names to expose from this server.
                    ],
                    "authorization": "str",  # Optional. Optional
                      authorization header value for the MCP server.
                    "headers": {
                        "str": "str"  # Optional. Optional
                          additional headers to send to the MCP server.
                    },
                    "server_label": "str",  # Optional. A label
                      identifying this MCP server.
                    "server_url": "str"  # Optional. The URL of
                      the MCP server.
                }
            ],
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "model_provider_key": {
                "api_key_uuid": "str",  # Optional. API key ID.
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name of the key.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "updated_at": "2020-02-20 00:00:00"  # Optional. Key
                  last updated date.
            },
            "model_router": {
                "config": {
                    "fallback_models": [
                        "str"  # Optional. Router-level
                          fallback models.
                    ],
                    "policies": [
                        {
                            "custom_task": {
                                "description": "str",
                                  # Optional. Short task description.
                                "name": "str"  #
                                  Optional. Task name.
                            },
                            "models": [
                                "str"  # Optional.
                                  Models assigned to the task.
                            ],
                            "selection_policy": {
                                "prefer": "str"  #
                                  Optional. One of: none, cheapest, fastest.
                            },
                            "task_slug": "str"  #
                              Optional. Task slug.
                        }
                    ]
                },
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "description": "str",  # Optional. Description.
                "name": "str",  # Optional. Name of the model router.
                "regions": [
                    "str"  # Optional. Target regions for the
                      router.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "uuid": "str"  # Optional. Unique id.
            },
            "name": "str",  # Optional. Agent name.
            "openai_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "parent_agents": [
                ...
            ],
            "project_id": "str",  # Optional. Child agents.
            "provide_citations": bool,  # Optional. Whether the agent
              should provide in-response citations.
            "reasoning_effort": "str",  # Optional. The reasoning effort
              for the agent.
            "region": "str",  # Optional. Region code.
            "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional.
              Default value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN:
              The retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
              retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval
              method is step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval
              method is sub queries   * RETRIEVAL_METHOD_NONE: The retrieval method is
              none. Known values are: "RETRIEVAL_METHOD_UNKNOWN",
              "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK",
              "RETRIEVAL_METHOD_SUB_QUERIES", and "RETRIEVAL_METHOD_NONE".
            "route_created_at": "2020-02-20 00:00:00",  # Optional.
              Creation of route date / time.
            "route_created_by": "str",  # Optional. Child agents.
            "route_name": "str",  # Optional. Route name.
            "route_uuid": "str",  # Optional. Child agents.
            "tags": [
                "str"  # Optional. Agent tag to organize related
                  resources.
            ],
            "temperature": 0.0,  # Optional. Child agents.
            "template": {
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's creation date.
                "description": "str",  # Optional. Deprecated - Use
                  summary instead.
                "guardrails": [
                    {
                        "priority": 0,  # Optional. Priority
                          of the guardrail.
                        "uuid": "str"  # Optional. Uuid of
                          the guardrail.
                    }
                ],
                "instruction": "str",  # Optional. Instructions for
                  the agent template.
                "k": 0,  # Optional. The 'k' value for the agent
                  template.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "embedding_model_uuid": "str",  #
                          Optional. List of knowledge bases associated with the agent
                          template.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "long_description": "str",  # Optional. The long
                  description of the agent template.
                "max_tokens": 0,  # Optional. The max_tokens setting
                  for the agent template.
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "name": "str",  # Optional. Name of the agent
                  template.
                "short_description": "str",  # Optional. The short
                  description of the agent template.
                "summary": "str",  # Optional. The summary of the
                  agent template.
                "tags": [
                    "str"  # Optional. List of tags associated
                      with the agent template.
                ],
                "temperature": 0.0,  # Optional. The temperature
                  setting for the agent template.
                "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  #
                  Optional. Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
                  AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
                  AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known
                  values are: "AGENT_TEMPLATE_TYPE_STANDARD" and
                  "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                "top_p": 0.0,  # Optional. The top_p setting for the
                  agent template.
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's last updated date.
                "uuid": "str"  # Optional. Unique id.
            },
            "thinking_token_budget": 0,  # Optional. The thinking token
              budget for Anthropic extended thinking (0 = disabled).
            "top_p": 0.0,  # Optional. Child agents.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your agent under this url.
            "user_id": "str",  # Optional. Id of user that created the
              agent.
            "uuid": "str",  # Optional. Unique agent id.
            "version_hash": "str",  # Optional. The latest version of the
              agent.
            "vpc_egress_ips": [
                "str"  # Optional. VPC Egress IPs.
            ],
            "vpc_uuid": "str",  # Optional. Child agents.
            "workspace": {
                "agents": [
                    ...
                ],
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. The id of user who
                  created this workspace.
                "created_by_email": "str",  # Optional. The email of
                  the user who created this workspace.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "description": "str",  # Optional. Description of the
                  workspace.
                "evaluation_test_cases": [
                    {
                        "archived_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_by_user_email": "str",  #
                          Optional. Evaluations.
                        "created_by_user_id": "str",  #
                          Optional. Evaluations.
                        "dataset": {
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Time created at.
                            "dataset_name": "str",  #
                              Optional. Name of the dataset.
                            "dataset_type":
                              "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default
                              value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values
                              are: "EVALUATION_DATASET_TYPE_UNKNOWN",
                              "EVALUATION_DATASET_TYPE_ADK",
                              "EVALUATION_DATASET_TYPE_NON_ADK", and
                              "EVALUATION_DATASET_TYPE_MODEL".
                            "dataset_uuid": "str",  #
                              Optional. UUID of the dataset.
                            "file_size": "str",  #
                              Optional. The size of the dataset uploaded file in bytes.
                            "has_ground_truth": bool,  #
                              Optional. Does the dataset have a ground truth column?.
                            "row_count": 0  # Optional.
                              Number of rows in the dataset.
                        },
                        "dataset_name": "str",  # Optional.
                          Evaluations.
                        "dataset_uuid": "str",  # Optional.
                          Evaluations.
                        "description": "str",  # Optional.
                          Evaluations.
                        "latest_version_number_of_runs": 0,
                          # Optional. Evaluations.
                        "metrics": [
                            {
                                "category":
                                  "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_CATEGORY_UNSPECIFIED". Known values
                                  are: "METRIC_CATEGORY_UNSPECIFIED",
                                  "METRIC_CATEGORY_CORRECTNESS",
                                  "METRIC_CATEGORY_USER_OUTCOMES",
                                  "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                                  "METRIC_CATEGORY_CONTEXT_QUALITY", and
                                  "METRIC_CATEGORY_MODEL_FIT".
                                "description": "str",
                                  # Optional. Evaluations.
                                "evaluation_scope":
                                  "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                                  value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                                  determines whether a metric belongs to agent
                                  evaluation or model evaluation. For backwards
                                  compatibility, UNSPECIFIED defaults to agent metrics
                                  only in list operations. Known values are:
                                  "EVALUATION_SCOPE_UNSPECIFIED",
                                  "EVALUATION_SCOPE_AGENT", and
                                  "EVALUATION_SCOPE_MODEL".
                                "inverted": bool,  #
                                  Optional. If true, the metric is inverted, meaning
                                  that a lower value is better.
                                "is_metric_goal":
                                  bool,  # Optional. Evaluations.
                                "metric_name": "str",
                                  # Optional. Evaluations.
                                "metric_rank": 0,  #
                                  Optional. Evaluations.
                                "metric_type":
                                  "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value
                                  is "METRIC_TYPE_UNSPECIFIED". Known values are:
                                  "METRIC_TYPE_UNSPECIFIED",
                                  "METRIC_TYPE_GENERAL_QUALITY",
                                  "METRIC_TYPE_RAG_AND_TOOL",
                                  "METRIC_TYPE_MODEL_QUALITY", and
                                  "METRIC_TYPE_MODEL_SAFETY".
                                "metric_uuid": "str",
                                  # Optional. Evaluations.
                                "metric_value_type":
                                  "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                                  "METRIC_VALUE_TYPE_NUMBER",
                                  "METRIC_VALUE_TYPE_STRING", and
                                  "METRIC_VALUE_TYPE_PERCENTAGE".
                                "range_max": 0.0,  #
                                  Optional. The maximum value for the metric.
                                "range_min": 0.0  #
                                  Optional. The minimum value for the metric.
                            }
                        ],
                        "name": "str",  # Optional.
                          Evaluations.
                        "star_metric": {
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "name": "str",  # Optional.
                              Evaluations.
                            "success_threshold": 0.0,  #
                              Optional. The success threshold for the star metric. This
                              is a value that the metric must reach to be considered
                              successful.
                            "success_threshold_pct": 0  #
                              Optional. The success threshold for the star metric. This
                              is a percentage value between 0 and 100.
                        },
                        "test_case_uuid": "str",  # Optional.
                          Evaluations.
                        "total_runs": 0,  # Optional.
                          Evaluations.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "updated_by_user_email": "str",  #
                          Optional. Evaluations.
                        "updated_by_user_id": "str",  #
                          Optional. Evaluations.
                        "version": 0  # Optional.
                          Evaluations.
                    }
                ],
                "name": "str",  # Optional. Name of the workspace.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Update date.
                "uuid": "str"  # Optional. Unique id.
            }
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_agent_usage(uuid: str, *, start: Optional[str] = None, stop: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get Agent Usage.

To get agent usage, send a GET request to /v2/gen-ai/agents/{uuid}/usage. Returns usage metrics for the specified agent within the provided time range.

Parameters:
  • uuid (str) – Agent id. Required.

  • start (str) – Return all usage data from this date. Default value is None.

  • stop (str) – Return all usage data up to this date, if omitted, will return up to the current date. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "log_insights_usage": {
        "measurements": [
            {
                "tokens": 0,  # Optional. Resource Usage Description.
                "usage_type": "str"  # Optional. Resource Usage
                  Description.
            }
        ],
        "resource_uuid": "str",  # Optional. Resource Usage Description.
        "start": "2020-02-20 00:00:00",  # Optional. Resource Usage
          Description.
        "stop": "2020-02-20 00:00:00"  # Optional. Resource Usage
          Description.
    },
    "usage": {
        "measurements": [
            {
                "tokens": 0,  # Optional. Resource Usage Description.
                "usage_type": "str"  # Optional. Resource Usage
                  Description.
            }
        ],
        "resource_uuid": "str",  # Optional. Resource Usage Description.
        "start": "2020-02-20 00:00:00",  # Optional. Resource Usage
          Description.
        "stop": "2020-02-20 00:00:00"  # Optional. Resource Usage
          Description.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_anthropic_api_key(api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Anthropic API Key.

To retrieve details of an Anthropic API key, send a GET request to /v2/gen-ai/anthropic/keys/{api_key_uuid}.

Parameters:

api_key_uuid (str) – API key ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_custom_model(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Custom Model.

To retrieve details of a custom model, send a GET request to /v2/gen-ai/custom_models/{uuid}.

Parameters:

uuid (str) – UUID of the custom model to retrieve. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "model": {
        "active_deployments": [
            {
                "created_at": "str",  # Optional. RFC 3339 timestamp
                  indicating when the dedicated inference deployment was created.
                "endpoints": {
                    "private_endpoint_fqdn": "str",  # Optional.
                      Private FQDN for the deployment.
                    "public_endpoint_fqdn": "str"  # Optional.
                      Public FQDN for the deployment.
                },
                "id": "str",  # Optional. Unique identifier (UUID) of
                  the dedicated inference deployment.
                "name": "str",  # Optional. Human-readable name of
                  the dedicated inference deployment.
                "region_slug": "str",  # Optional. Slug of the region
                  where the dedicated inference deployment is running (e.g. "atl1").
                "state": "str",  # Optional. Current lifecycle state
                  of the dedicated inference deployment (e.g. "ACTIVE",
                  "PROVISIONING").
                "updated_at": "str"  # Optional. RFC 3339 timestamp
                  indicating when the dedicated inference deployment was last updated.
            }
        ],
        "architecture": "str",  # Optional. Model architecture type
          (free-form string from config.json).
        "config_json": {},  # Optional. Raw config.json contents from the
          model repository.
        "context_length": 0,  # Optional. Maximum context length supported by
          the model.
        "cost_estimate_per_month": 0,  # Optional. Estimated monthly cost in
          dollars for hosting.
        "created_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          model was created.
        "description": "str",  # Optional. Description of the custom model.
        "file_count": 0,  # Optional. Number of files in the model.
        "input_modalities": [
            "str"  # Optional. Input modalities supported (e.g., text,
              image).
        ],
        "license": "str",  # Optional. License under which the model is
          distributed.
        "name": "str",  # Optional. Name of the custom model.
        "output_modalities": [
            "str"  # Optional. Output modalities supported (e.g., text,
              image).
        ],
        "parameters": "str",  # Optional. Number of parameters in the model.
        "source_ref": {
            "access_type": "ACCESS_TYPE_UNSPECIFIED",  # Optional.
              Default value is "ACCESS_TYPE_UNSPECIFIED". Access level required for the
              model repository. Known values are: "ACCESS_TYPE_UNSPECIFIED",
              "ACCESS_TYPE_PUBLIC", "ACCESS_TYPE_PRIVATE", and "ACCESS_TYPE_GATED".
            "bucket": "str",  # Optional. Spaces bucket name.
            "commit_sha": "str",  # Optional. Git commit SHA of the model
              version.
            "hf_token": "str",  # Optional. User-provided HuggingFace
              token for gated/private models (not persisted in source_ref).
            "prefix": "str",  # Optional. Object prefix path in the
              bucket.
            "region": "str",  # Optional. Spaces bucket region.
            "repo_id": "str"  # Optional. Huggingface repository
              identifier.
        },
        "source_type": "SOURCE_TYPE_UNSPECIFIED",  # Optional. Default value
          is "SOURCE_TYPE_UNSPECIFIED". Source from which the model was imported. Known
          values are: "SOURCE_TYPE_UNSPECIFIED", "SOURCE_TYPE_HUGGINGFACE",
          "SOURCE_TYPE_SPACES_BUCKET", "SOURCE_TYPE_SDK_UPLOAD", and
          "SOURCE_TYPE_FINE_TUNING".
        "status": "STATUS_UNSPECIFIED",  # Optional. Default value is
          "STATUS_UNSPECIFIED". Import and deployment status of the custom model. Known
          values are: "STATUS_UNSPECIFIED", "STATUS_IMPORTING", "STATUS_READY",
          "STATUS_FAILED", and "STATUS_DELETED".
        "storage_region": "str",  # Optional. Region of the Spaces bucket
          where model files are stored.
        "tags": {
            "tags": [
                "str"  # Optional. List of tag strings.
            ]
        },
        "team_id": "str",  # Optional. Team that owns the model.
        "total_size_bytes": "str",  # Optional. Total size of model files in
          bytes.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          model was last updated.
        "uuid": "str"  # Optional. Unique identifier for the custom model.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_evaluation_dataset_download_url(dataset_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Download URL for Evaluation Dataset.

To get a presigned download URL for an evaluation dataset, send a GET request to /v2/genai/evaluation_datasets/{dataset_uuid}/download_url.

Parameters:

dataset_uuid (str) – UUID of the evaluation dataset. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "download_url": "str",  # Optional. The presigned URL to download the dataset
      file.
    "expires_at": "2020-02-20 00:00:00"  # Optional. The time the URL expires at.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_evaluation_run(evaluation_run_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Information About an Existing Evaluation Run.

To retrive information about an existing evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}.

Parameters:

evaluation_run_uuid (str) – Evaluation run UUID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "evaluation_run": {
        "agent_deleted": bool,  # Optional. Whether agent is deleted.
        "agent_deployment_name": "str",  # Optional. The agent deployment
          name.
        "agent_name": "str",  # Optional. Agent name.
        "agent_uuid": "str",  # Optional. Agent UUID.
        "agent_version_hash": "str",  # Optional. Version hash.
        "agent_workspace_uuid": "str",  # Optional. Agent workspace uuid.
        "created_by_user_email": "str",  # Optional.
        "created_by_user_id": "str",  # Optional.
        "error_description": "str",  # Optional. The error description.
        "evaluation_run_uuid": "str",  # Optional. Evaluation run UUID.
        "evaluation_test_case_workspace_uuid": "str",  # Optional. Evaluation
          test case workspace uuid.
        "finished_at": "2020-02-20 00:00:00",  # Optional. Run end time.
        "pass_status": bool,  # Optional. The pass status of the evaluation
          run based on the star metric.
        "queued_at": "2020-02-20 00:00:00",  # Optional. Run queued time.
        "run_level_metric_results": [
            {
                "error_description": "str",  # Optional. Error
                  description if the metric could not be calculated.
                "metric_name": "str",  # Optional. Metric name.
                "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
                  # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                  "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and
                  "METRIC_VALUE_TYPE_PERCENTAGE".
                "number_value": 0.0,  # Optional. The value of the
                  metric as a number.
                "reasoning": "str",  # Optional. Reasoning of the
                  metric result.
                "string_value": "str"  # Optional. The value of the
                  metric as a string.
            }
        ],
        "run_name": "str",  # Optional. Run name.
        "star_metric_result": {
            "error_description": "str",  # Optional. Error description if
              the metric could not be calculated.
            "metric_name": "str",  # Optional. Metric name.
            "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",  #
              Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
              are: "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
              "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
            "number_value": 0.0,  # Optional. The value of the metric as
              a number.
            "reasoning": "str",  # Optional. Reasoning of the metric
              result.
            "string_value": "str"  # Optional. The value of the metric as
              a string.
        },
        "started_at": "2020-02-20 00:00:00",  # Optional. Run start time.
        "status": "EVALUATION_RUN_STATUS_UNSPECIFIED",  # Optional. Default
          value is "EVALUATION_RUN_STATUS_UNSPECIFIED". Evaluation Run Statuses. Known
          values are: "EVALUATION_RUN_STATUS_UNSPECIFIED", "EVALUATION_RUN_QUEUED",
          "EVALUATION_RUN_RUNNING_DATASET", "EVALUATION_RUN_EVALUATING_RESULTS",
          "EVALUATION_RUN_CANCELLING", "EVALUATION_RUN_CANCELLED",
          "EVALUATION_RUN_SUCCESSFUL", "EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and
          "EVALUATION_RUN_FAILED".
        "test_case_description": "str",  # Optional. Test case description.
        "test_case_name": "str",  # Optional. Test case name.
        "test_case_uuid": "str",  # Optional. Test-case UUID.
        "test_case_version": 0  # Optional. Test-case-version.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_evaluation_run_prompt_results(evaluation_run_uuid: str, prompt_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve Results of an Evaluation Run Prompt.

To retrieve results of an evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}.

Parameters:
  • evaluation_run_uuid (str) – Evaluation run UUID. Required.

  • prompt_id (int) – Prompt ID to get results for. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "prompt": {
        "evaluation_trace_spans": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  When the span was created.
                "input": {},  # Optional. Input data for the span
                  (flexible structure - can be messages array, string, etc.).
                "name": "str",  # Optional. Name/identifier for the
                  span.
                "output": {},  # Optional. Output data from the span
                  (flexible structure - can be message, string, etc.).
                "retriever_chunks": [
                    {
                        "chunk_usage_pct": 0.0,  # Optional.
                          The usage percentage of the chunk.
                        "chunk_used": bool,  # Optional.
                          Indicates if the chunk was used in the prompt.
                        "index_uuid": "str",  # Optional. The
                          index uuid (Knowledge Base) of the chunk.
                        "source_name": "str",  # Optional.
                          The source name for the chunk, e.g., the file name or
                          document title.
                        "text": "str"  # Optional. Text
                          content of the chunk.
                    }
                ],
                "span_level_metric_results": [
                    {
                        "error_description": "str",  #
                          Optional. Error description if the metric could not be
                          calculated.
                        "metric_name": "str",  # Optional.
                          Metric name.
                        "metric_value_type":
                          "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value
                          is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                          "METRIC_VALUE_TYPE_STRING", and
                          "METRIC_VALUE_TYPE_PERCENTAGE".
                        "number_value": 0.0,  # Optional. The
                          value of the metric as a number.
                        "reasoning": "str",  # Optional.
                          Reasoning of the metric result.
                        "string_value": "str"  # Optional.
                          The value of the metric as a string.
                    }
                ],
                "spans": [
                    {
                        "agent": {
                            "agent_type":
                              "AGENT_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "AGENT_TYPE_UNSPECIFIED". Agent span. Known values are:
                              "AGENT_TYPE_UNSPECIFIED", "AGENT_TYPE_DEFAULT",
                              "AGENT_TYPE_PLANNER", "AGENT_TYPE_REACT",
                              "AGENT_TYPE_REFLECTION", "AGENT_TYPE_ROUTER",
                              "AGENT_TYPE_CLASSIFIER", "AGENT_TYPE_SUPERVISOR", and
                              "AGENT_TYPE_JUDGE".
                            "common": {
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Common optional
                                  fields shared by all span types.
                                "duration_ns": "str",
                                  # Optional. Common optional fields shared by all span
                                  types.
                                "metadata": {
                                    "str": "str"
                                      # Optional. Arbitrary structured metadata.
                                },
                                "status_code": 0,  #
                                  Optional. Common optional fields shared by all span
                                  types.
                                "tags": [
                                    "str"  #
                                      Optional. Free-form tags for filtering/grouping.
                                ]
                            },
                            "redacted_input": "str",  #
                              Optional. Child spans - must contain between 1 and 999
                              spans Allowed types: agent, llm, tool, retriever (not
                              workflow).
                            "redacted_output": "str",  #
                              Optional. Child spans - must contain between 1 and 999
                              spans Allowed types: agent, llm, tool, retriever (not
                              workflow).
                            "spans": [
                                ...
                            ]
                        },
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. When the span was created.
                        "input": {},  # Optional. Input data
                          for the span (flexible structure - can be messages array,
                          string, etc.).
                        "llm": {
                            "common": {
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Common optional
                                  fields shared by all span types.
                                "duration_ns": "str",
                                  # Optional. Common optional fields shared by all span
                                  types.
                                "metadata": {
                                    "str": "str"
                                      # Optional. Arbitrary structured metadata.
                                },
                                "status_code": 0,  #
                                  Optional. Common optional fields shared by all span
                                  types.
                                "tags": [
                                    "str"  #
                                      Optional. Free-form tags for filtering/grouping.
                                ]
                            },
                            "model": "str",  # Optional.
                              LLM span.
                            "num_input_tokens": 0,  #
                              Optional. LLM span.
                            "num_output_tokens": 0,  #
                              Optional. LLM span.
                            "temperature": 0.0,  #
                              Optional. LLM span.
                            "time_to_first_token_ns":
                              "str",  # Optional. LLM span.
                            "tools": [
                                {}  # Optional. Tool
                                  definitions passed to the model.
                            ],
                            "total_tokens": 0  #
                              Optional. LLM span.
                        },
                        "name": "str",  # Optional.
                          Name/identifier for the span.
                        "output": {},  # Optional. Output
                          data from the span (flexible structure - can be message,
                          string, etc.).
                        "retriever": {
                            "common": {
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Common optional
                                  fields shared by all span types.
                                "duration_ns": "str",
                                  # Optional. Common optional fields shared by all span
                                  types.
                                "metadata": {
                                    "str": "str"
                                      # Optional. Arbitrary structured metadata.
                                },
                                "status_code": 0,  #
                                  Optional. Common optional fields shared by all span
                                  types.
                                "tags": [
                                    "str"  #
                                      Optional. Free-form tags for filtering/grouping.
                                ]
                            }
                        },
                        "tool": {
                            "common": {
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Common optional
                                  fields shared by all span types.
                                "duration_ns": "str",
                                  # Optional. Common optional fields shared by all span
                                  types.
                                "metadata": {
                                    "str": "str"
                                      # Optional. Arbitrary structured metadata.
                                },
                                "status_code": 0,  #
                                  Optional. Common optional fields shared by all span
                                  types.
                                "tags": [
                                    "str"  #
                                      Optional. Free-form tags for filtering/grouping.
                                ]
                            },
                            "tool_call_id": "str"  #
                              Optional. Tool span.
                        },
                        "type": "TRACE_SPAN_TYPE_UNKNOWN",  #
                          Optional. Default value is "TRACE_SPAN_TYPE_UNKNOWN". Types
                          of spans in a trace. Known values are:
                          "TRACE_SPAN_TYPE_UNKNOWN", "TRACE_SPAN_TYPE_LLM",
                          "TRACE_SPAN_TYPE_RETRIEVER", "TRACE_SPAN_TYPE_TOOL",
                          "TRACE_SPAN_TYPE_AGENT", and "TRACE_SPAN_TYPE_WORKFLOW".
                        "workflow": {
                            "common": {
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Common optional
                                  fields shared by all span types.
                                "duration_ns": "str",
                                  # Optional. Common optional fields shared by all span
                                  types.
                                "metadata": {
                                    "str": "str"
                                      # Optional. Arbitrary structured metadata.
                                },
                                "status_code": 0,  #
                                  Optional. Common optional fields shared by all span
                                  types.
                                "tags": [
                                    "str"  #
                                      Optional. Free-form tags for filtering/grouping.
                                ]
                            },
                            "spans": [
                                ...
                            ]
                        }
                    }
                ],
                "type": "TRACE_SPAN_TYPE_UNKNOWN"  # Optional.
                  Default value is "TRACE_SPAN_TYPE_UNKNOWN". Types of spans in a
                  trace. Known values are: "TRACE_SPAN_TYPE_UNKNOWN",
                  "TRACE_SPAN_TYPE_LLM", "TRACE_SPAN_TYPE_RETRIEVER",
                  "TRACE_SPAN_TYPE_TOOL", "TRACE_SPAN_TYPE_AGENT", and
                  "TRACE_SPAN_TYPE_WORKFLOW".
            }
        ],
        "ground_truth": "str",  # Optional. The ground truth for the prompt.
        "input": "str",  # Optional.
        "input_tokens": "str",  # Optional. The number of input tokens used
          in the prompt.
        "output": "str",  # Optional.
        "output_tokens": "str",  # Optional. The number of output tokens used
          in the prompt.
        "prompt_chunks": [
            {
                "chunk_usage_pct": 0.0,  # Optional. The usage
                  percentage of the chunk.
                "chunk_used": bool,  # Optional. Indicates if the
                  chunk was used in the prompt.
                "index_uuid": "str",  # Optional. The index uuid
                  (Knowledge Base) of the chunk.
                "source_name": "str",  # Optional. The source name
                  for the chunk, e.g., the file name or document title.
                "text": "str"  # Optional. Text content of the chunk.
            }
        ],
        "prompt_id": 0,  # Optional. Prompt ID.
        "prompt_level_metric_results": [
            {
                "error_description": "str",  # Optional. Error
                  description if the metric could not be calculated.
                "metric_name": "str",  # Optional. Metric name.
                "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
                  # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                  "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and
                  "METRIC_VALUE_TYPE_PERCENTAGE".
                "number_value": 0.0,  # Optional. The value of the
                  metric as a number.
                "reasoning": "str",  # Optional. Reasoning of the
                  metric result.
                "string_value": "str"  # Optional. The value of the
                  metric as a string.
            }
        ],
        "trace_id": "str"  # Optional. The trace id for the prompt.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_evaluation_run_results(evaluation_run_uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Results of an Evaluation Run.

To retrieve results of an evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results.

Parameters:
  • evaluation_run_uuid (str) – Evaluation run UUID. Required.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "evaluation_run": {
        "agent_deleted": bool,  # Optional. Whether agent is deleted.
        "agent_deployment_name": "str",  # Optional. The agent deployment
          name.
        "agent_name": "str",  # Optional. Agent name.
        "agent_uuid": "str",  # Optional. Agent UUID.
        "agent_version_hash": "str",  # Optional. Version hash.
        "agent_workspace_uuid": "str",  # Optional. Agent workspace uuid.
        "created_by_user_email": "str",  # Optional.
        "created_by_user_id": "str",  # Optional.
        "error_description": "str",  # Optional. The error description.
        "evaluation_run_uuid": "str",  # Optional. Evaluation run UUID.
        "evaluation_test_case_workspace_uuid": "str",  # Optional. Evaluation
          test case workspace uuid.
        "finished_at": "2020-02-20 00:00:00",  # Optional. Run end time.
        "pass_status": bool,  # Optional. The pass status of the evaluation
          run based on the star metric.
        "queued_at": "2020-02-20 00:00:00",  # Optional. Run queued time.
        "run_level_metric_results": [
            {
                "error_description": "str",  # Optional. Error
                  description if the metric could not be calculated.
                "metric_name": "str",  # Optional. Metric name.
                "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
                  # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                  "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and
                  "METRIC_VALUE_TYPE_PERCENTAGE".
                "number_value": 0.0,  # Optional. The value of the
                  metric as a number.
                "reasoning": "str",  # Optional. Reasoning of the
                  metric result.
                "string_value": "str"  # Optional. The value of the
                  metric as a string.
            }
        ],
        "run_name": "str",  # Optional. Run name.
        "star_metric_result": {
            "error_description": "str",  # Optional. Error description if
              the metric could not be calculated.
            "metric_name": "str",  # Optional. Metric name.
            "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",  #
              Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
              are: "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
              "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
            "number_value": 0.0,  # Optional. The value of the metric as
              a number.
            "reasoning": "str",  # Optional. Reasoning of the metric
              result.
            "string_value": "str"  # Optional. The value of the metric as
              a string.
        },
        "started_at": "2020-02-20 00:00:00",  # Optional. Run start time.
        "status": "EVALUATION_RUN_STATUS_UNSPECIFIED",  # Optional. Default
          value is "EVALUATION_RUN_STATUS_UNSPECIFIED". Evaluation Run Statuses. Known
          values are: "EVALUATION_RUN_STATUS_UNSPECIFIED", "EVALUATION_RUN_QUEUED",
          "EVALUATION_RUN_RUNNING_DATASET", "EVALUATION_RUN_EVALUATING_RESULTS",
          "EVALUATION_RUN_CANCELLING", "EVALUATION_RUN_CANCELLED",
          "EVALUATION_RUN_SUCCESSFUL", "EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and
          "EVALUATION_RUN_FAILED".
        "test_case_description": "str",  # Optional. Test case description.
        "test_case_name": "str",  # Optional. Test case name.
        "test_case_uuid": "str",  # Optional. Test-case UUID.
        "test_case_version": 0  # Optional. Test-case-version.
    },
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "prompts": [
        {
            "evaluation_trace_spans": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. When the span was created.
                    "input": {},  # Optional. Input data for the
                      span (flexible structure - can be messages array, string, etc.).
                    "name": "str",  # Optional. Name/identifier
                      for the span.
                    "output": {},  # Optional. Output data from
                      the span (flexible structure - can be message, string, etc.).
                    "retriever_chunks": [
                        {
                            "chunk_usage_pct": 0.0,  #
                              Optional. The usage percentage of the chunk.
                            "chunk_used": bool,  #
                              Optional. Indicates if the chunk was used in the prompt.
                            "index_uuid": "str",  #
                              Optional. The index uuid (Knowledge Base) of the chunk.
                            "source_name": "str",  #
                              Optional. The source name for the chunk, e.g., the file
                              name or document title.
                            "text": "str"  # Optional.
                              Text content of the chunk.
                        }
                    ],
                    "span_level_metric_results": [
                        {
                            "error_description": "str",
                              # Optional. Error description if the metric could not be
                              calculated.
                            "metric_name": "str",  #
                              Optional. Metric name.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "number_value": 0.0,  #
                              Optional. The value of the metric as a number.
                            "reasoning": "str",  #
                              Optional. Reasoning of the metric result.
                            "string_value": "str"  #
                              Optional. The value of the metric as a string.
                        }
                    ],
                    "spans": [
                        {
                            "agent": {
                                "agent_type":
                                  "AGENT_TYPE_UNSPECIFIED",  # Optional. Default value
                                  is "AGENT_TYPE_UNSPECIFIED". Agent span. Known values
                                  are: "AGENT_TYPE_UNSPECIFIED", "AGENT_TYPE_DEFAULT",
                                  "AGENT_TYPE_PLANNER", "AGENT_TYPE_REACT",
                                  "AGENT_TYPE_REFLECTION", "AGENT_TYPE_ROUTER",
                                  "AGENT_TYPE_CLASSIFIER", "AGENT_TYPE_SUPERVISOR", and
                                  "AGENT_TYPE_JUDGE".
                                "common": {
                                    "created_at":
                                      "2020-02-20 00:00:00",  # Optional. Common
                                      optional fields shared by all span types.
"duration_ns": "str",  # Optional. Common
                                      optional fields shared by all span types.
                                    "metadata": {
"str": "str"  # Optional. Arbitrary
                                          structured metadata.
                                    },
"status_code": 0,  # Optional. Common optional
                                      fields shared by all span types.
                                    "tags": [
                                        "str"
                                          # Optional. Free-form tags for
                                          filtering/grouping.
                                    ]
                                },
                                "redacted_input":
                                  "str",  # Optional. Child spans - must contain
                                  between 1 and 999 spans Allowed types: agent, llm,
                                  tool, retriever (not workflow).
                                "redacted_output":
                                  "str",  # Optional. Child spans - must contain
                                  between 1 and 999 spans Allowed types: agent, llm,
                                  tool, retriever (not workflow).
                                "spans": [
                                    ...
                                ]
                            },
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. When the span was created.
                            "input": {},  # Optional.
                              Input data for the span (flexible structure - can be
                              messages array, string, etc.).
                            "llm": {
                                "common": {
                                    "created_at":
                                      "2020-02-20 00:00:00",  # Optional. Common
                                      optional fields shared by all span types.
"duration_ns": "str",  # Optional. Common
                                      optional fields shared by all span types.
                                    "metadata": {
"str": "str"  # Optional. Arbitrary
                                          structured metadata.
                                    },
"status_code": 0,  # Optional. Common optional
                                      fields shared by all span types.
                                    "tags": [
                                        "str"
                                          # Optional. Free-form tags for
                                          filtering/grouping.
                                    ]
                                },
                                "model": "str",  #
                                  Optional. LLM span.
                                "num_input_tokens":
                                  0,  # Optional. LLM span.
                                "num_output_tokens":
                                  0,  # Optional. LLM span.
                                "temperature": 0.0,
                                  # Optional. LLM span.
"time_to_first_token_ns": "str",  # Optional. LLM
                                  span.
                                "tools": [
                                    {}  #
                                      Optional. Tool definitions passed to the model.
                                ],
                                "total_tokens": 0  #
                                  Optional. LLM span.
                            },
                            "name": "str",  # Optional.
                              Name/identifier for the span.
                            "output": {},  # Optional.
                              Output data from the span (flexible structure - can be
                              message, string, etc.).
                            "retriever": {
                                "common": {
                                    "created_at":
                                      "2020-02-20 00:00:00",  # Optional. Common
                                      optional fields shared by all span types.
"duration_ns": "str",  # Optional. Common
                                      optional fields shared by all span types.
                                    "metadata": {
"str": "str"  # Optional. Arbitrary
                                          structured metadata.
                                    },
"status_code": 0,  # Optional. Common optional
                                      fields shared by all span types.
                                    "tags": [
                                        "str"
                                          # Optional. Free-form tags for
                                          filtering/grouping.
                                    ]
                                }
                            },
                            "tool": {
                                "common": {
                                    "created_at":
                                      "2020-02-20 00:00:00",  # Optional. Common
                                      optional fields shared by all span types.
"duration_ns": "str",  # Optional. Common
                                      optional fields shared by all span types.
                                    "metadata": {
"str": "str"  # Optional. Arbitrary
                                          structured metadata.
                                    },
"status_code": 0,  # Optional. Common optional
                                      fields shared by all span types.
                                    "tags": [
                                        "str"
                                          # Optional. Free-form tags for
                                          filtering/grouping.
                                    ]
                                },
                                "tool_call_id": "str"
                                  # Optional. Tool span.
                            },
                            "type":
                              "TRACE_SPAN_TYPE_UNKNOWN",  # Optional. Default value is
                              "TRACE_SPAN_TYPE_UNKNOWN". Types of spans in a trace.
                              Known values are: "TRACE_SPAN_TYPE_UNKNOWN",
                              "TRACE_SPAN_TYPE_LLM", "TRACE_SPAN_TYPE_RETRIEVER",
                              "TRACE_SPAN_TYPE_TOOL", "TRACE_SPAN_TYPE_AGENT", and
                              "TRACE_SPAN_TYPE_WORKFLOW".
                            "workflow": {
                                "common": {
                                    "created_at":
                                      "2020-02-20 00:00:00",  # Optional. Common
                                      optional fields shared by all span types.
"duration_ns": "str",  # Optional. Common
                                      optional fields shared by all span types.
                                    "metadata": {
"str": "str"  # Optional. Arbitrary
                                          structured metadata.
                                    },
"status_code": 0,  # Optional. Common optional
                                      fields shared by all span types.
                                    "tags": [
                                        "str"
                                          # Optional. Free-form tags for
                                          filtering/grouping.
                                    ]
                                },
                                "spans": [
                                    ...
                                ]
                            }
                        }
                    ],
                    "type": "TRACE_SPAN_TYPE_UNKNOWN"  #
                      Optional. Default value is "TRACE_SPAN_TYPE_UNKNOWN". Types of
                      spans in a trace. Known values are: "TRACE_SPAN_TYPE_UNKNOWN",
                      "TRACE_SPAN_TYPE_LLM", "TRACE_SPAN_TYPE_RETRIEVER",
                      "TRACE_SPAN_TYPE_TOOL", "TRACE_SPAN_TYPE_AGENT", and
                      "TRACE_SPAN_TYPE_WORKFLOW".
                }
            ],
            "ground_truth": "str",  # Optional. The ground truth for the
              prompt.
            "input": "str",  # Optional. The prompt level results.
            "input_tokens": "str",  # Optional. The number of input
              tokens used in the prompt.
            "output": "str",  # Optional. The prompt level results.
            "output_tokens": "str",  # Optional. The number of output
              tokens used in the prompt.
            "prompt_chunks": [
                {
                    "chunk_usage_pct": 0.0,  # Optional. The
                      usage percentage of the chunk.
                    "chunk_used": bool,  # Optional. Indicates if
                      the chunk was used in the prompt.
                    "index_uuid": "str",  # Optional. The index
                      uuid (Knowledge Base) of the chunk.
                    "source_name": "str",  # Optional. The source
                      name for the chunk, e.g., the file name or document title.
                    "text": "str"  # Optional. Text content of
                      the chunk.
                }
            ],
            "prompt_id": 0,  # Optional. Prompt ID.
            "prompt_level_metric_results": [
                {
                    "error_description": "str",  # Optional.
                      Error description if the metric could not be calculated.
                    "metric_name": "str",  # Optional. Metric
                      name.
                    "metric_value_type":
                      "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value is
                      "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                      "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                      "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
                    "number_value": 0.0,  # Optional. The value
                      of the metric as a number.
                    "reasoning": "str",  # Optional. Reasoning of
                      the metric result.
                    "string_value": "str"  # Optional. The value
                      of the metric as a string.
                }
            ],
            "trace_id": "str"  # Optional. The trace id for the prompt.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_evaluation_test_case(test_case_uuid: str, *, evaluation_test_case_version: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Information About an Existing Evaluation Test Case.

To retrive information about an existing evaluation test case, send a GET request to /v2/gen-ai/evaluation_test_case/{test_case_uuid}.

Parameters:
  • test_case_uuid (str) – The test case uuid to retrieve. Required.

  • evaluation_test_case_version (int) – Version of the test case. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "evaluation_test_case": {
        "archived_at": "2020-02-20 00:00:00",  # Optional.
        "created_at": "2020-02-20 00:00:00",  # Optional.
        "created_by_user_email": "str",  # Optional.
        "created_by_user_id": "str",  # Optional.
        "dataset": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Time
              created at.
            "dataset_name": "str",  # Optional. Name of the dataset.
            "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN",  #
              Optional. Default value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known
              values are: "EVALUATION_DATASET_TYPE_UNKNOWN",
              "EVALUATION_DATASET_TYPE_ADK", "EVALUATION_DATASET_TYPE_NON_ADK", and
              "EVALUATION_DATASET_TYPE_MODEL".
            "dataset_uuid": "str",  # Optional. UUID of the dataset.
            "file_size": "str",  # Optional. The size of the dataset
              uploaded file in bytes.
            "has_ground_truth": bool,  # Optional. Does the dataset have
              a ground truth column?.
            "row_count": 0  # Optional. Number of rows in the dataset.
        },
        "dataset_name": "str",  # Optional.
        "dataset_uuid": "str",  # Optional.
        "description": "str",  # Optional.
        "latest_version_number_of_runs": 0,  # Optional.
        "metrics": [
            {
                "category": "METRIC_CATEGORY_UNSPECIFIED",  #
                  Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known
                  values are: "METRIC_CATEGORY_UNSPECIFIED",
                  "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES",
                  "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                  "METRIC_CATEGORY_CONTEXT_QUALITY", and "METRIC_CATEGORY_MODEL_FIT".
                "description": "str",  # Optional.
                "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED",
                  # Optional. Default value is "EVALUATION_SCOPE_UNSPECIFIED". Scope
                  that determines whether a metric belongs to agent evaluation or model
                  evaluation. For backwards compatibility, UNSPECIFIED defaults to
                  agent metrics only in list operations. Known values are:
                  "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                  "EVALUATION_SCOPE_MODEL".
                "inverted": bool,  # Optional. If true, the metric is
                  inverted, meaning that a lower value is better.
                "is_metric_goal": bool,  # Optional.
                "metric_name": "str",  # Optional.
                "metric_rank": 0,  # Optional.
                "metric_type": "METRIC_TYPE_UNSPECIFIED",  #
                  Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known values
                  are: "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                  "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
                  "METRIC_TYPE_MODEL_SAFETY".
                "metric_uuid": "str",  # Optional.
                "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
                  # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                  "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and
                  "METRIC_VALUE_TYPE_PERCENTAGE".
                "range_max": 0.0,  # Optional. The maximum value for
                  the metric.
                "range_min": 0.0  # Optional. The minimum value for
                  the metric.
            }
        ],
        "name": "str",  # Optional.
        "star_metric": {
            "metric_uuid": "str",  # Optional.
            "name": "str",  # Optional.
            "success_threshold": 0.0,  # Optional. The success threshold
              for the star metric. This is a value that the metric must reach to be
              considered successful.
            "success_threshold_pct": 0  # Optional. The success threshold
              for the star metric. This is a percentage value between 0 and 100.
        },
        "test_case_uuid": "str",  # Optional.
        "total_runs": 0,  # Optional.
        "updated_at": "2020-02-20 00:00:00",  # Optional.
        "updated_by_user_email": "str",  # Optional.
        "updated_by_user_id": "str",  # Optional.
        "version": 0  # Optional.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_indexing_job(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Status of Indexing Job for a Knowledge Base.

To get status of an indexing Job for a knowledge base, send a GET request to /v2/gen-ai/indexing_jobs/{uuid}.

Parameters:

uuid (str) – Indexing job id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "job": {
        "completed_datasources": 0,  # Optional. Number of datasources
          indexed completed.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "data_source_jobs": [
            {
                "completed_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source completed indexing.
                "data_source_uuid": "str",  # Optional. Uuid of the
                  indexed data source.
                "error_details": "str",  # Optional. A detailed error
                  description.
                "error_msg": "str",  # Optional. A string code
                  provinding a hint which part of the system experienced an error.
                "failed_item_count": "str",  # Optional. Total count
                  of files that have failed.
                "indexed_file_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "indexed_item_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "removed_item_count": "str",  # Optional. Total count
                  of files that have been removed.
                "skipped_item_count": "str",  # Optional. Total count
                  of files that have been skipped.
                "started_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source started indexing.
                "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                  Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                  "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
                  "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                  "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
                  "DATA_SOURCE_STATUS_CANCELLED".
                "total_bytes": "str",  # Optional. Total size of
                  files in data source in bytes.
                "total_bytes_indexed": "str",  # Optional. Total size
                  of files in data source in bytes that have been indexed.
                "total_file_count": "str"  # Optional. Total file
                  count in the data source.
            }
        ],
        "data_source_uuids": [
            "str"  # Optional. IndexingJob description.
        ],
        "finished_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
          description.
        "is_report_available": bool,  # Optional. Boolean value to determine
          if the indexing job details are available.
        "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
        "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
          "BATCH_JOB_PHASE_UNKNOWN". Known values are: "BATCH_JOB_PHASE_UNKNOWN",
          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
        "started_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
          description.
        "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
          "INDEX_JOB_STATUS_UNKNOWN". Known values are: "INDEX_JOB_STATUS_UNKNOWN",
          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
          "INDEX_JOB_STATUS_CANCELLED".
        "tokens": 0,  # Optional. Number of tokens [This field is
          deprecated].
        "total_datasources": 0,  # Optional. Number of datasources being
          indexed.
        "total_tokens": "str",  # Optional. Total Tokens Consumed By the
          Indexing Job.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_indexing_job_details_signed_url(indexing_job_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Signed URL for Indexing Job Details.

To get a signed URL for indexing job details, send a GET request to /v2/gen-ai/indexing_jobs/{uuid}/details_signed_url.

Parameters:

indexing_job_uuid (str) – The uuid of the indexing job. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "signed_url": "str"  # Optional. The signed url for downloading the indexing
      job details.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_knowledge_base(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Information About an Existing Knowledge Base.

To retrive information about an existing knowledge base, send a GET request to /v2/gen-ai/knowledge_bases/{uuid}.

Parameters:

uuid (str) – Knowledge base id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "database_status": "CREATING",  # Optional. Default value is "CREATING".
      Known values are: "CREATING", "ONLINE", "POWEROFF", "REBUILDING", "REBALANCING",
      "DECOMMISSIONED", "FORKING", "MIGRATING", "RESIZING", "RESTORING", "POWERING_ON",
      "UNHEALTHY", and "UPGRADING".
    "knowledge_base": {
        "added_to_agent_at": "2020-02-20 00:00:00",  # Optional. Time when
          the knowledge base was added to the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "database_id": "str",  # Optional. Knowledgebase Description.
        "embedding_model_uuid": "str",  # Optional. Knowledgebase
          Description.
        "is_public": bool,  # Optional. Whether the knowledge base is public
          or not.
        "last_indexing_job": {
            "completed_datasources": 0,  # Optional. Number of
              datasources indexed completed.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "data_source_jobs": [
                {
                    "completed_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source completed indexing.
                    "data_source_uuid": "str",  # Optional. Uuid
                      of the indexed data source.
                    "error_details": "str",  # Optional. A
                      detailed error description.
                    "error_msg": "str",  # Optional. A string
                      code provinding a hint which part of the system experienced an
                      error.
                    "failed_item_count": "str",  # Optional.
                      Total count of files that have failed.
                    "indexed_file_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "indexed_item_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "removed_item_count": "str",  # Optional.
                      Total count of files that have been removed.
                    "skipped_item_count": "str",  # Optional.
                      Total count of files that have been skipped.
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source started indexing.
                    "status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                      Optional. Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known
                      values are: "DATA_SOURCE_STATUS_UNKNOWN",
                      "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED",
                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                      "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED",
                      and "DATA_SOURCE_STATUS_CANCELLED".
                    "total_bytes": "str",  # Optional. Total size
                      of files in data source in bytes.
                    "total_bytes_indexed": "str",  # Optional.
                      Total size of files in data source in bytes that have been
                      indexed.
                    "total_file_count": "str"  # Optional. Total
                      file count in the data source.
                }
            ],
            "data_source_uuids": [
                "str"  # Optional. IndexingJob description.
            ],
            "finished_at": "2020-02-20 00:00:00",  # Optional.
              IndexingJob description.
            "is_report_available": bool,  # Optional. Boolean value to
              determine if the indexing job details are available.
            "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
            "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default
              value is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
              "BATCH_JOB_PHASE_CANCELLED".
            "started_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
              description.
            "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
              value is "INDEX_JOB_STATUS_UNKNOWN". Known values are:
              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
              "INDEX_JOB_STATUS_IN_PROGRESS", "INDEX_JOB_STATUS_COMPLETED",
              "INDEX_JOB_STATUS_FAILED", "INDEX_JOB_STATUS_NO_CHANGES",
              "INDEX_JOB_STATUS_PENDING", and "INDEX_JOB_STATUS_CANCELLED".
            "tokens": 0,  # Optional. Number of tokens [This field is
              deprecated].
            "total_datasources": 0,  # Optional. Number of datasources
              being indexed.
            "total_tokens": "str",  # Optional. Total Tokens Consumed By
              the Indexing Job.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Name of knowledge base.
        "project_id": "str",  # Optional. Knowledgebase Description.
        "region": "str",  # Optional. Region code.
        "reranking_config": {
            "enabled": bool,  # Optional. Whether reranking is enabled
              for retrieval.
            "model": "str"  # Optional. Reranker model internal name.
        },
        "tags": [
            "str"  # Optional. Tags to organize related resources.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "user_id": "str",  # Optional. Id of user that created the knowledge
          base.
        "uuid": "str"  # Optional. Unique id for knowledge base.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_model_catalog_card(id: str, *, model_id: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get Model Catalog Card.

Returns detailed information for a specific model in the catalog including capabilities, pricing, and code examples.

Parameters:
  • id (str) – Required.

  • model_id (str) – Model identifier used for API calls (e.g., “llama3.1-70b-instruct”). Alternative to UUID lookup. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "availability": [
            "str"  # Optional. Detail view for GetModelCatalogCard.
        ],
        "benchmark_score": {},  # Optional. Benchmark scores for this model,
          stored as arbitrary JSON.
        "capabilities": [
            "str"  # Optional. Detail view for GetModelCatalogCard.
        ],
        "code_snippets": {
            "curl": "str",  # Optional. Code examples for using the
              model.
            "javascript": "str",  # Optional. Code examples for using the
              model.
            "python": "str",  # Optional. Code examples for using the
              model.
            "sdk": "str"  # Optional. Code examples for using the model.
        },
        "context_window": "str",  # Optional. Specs (same as Entry).
        "creator": "str",  # Optional. Model creator/developer (e.g., "Meta",
          "Anthropic", "OpenAI").
        "description": "str",  # Optional. Card-specific.
        "id": "str",  # Optional. Identity (same as Entry).
        "modalities": {
            "input": [
                "str"  # Optional. Input/output modalities.
            ],
            "output": [
                "str"  # Optional. Input/output modalities.
            ]
        },
        "model_id": "str",  # Optional. Model identifier used for API calls
          (e.g., "llama3.1-70b-instruct").
        "name": "str",  # Optional. Detail view for GetModelCatalogCard.
        "parameter_count": 0.0,  # Optional. Detail view for
          GetModelCatalogCard.
        "pricing": {
            "input_price_per_million": 0.0,  # Optional. Pricing per
              million tokens (aligns with existing ModelPrice pattern).
            "output_price_per_million": 0.0,  # Optional. Pricing per
              million tokens (aligns with existing ModelPrice pattern).
            "price_per_audio": 0.0,  # Optional. Pricing per million
              tokens (aligns with existing ModelPrice pattern).
            "price_per_image": 0.0,  # Optional. Unit-based pricing for
              non-token models (e.g., Fal AI image/video/audio generation, speech
              models). At most one of these is typically populated per model.
              Token-based models (chat, embeddings) leave all of these at 0 and
              populate input_price_per_million / output_price_per_million instead.
            "price_per_megapixel": 0.0,  # Optional. Pricing per million
              tokens (aligns with existing ModelPrice pattern).
            "price_per_second": 0.0,  # Optional. Pricing per million
              tokens (aligns with existing ModelPrice pattern).
            "price_per_thousand_characters": 0.0,  # Optional. Pricing
              per million tokens (aligns with existing ModelPrice pattern).
            "price_per_video": 0.0  # Optional. Pricing per million
              tokens (aligns with existing ModelPrice pattern).
        },
        "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
          is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
          "MODEL_PROVIDER_OPENAI".
        "short_description": "str",  # Optional. Detail view for
          GetModelCatalogCard.
        "type": "str"  # Optional. Detail view for GetModelCatalogCard.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_model_evaluation_run(eval_run_uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

Retrieve Model Evaluation Run.

To retrieve a model evaluation run, send a GET request to /v2/genai/model_evaluation_runs/{eval_run_uuid}.

Parameters:
  • eval_run_uuid (str) – UUID of the evaluation run. Required.

  • page (int) – Page number for per-prompt results (defaults to 1). Default value is None.

  • per_page (int) – Number of per-prompt results per page (defaults to 50). Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "results": [
        {
            "candidate_model_name": "str",  # Optional. Paginated
              per-prompt evaluation results.
            "candidate_model_uuid": "str",  # Optional. Paginated
              per-prompt evaluation results.
            "ground_truth": "str",  # Optional. Paginated per-prompt
              evaluation results.
            "input": "str",  # Optional. The input query sent to the
              candidate model.
            "metric_results": [
                {
                    "error_description": "str",  # Optional.
                      Error description if the metric could not be calculated.
                    "metric_name": "str",  # Optional. Metric
                      name.
                    "metric_value_type":
                      "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value is
                      "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                      "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                      "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
                    "number_value": 0.0,  # Optional. The value
                      of the metric as a number.
                    "reasoning": "str",  # Optional. Reasoning of
                      the metric result.
                    "string_value": "str"  # Optional. The value
                      of the metric as a string.
                }
            ],
            "output": "str"  # Optional. The response from the candidate
              model.
        }
    ],
    "run": {
        "candidate_inference_config": {
            "max_tokens": 0,  # Optional. Inference configuration for the
              candidate model during evaluation.
            "stop_token": "str",  # Optional. Inference configuration for
              the candidate model during evaluation.
            "system_prompt": "str",  # Optional. Inference configuration
              for the candidate model during evaluation.
            "temperature": 0.0  # Optional. Inference configuration for
              the candidate model during evaluation.
        },
        "candidate_model_name": "str",  # Optional. Model Evaluation Run
          Detail - full view returned when fetching a specific run.
        "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS",  #
          Optional. Default value is "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether
          inference runs against the serverless platform, a dedicated deployment, or a
          model router. Known values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS",
          "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER".
        "candidate_model_uuid": "str",  # Optional. Candidate model being
          evaluated.
        "completed_at": "2020-02-20 00:00:00",  # Optional. Model Evaluation
          Run Detail - full view returned when fetching a specific run.
        "created_at": "2020-02-20 00:00:00",  # Optional. Model Evaluation
          Run Detail - full view returned when fetching a specific run.
        "dataset_name": "str",  # Optional. Model Evaluation Run Detail -
          full view returned when fetching a specific run.
        "dataset_uuid": "str",  # Optional. Dataset used for the evaluation.
        "error_description": "str",  # Optional. Error description if the run
          failed or partially succeeded.
        "eval_preset_name": "str",  # Optional. Model Evaluation Run Detail -
          full view returned when fetching a specific run.
        "eval_preset_uuid": "str",  # Optional. Model Evaluation Run Detail -
          full view returned when fetching a specific run.
        "eval_run_uuid": "str",  # Optional. UUID of the evaluation run.
        "judge_model_name": "str",  # Optional. Model Evaluation Run Detail -
          full view returned when fetching a specific run.
        "judge_model_uuid": "str",  # Optional. Judge model used to score
          responses.
        "metrics": [
            {
                "category": "METRIC_CATEGORY_UNSPECIFIED",  #
                  Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known
                  values are: "METRIC_CATEGORY_UNSPECIFIED",
                  "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES",
                  "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                  "METRIC_CATEGORY_CONTEXT_QUALITY", and "METRIC_CATEGORY_MODEL_FIT".
                "description": "str",  # Optional. Metrics selected
                  for this evaluation.
                "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED",
                  # Optional. Default value is "EVALUATION_SCOPE_UNSPECIFIED". Scope
                  that determines whether a metric belongs to agent evaluation or model
                  evaluation. For backwards compatibility, UNSPECIFIED defaults to
                  agent metrics only in list operations. Known values are:
                  "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                  "EVALUATION_SCOPE_MODEL".
                "inverted": bool,  # Optional. If true, the metric is
                  inverted, meaning that a lower value is better.
                "is_metric_goal": bool,  # Optional. Metrics selected
                  for this evaluation.
                "metric_name": "str",  # Optional. Metrics selected
                  for this evaluation.
                "metric_rank": 0,  # Optional. Metrics selected for
                  this evaluation.
                "metric_type": "METRIC_TYPE_UNSPECIFIED",  #
                  Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known values
                  are: "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                  "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
                  "METRIC_TYPE_MODEL_SAFETY".
                "metric_uuid": "str",  # Optional. Metrics selected
                  for this evaluation.
                "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
                  # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                  "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and
                  "METRIC_VALUE_TYPE_PERCENTAGE".
                "range_max": 0.0,  # Optional. The maximum value for
                  the metric.
                "range_min": 0.0  # Optional. The minimum value for
                  the metric.
            }
        ],
        "name": "str",  # Optional. Name of the evaluation run.
        "result_summary": {
            "end_time": "2020-02-20 00:00:00",  # Optional. Aggregated
              result summary for a completed model evaluation run.
            "metric_summaries": [
                {
                    "description": "str",  # Optional. Per-metric
                      aggregated pass/fail statistics.
                    "fail_percent": 0.0,  # Optional. Per-metric
                      aggregated pass/fail statistics.
                    "metric_name": "str",  # Optional. Per-metric
                      aggregated pass/fail statistics.
                    "metric_uuid": "str",  # Optional. Per-metric
                      aggregated pass/fail statistics.
                    "pass_percent": 0.0  # Optional. Per-metric
                      aggregated pass/fail statistics.
                }
            ],
            "overall_score_percent": 0.0,  # Optional. Aggregated result
              summary for a completed model evaluation run.
            "per_model_summaries": {
                "summaries": [
                    {
                        "metric_summaries": [
                            {
                                "description": "str",
                                  # Optional. Per-metric pass/fail for only this
                                  model's prompts.
                                "fail_percent": 0.0,
                                  # Optional. Per-metric pass/fail for only this
                                  model's prompts.
                                "metric_name": "str",
                                  # Optional. Per-metric pass/fail for only this
                                  model's prompts.
                                "metric_uuid": "str",
                                  # Optional. Per-metric pass/fail for only this
                                  model's prompts.
                                "pass_percent": 0.0
                                  # Optional. Per-metric pass/fail for only this
                                  model's prompts.
                            }
                        ],
                        "model_name": "str",  # Optional.
                          Name/slug of the model (matches routed_model from results).
                        "performance_metrics": {
                            "candidate_latency": {
                                "avg_e2e_latency_ms":
                                  0.0,  # Optional. Average end-to-end latency across
                                  all invocations.
                                "max_e2e_latency_ms":
                                  0.0,  # Optional. Maximum end-to-end latency
                                  observed.
                                "min_e2e_latency_ms":
                                  0.0,  # Optional. Minimum end-to-end latency
                                  observed.
                                "p50_latency_ms":
                                  0.0,  # Optional. P50 (median) latency.
                                "p90_latency_ms":
                                  0.0,  # Optional. P90 latency.
                                "p95_latency_ms": 0.0
                                  # Optional. P95 latency.
                            },
                            "token_usage": {
"total_candidate_input_tokens": "str",  # Optional.
                                  All performance metrics are for the candidate model
                                  unless noted otherwise.
"total_candidate_output_tokens": "str",  # Optional.
                                  All performance metrics are for the candidate model
                                  unless noted otherwise.
"total_candidate_tokens": "str",  # Optional. All
                                  performance metrics are for the candidate model
                                  unless noted otherwise.
"total_judge_input_tokens": "str",  # Optional. All
                                  performance metrics are for the candidate model
                                  unless noted otherwise.
"total_judge_output_tokens": "str",  # Optional. All
                                  performance metrics are for the candidate model
                                  unless noted otherwise.
                                "total_judge_tokens":
                                  "str"  # Optional. All performance metrics are for
                                  the candidate model unless noted otherwise.
                            }
                        },
                        "prompt_count": 0  # Optional. Number
                          of prompts routed to this model.
                    }
                ]
            },
            "performance_metrics": {
                "candidate_latency": {
                    "avg_e2e_latency_ms": 0.0,  # Optional.
                      Average end-to-end latency across all invocations.
                    "max_e2e_latency_ms": 0.0,  # Optional.
                      Maximum end-to-end latency observed.
                    "min_e2e_latency_ms": 0.0,  # Optional.
                      Minimum end-to-end latency observed.
                    "p50_latency_ms": 0.0,  # Optional. P50
                      (median) latency.
                    "p90_latency_ms": 0.0,  # Optional. P90
                      latency.
                    "p95_latency_ms": 0.0  # Optional. P95
                      latency.
                },
                "token_usage": {
                    "total_candidate_input_tokens": "str",  #
                      Optional. All performance metrics are for the candidate model
                      unless noted otherwise.
                    "total_candidate_output_tokens": "str",  #
                      Optional. All performance metrics are for the candidate model
                      unless noted otherwise.
                    "total_candidate_tokens": "str",  # Optional.
                      All performance metrics are for the candidate model unless noted
                      otherwise.
                    "total_judge_input_tokens": "str",  #
                      Optional. All performance metrics are for the candidate model
                      unless noted otherwise.
                    "total_judge_output_tokens": "str",  #
                      Optional. All performance metrics are for the candidate model
                      unless noted otherwise.
                    "total_judge_tokens": "str"  # Optional. All
                      performance metrics are for the candidate model unless noted
                      otherwise.
                }
            },
            "pricing": {
                "currency": "str",  # Optional. Currency code (e.g.,
                  "USD").
                "judge_model_pricing": {
                    "input_cost": 0.0,  # Optional. Cost of input
                      tokens.
                    "output_cost": 0.0,  # Optional. Cost of
                      output tokens.
                    "total_cost": 0.0  # Optional. Total cost
                      (input + output).
                },
                "per_candidate_model_pricing": [
                    {
                        "model_name": "str",  # Optional.
                          Model name (for display purposes).
                        "model_uuid": "str",  # Optional.
                          Model UUID.
                        "pricing": {
                            "input_cost": 0.0,  #
                              Optional. Cost of input tokens.
                            "output_cost": 0.0,  #
                              Optional. Cost of output tokens.
                            "total_cost": 0.0  #
                              Optional. Total cost (input + output).
                        },
                        "prompt_count": 0  # Optional. Number
                          of prompts/rows routed to this model.
                    }
                ],
                "total_cost": 0.0  # Optional. Total cost of the
                  evaluation run (all candidates + judge).
            },
            "star_metric_summary": {
                "metric_name": "str",  # Optional. Star metric
                  summary with identifying details and threshold.
                "metric_uuid": "str",  # Optional. Star metric
                  summary with identifying details and threshold.
                "threshold": 0.0  # Optional. Star metric summary
                  with identifying details and threshold.
            },
            "start_time": "2020-02-20 00:00:00",  # Optional. Run timing.
            "total_duration_seconds": 0  # Optional. Total wall-clock
              duration in seconds.
        },
        "star_metric": {
            "metric_uuid": "str",  # Optional. Model Evaluation Run
              Detail - full view returned when fetching a specific run.
            "name": "str",  # Optional. Model Evaluation Run Detail -
              full view returned when fetching a specific run.
            "success_threshold": 0.0,  # Optional. The success threshold
              for the star metric. This is a value that the metric must reach to be
              considered successful.
            "success_threshold_pct": 0  # Optional. The success threshold
              for the star metric. This is a percentage value between 0 and 100.
        },
        "started_at": "2020-02-20 00:00:00",  # Optional. Model Evaluation
          Run Detail - full view returned when fetching a specific run.
        "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"  # Optional.
          Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED". Model Evaluation
          Run Statuses. Known values are: "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED",
          "MODEL_EVALUATION_RUN_QUEUED", "MODEL_EVALUATION_RUN_RUNNING_DATASET",
          "MODEL_EVALUATION_RUN_EVALUATING_RESULTS", "MODEL_EVALUATION_RUN_CANCELLING",
          "MODEL_EVALUATION_RUN_CANCELLED", "MODEL_EVALUATION_RUN_SUCCESSFUL",
          "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and
          "MODEL_EVALUATION_RUN_FAILED".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_model_evaluation_run_results_download_url(eval_run_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Download URL for Model Evaluation Run Results.

To get a presigned download URL for model evaluation run results (gzip-compressed JSON), send a GET request to /v2/genai/model_evaluation_runs/{eval_run_uuid}/results/download_url.

Parameters:

eval_run_uuid (str) – UUID of the evaluation run. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "download_url": "str",  # Optional. The presigned URL to download the
      gzip-compressed JSON results file (.json.gz).
    "expires_at": "2020-02-20 00:00:00"  # Optional. The time the URL expires at.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_model_router(uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Model Router.

To retrieve details of a model router, send a GET request to /v2/gen-ai/models/routers/{uuid}.

Parameters:

uuid (str) – Model router id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "model_router": {
        "config": {
            "fallback_models": [
                "str"  # Optional. Router-level fallback models.
            ],
            "policies": [
                {
                    "custom_task": {
                        "description": "str",  # Optional.
                          Short task description.
                        "name": "str"  # Optional. Task name.
                    },
                    "models": [
                        "str"  # Optional. Models assigned to
                          the task.
                    ],
                    "selection_policy": {
                        "prefer": "str"  # Optional. One of:
                          none, cheapest, fastest.
                    },
                    "task_slug": "str"  # Optional. Task slug.
                }
            ]
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "description": "str",  # Optional. Description.
        "name": "str",  # Optional. Name of the model router.
        "regions": [
            "str"  # Optional. Target regions for the router.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_oauth2_url(*, type: Optional[str] = None, redirect_url: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get Oauth2 URL.

To generate an Oauth2-URL for use with your localhost, send a GET request to /v2/gen-ai/oauth2/url. Pass ‘http://localhost:3000 as redirect_url.

Parameters:
  • type (str) – Type “google” / “dropbox”. Default value is None.

  • redirect_url (str) – The redirect url. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "url": "str"  # Optional. The oauth2 url.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_openai_api_key(api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get OpenAI API Key.

To retrieve details of an OpenAI API key, send a GET request to /v2/gen-ai/openai/keys/{api_key_uuid}.

Parameters:

api_key_uuid (str) – API key ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "models": [
            {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            }
        ],
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_scheduled_indexing(knowledge_base_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Scheduled Indexing for Knowledge Base.

Get Scheduled Indexing for knowledge base using knoweldge base uuid, send a GET request to /v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}.

Parameters:

knowledge_base_uuid (str) – UUID of the scheduled indexing entry. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "indexing_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Created at
          timestamp.
        "days": [
            0  # Optional. Days for execution (day is represented same as
              in a cron expression, e.g. Monday begins with 1 ).
        ],
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted at
          timestamp (if soft deleted).
        "is_active": bool,  # Optional. Whether the schedule is currently
          active.
        "knowledge_base_uuid": "str",  # Optional. Knowledge base uuid
          associated with this schedule.
        "last_ran_at": "2020-02-20 00:00:00",  # Optional. Last time the
          schedule was executed.
        "next_run_at": "2020-02-20 00:00:00",  # Optional. Next scheduled
          run.
        "time": "str",  # Optional. Scheduled time of execution (HH:MM:SS
          format).
        "updated_at": "2020-02-20 00:00:00",  # Optional. Updated at
          timestamp.
        "uuid": "str"  # Optional. Unique identifier for the scheduled
          indexing entry.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_workspace(workspace_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Workspace.

To retrieve details of a workspace, GET request to /v2/gen-ai/workspaces/{workspace_uuid}. The response body is a JSON object containing the workspace.

Parameters:

workspace_uuid (str) – Workspace UUID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "workspace": {
        "agents": [
            {
                "anthropic_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "api_key_infos": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date.
                        "created_by": "str",  # Optional.
                          Created by.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Deleted date.
                        "name": "str",  # Optional. Name.
                        "secret_key": "str",  # Optional. Api
                          key infos.
                        "uuid": "str"  # Optional. Uuid.
                    }
                ],
                "api_keys": [
                    {
                        "api_key": "str"  # Optional. Api
                          key.
                    }
                ],
                "chatbot": {
                    "allowed_domains": [
                        "str"  # Optional. A Chatbot.
                    ],
                    "button_background_color": "str",  #
                      Optional. A Chatbot.
                    "logo": "str",  # Optional. A Chatbot.
                    "name": "str",  # Optional. Name of chatbot.
                    "primary_color": "str",  # Optional. A
                      Chatbot.
                    "secondary_color": "str",  # Optional. A
                      Chatbot.
                    "starting_message": "str"  # Optional. A
                      Chatbot.
                },
                "chatbot_identifiers": [
                    {
                        "agent_chatbot_identifier": "str"  #
                          Optional. Agent chatbot identifier.
                    }
                ],
                "child_agents": [
                    ...
                ],
                "conversation_logs_enabled": bool,  # Optional.
                  Whether conversation logs are enabled for the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "deployment": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "name": "str",  # Optional. Name.
                    "status": "STATUS_UNKNOWN",  # Optional.
                      Default value is "STATUS_UNKNOWN". Known values are:
                      "STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT",
                      "STATUS_DEPLOYING", "STATUS_RUNNING", "STATUS_FAILED",
                      "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
                      "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and
                      "STATUS_BUILDING".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Access your
                      deployed agent here.
                    "uuid": "str",  # Optional. Unique id.
                    "visibility": "VISIBILITY_UNKNOWN"  #
                      Optional. Default value is "VISIBILITY_UNKNOWN". *
                      VISIBILITY_UNKNOWN: The status of the deployment is unknown    *
                      VISIBILITY_DISABLED: The deployment is disabled and will no
                      longer service requests   * VISIBILITY_PLAYGROUND: Deprecated: No
                      longer a valid state   * VISIBILITY_PUBLIC: The deployment is
                      public and will service requests from the public internet   *
                      VISIBILITY_PRIVATE: The deployment is private and will only
                      service requests from other agents, or through API keys. Known
                      values are: "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED",
                      "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC", and
                      "VISIBILITY_PRIVATE".
                },
                "description": "str",  # Optional. Description of
                  agent.
                "functions": [
                    {
                        "api_key": "str",  # Optional. Api
                          key.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "description": "str",  # Optional.
                          Agent description.
                        "faas_name": "str",  # Optional.
                          Agents.
                        "faas_namespace": "str",  # Optional.
                          Agents.
                        "input_schema": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. Name.
                        "output_schema": {},  # Optional. Any
                          object.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "url": "str",  # Optional. Download
                          your agent here.
                        "uuid": "str"  # Optional. Unique id.
                    }
                ],
                "guardrails": [
                    {
                        "agent_uuid": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "default_response": "str",  #
                          Optional. The guardrails the agent is attached to.
                        "description": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "guardrail_uuid": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "is_attached": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "is_default": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "metadata": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "priority": 0,  # Optional. The
                          guardrails the agent is attached to.
                        "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                          Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known
                          values are: "GUARDRAIL_TYPE_UNKNOWN",
                          "GUARDRAIL_TYPE_JAILBREAK", "GUARDRAIL_TYPE_SENSITIVE_DATA",
                          and "GUARDRAIL_TYPE_CONTENT_MODERATION".
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "uuid": "str"  # Optional. The
                          guardrails the agent is attached to.
                    }
                ],
                "if_case": "str",  # Optional. Agents.
                "instruction": "str",  # Optional. Agent instruction.
                  Instructions help your agent to perform its job effectively. See
                  `Write Effective Agent Instructions
                  <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
                  for best practices.
                "k": 0,  # Optional. Agents.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          Knowledge bases.
                        "embedding_model_uuid": "str",  #
                          Optional. Knowledge bases.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          Knowledge bases.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "logging_config": {
                    "galileo_project_id": "str",  # Optional.
                      Galileo project identifier.
                    "galileo_project_name": "str",  # Optional.
                      Name of the Galileo project.
                    "insights_enabled": bool,  # Optional.
                      Whether insights are enabled.
                    "insights_enabled_at": "2020-02-20 00:00:00",
                      # Optional. Timestamp when insights were enabled.
                    "log_stream_id": "str",  # Optional.
                      Identifier for the log stream.
                    "log_stream_name": "str"  # Optional. Name of
                      the log stream.
                },
                "max_tokens": 0,  # Optional. Agents.
                "mcp_servers": [
                    {
                        "allowed_tools": [
                            "str"  # Optional. Optional
                              list of allowed tool names to expose from this server.
                        ],
                        "authorization": "str",  # Optional.
                          Optional authorization header value for the MCP server.
                        "headers": {
                            "str": "str"  # Optional.
                              Optional additional headers to send to the MCP server.
                        },
                        "server_label": "str",  # Optional. A
                          label identifying this MCP server.
                        "server_url": "str"  # Optional. The
                          URL of the MCP server.
                    }
                ],
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "model_provider_key": {
                    "api_key_uuid": "str",  # Optional. API key
                      ID.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name of the key.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "updated_at": "2020-02-20 00:00:00"  #
                      Optional. Key last updated date.
                },
                "model_router": {
                    "config": {
                        "fallback_models": [
                            "str"  # Optional.
                              Router-level fallback models.
                        ],
                        "policies": [
                            {
                                "custom_task": {
"description": "str",  # Optional. Short task
                                      description.
                                    "name": "str"
                                      # Optional. Task name.
                                },
                                "models": [
                                    "str"  #
                                      Optional. Models assigned to the task.
                                ],
                                "selection_policy": {
                                    "prefer":
                                      "str"  # Optional. One of: none, cheapest,
                                      fastest.
                                },
                                "task_slug": "str"  #
                                  Optional. Task slug.
                            }
                        ]
                    },
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "description": "str",  # Optional.
                      Description.
                    "name": "str",  # Optional. Name of the model
                      router.
                    "regions": [
                        "str"  # Optional. Target regions for
                          the router.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Agent name.
                "openai_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "parent_agents": [
                    ...
                ],
                "project_id": "str",  # Optional. Agents.
                "provide_citations": bool,  # Optional. Whether the
                  agent should provide in-response citations.
                "reasoning_effort": "str",  # Optional. The reasoning
                  effort for the agent.
                "region": "str",  # Optional. Region code.
                "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  #
                  Optional. Default value is "RETRIEVAL_METHOD_UNKNOWN". *
                  RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown    *
                  RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite   *
                  RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back   *
                  RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries   *
                  RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
                  are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
                  "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
                  "RETRIEVAL_METHOD_NONE".
                "route_created_at": "2020-02-20 00:00:00",  #
                  Optional. Creation of route date / time.
                "route_created_by": "str",  # Optional. Agents.
                "route_name": "str",  # Optional. Route name.
                "route_uuid": "str",  # Optional. Agents.
                "tags": [
                    "str"  # Optional. Agent tag to organize
                      related resources.
                ],
                "temperature": 0.0,  # Optional. Agents.
                "template": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's creation date.
                    "description": "str",  # Optional. Deprecated
                      - Use summary instead.
                    "guardrails": [
                        {
                            "priority": 0,  # Optional.
                              Priority of the guardrail.
                            "uuid": "str"  # Optional.
                              Uuid of the guardrail.
                        }
                    ],
                    "instruction": "str",  # Optional.
                      Instructions for the agent template.
                    "k": 0,  # Optional. The 'k' value for the
                      agent template.
                    "knowledge_bases": [
                        {
                            "added_to_agent_at":
                              "2020-02-20 00:00:00",  # Optional. Time when the
                              knowledge base was added to the agent.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "database_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "embedding_model_uuid":
                              "str",  # Optional. List of knowledge bases associated
                              with the agent template.
                            "is_public": bool,  #
                              Optional. Whether the knowledge base is public or not.
                            "last_indexing_job": {
"completed_datasources": 0,  # Optional. Number of
                                  datasources indexed completed.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "data_source_jobs": [
                                    {
"completed_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source
                                          completed indexing.
"data_source_uuid": "str",  # Optional. Uuid
                                          of the indexed data source.
"error_details": "str",  # Optional. A
                                          detailed error description.
"error_msg": "str",  # Optional. A string
                                          code provinding a hint which part of the
                                          system experienced an error.
"failed_item_count": "str",  # Optional.
                                          Total count of files that have failed.
"indexed_file_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"indexed_item_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"removed_item_count": "str",  # Optional.
                                          Total count of files that have been removed.
"skipped_item_count": "str",  # Optional.
                                          Total count of files that have been skipped.
"started_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source started
                                          indexing.
"status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                                          Optional. Default value is
                                          "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                          are: "DATA_SOURCE_STATUS_UNKNOWN",
                                          "DATA_SOURCE_STATUS_IN_PROGRESS",
                                          "DATA_SOURCE_STATUS_UPDATED",
                                          "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                          "DATA_SOURCE_STATUS_NOT_UPDATED",
                                          "DATA_SOURCE_STATUS_FAILED", and
                                          "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size
                                          of files in data source in bytes.
"total_bytes_indexed": "str",  # Optional.
                                          Total size of files in data source in bytes
                                          that have been indexed.
"total_file_count": "str"  # Optional. Total
                                          file count in the data source.
                                    }
                                ],
                                "data_source_uuids":
                                  [
                                    "str"  #
                                      Optional. IndexingJob description.
                                ],
                                "finished_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
"is_report_available": bool,  # Optional. Boolean
                                  value to determine if the indexing job details are
                                  available.
"knowledge_base_uuid": "str",  # Optional. Knowledge
                                  base id.
                                "phase":
                                  "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value
                                  is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                                  "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                                  "BATCH_JOB_PHASE_RUNNING",
                                  "BATCH_JOB_PHASE_SUCCEEDED",
                                  "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR",
                                  and "BATCH_JOB_PHASE_CANCELLED".
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
                                "status":
                                  "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
                                  value is "INDEX_JOB_STATUS_UNKNOWN". Known values
                                  are: "INDEX_JOB_STATUS_UNKNOWN",
                                  "INDEX_JOB_STATUS_PARTIAL",
                                  "INDEX_JOB_STATUS_IN_PROGRESS",
                                  "INDEX_JOB_STATUS_COMPLETED",
                                  "INDEX_JOB_STATUS_FAILED",
                                  "INDEX_JOB_STATUS_NO_CHANGES",
                                  "INDEX_JOB_STATUS_PENDING", and
                                  "INDEX_JOB_STATUS_CANCELLED".
                                "tokens": 0,  #
                                  Optional. Number of tokens [This field is
                                  deprecated].
                                "total_datasources":
                                  0,  # Optional. Number of datasources being indexed.
                                "total_tokens":
                                  "str",  # Optional. Total Tokens Consumed By the
                                  Indexing Job.
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "uuid": "str"  #
                                  Optional. Unique id.
                            },
                            "name": "str",  # Optional.
                              Name of knowledge base.
                            "project_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "region": "str",  # Optional.
                              Region code.
                            "reranking_config": {
                                "enabled": bool,  #
                                  Optional. Whether reranking is enabled for retrieval.
                                "model": "str"  #
                                  Optional. Reranker model internal name.
                            },
                            "tags": [
                                "str"  # Optional.
                                  Tags to organize related resources.
                            ],
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "user_id": "str",  #
                              Optional. Id of user that created the knowledge base.
                            "uuid": "str"  # Optional.
                              Unique id for knowledge base.
                        }
                    ],
                    "long_description": "str",  # Optional. The
                      long description of the agent template.
                    "max_tokens": 0,  # Optional. The max_tokens
                      setting for the agent template.
                    "model": {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    },
                    "name": "str",  # Optional. Name of the agent
                      template.
                    "short_description": "str",  # Optional. The
                      short description of the agent template.
                    "summary": "str",  # Optional. The summary of
                      the agent template.
                    "tags": [
                        "str"  # Optional. List of tags
                          associated with the agent template.
                    ],
                    "temperature": 0.0,  # Optional. The
                      temperature setting for the agent template.
                    "template_type":
                      "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional. Default value is
                      "AGENT_TEMPLATE_TYPE_STANDARD". * AGENT_TEMPLATE_TYPE_STANDARD:
                      The standard agent template    * AGENT_TEMPLATE_TYPE_ONE_CLICK:
                      The one click agent template. Known values are:
                      "AGENT_TEMPLATE_TYPE_STANDARD" and
                      "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                    "top_p": 0.0,  # Optional. The top_p setting
                      for the agent template.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's last updated date.
                    "uuid": "str"  # Optional. Unique id.
                },
                "thinking_token_budget": 0,  # Optional. The thinking
                  token budget for Anthropic extended thinking (0 = disabled).
                "top_p": 0.0,  # Optional. Agents.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your agent under
                  this url.
                "user_id": "str",  # Optional. Id of user that
                  created the agent.
                "uuid": "str",  # Optional. Unique agent id.
                "version_hash": "str",  # Optional. The latest
                  version of the agent.
                "vpc_egress_ips": [
                    "str"  # Optional. VPC Egress IPs.
                ],
                "vpc_uuid": "str",  # Optional. Agents.
                "workspace": ...
            }
        ],
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. The id of user who created this
          workspace.
        "created_by_email": "str",  # Optional. The email of the user who
          created this workspace.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "description": "str",  # Optional. Description of the workspace.
        "evaluation_test_cases": [
            {
                "archived_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_by_user_email": "str",  # Optional.
                  Evaluations.
                "created_by_user_id": "str",  # Optional.
                  Evaluations.
                "dataset": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Time created at.
                    "dataset_name": "str",  # Optional. Name of
                      the dataset.
                    "dataset_type":
                      "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value is
                      "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                      "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK",
                      "EVALUATION_DATASET_TYPE_NON_ADK", and
                      "EVALUATION_DATASET_TYPE_MODEL".
                    "dataset_uuid": "str",  # Optional. UUID of
                      the dataset.
                    "file_size": "str",  # Optional. The size of
                      the dataset uploaded file in bytes.
                    "has_ground_truth": bool,  # Optional. Does
                      the dataset have a ground truth column?.
                    "row_count": 0  # Optional. Number of rows in
                      the dataset.
                },
                "dataset_name": "str",  # Optional. Evaluations.
                "dataset_uuid": "str",  # Optional. Evaluations.
                "description": "str",  # Optional. Evaluations.
                "latest_version_number_of_runs": 0,  # Optional.
                  Evaluations.
                "metrics": [
                    {
                        "category":
                          "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                          "METRIC_CATEGORY_UNSPECIFIED", "METRIC_CATEGORY_CORRECTNESS",
                          "METRIC_CATEGORY_USER_OUTCOMES",
                          "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                          "METRIC_CATEGORY_CONTEXT_QUALITY", and
                          "METRIC_CATEGORY_MODEL_FIT".
                        "description": "str",  # Optional.
                          Evaluations.
                        "evaluation_scope":
                          "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default value is
                          "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether
                          a metric belongs to agent evaluation or model evaluation. For
                          backwards compatibility, UNSPECIFIED defaults to agent
                          metrics only in list operations. Known values are:
                          "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                          "EVALUATION_SCOPE_MODEL".
                        "inverted": bool,  # Optional. If
                          true, the metric is inverted, meaning that a lower value is
                          better.
                        "is_metric_goal": bool,  # Optional.
                          Evaluations.
                        "metric_name": "str",  # Optional.
                          Evaluations.
                        "metric_rank": 0,  # Optional.
                          Evaluations.
                        "metric_type":
                          "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                          "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
                          "METRIC_TYPE_MODEL_SAFETY".
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "metric_value_type":
                          "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value
                          is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                          "METRIC_VALUE_TYPE_STRING", and
                          "METRIC_VALUE_TYPE_PERCENTAGE".
                        "range_max": 0.0,  # Optional. The
                          maximum value for the metric.
                        "range_min": 0.0  # Optional. The
                          minimum value for the metric.
                    }
                ],
                "name": "str",  # Optional. Evaluations.
                "star_metric": {
                    "metric_uuid": "str",  # Optional.
                      Evaluations.
                    "name": "str",  # Optional. Evaluations.
                    "success_threshold": 0.0,  # Optional. The
                      success threshold for the star metric. This is a value that the
                      metric must reach to be considered successful.
                    "success_threshold_pct": 0  # Optional. The
                      success threshold for the star metric. This is a percentage value
                      between 0 and 100.
                },
                "test_case_uuid": "str",  # Optional. Evaluations.
                "total_runs": 0,  # Optional. Evaluations.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "updated_by_user_email": "str",  # Optional.
                  Evaluations.
                "updated_by_user_id": "str",  # Optional.
                  Evaluations.
                "version": 0  # Optional. Evaluations.
            }
        ],
        "name": "str",  # Optional. Name of the workspace.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Update date.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
import_custom_model(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
import_custom_model(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Import Custom Model.

To import a custom model, send a POST request to /v2/gen-ai/custom_models/import.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "accept_terms_and_conditions": bool,  # Optional. Whether the caller accepts
      the terms and conditions for importing this model.
    "description": "str",  # Optional. Description of the model.
    "name": "str",  # Optional. Name for the imported model.
    "preferred_gpu_region": "str",  # Optional. Preferred GPU region for
      deployment.
    "source_ref": {
        "access_type": "ACCESS_TYPE_UNSPECIFIED",  # Optional. Default value
          is "ACCESS_TYPE_UNSPECIFIED". Access level required for the model repository.
          Known values are: "ACCESS_TYPE_UNSPECIFIED", "ACCESS_TYPE_PUBLIC",
          "ACCESS_TYPE_PRIVATE", and "ACCESS_TYPE_GATED".
        "bucket": "str",  # Optional. Spaces bucket name.
        "commit_sha": "str",  # Optional. Git commit SHA of the model
          version.
        "hf_token": "str",  # Optional. User-provided HuggingFace token for
          gated/private models (not persisted in source_ref).
        "prefix": "str",  # Optional. Object prefix path in the bucket.
        "region": "str",  # Optional. Spaces bucket region.
        "repo_id": "str"  # Optional. Huggingface repository identifier.
    },
    "source_type": "SOURCE_TYPE_UNSPECIFIED",  # Optional. Default value is
      "SOURCE_TYPE_UNSPECIFIED". Source from which the model was imported. Known values
      are: "SOURCE_TYPE_UNSPECIFIED", "SOURCE_TYPE_HUGGINGFACE",
      "SOURCE_TYPE_SPACES_BUCKET", "SOURCE_TYPE_SDK_UPLOAD", and
      "SOURCE_TYPE_FINE_TUNING".
    "tags": {
        "tags": [
            "str"  # Optional. List of tag strings.
        ]
    }
}

# response body for status code(s): 200
response == {
    "error": "str",  # Optional.
    "import_job": {
        "bytes_done": "str",  # Optional. Bytes imported so far.
        "bytes_total": "str",  # Optional. Total bytes to import.
        "completed_at": "2020-02-20 00:00:00",  # Optional. Timestamp when
          the import completed.
        "created_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          job was created.
        "error_message": "str",  # Optional. Error message if import failed.
        "error_step": "str",  # Optional. Step at which the error occurred.
        "files_done": 0,  # Optional. Number of files imported so far.
        "files_total": 0,  # Optional. Total number of files to import.
        "started_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          import started.
        "status": "str",  # Optional. Current status of the import job.
        "uuid": "str"  # Optional. Unique identifier for the import job.
    },
    "model": {
        "active_deployments": [
            {
                "created_at": "str",  # Optional. RFC 3339 timestamp
                  indicating when the dedicated inference deployment was created.
                "endpoints": {
                    "private_endpoint_fqdn": "str",  # Optional.
                      Private FQDN for the deployment.
                    "public_endpoint_fqdn": "str"  # Optional.
                      Public FQDN for the deployment.
                },
                "id": "str",  # Optional. Unique identifier (UUID) of
                  the dedicated inference deployment.
                "name": "str",  # Optional. Human-readable name of
                  the dedicated inference deployment.
                "region_slug": "str",  # Optional. Slug of the region
                  where the dedicated inference deployment is running (e.g. "atl1").
                "state": "str",  # Optional. Current lifecycle state
                  of the dedicated inference deployment (e.g. "ACTIVE",
                  "PROVISIONING").
                "updated_at": "str"  # Optional. RFC 3339 timestamp
                  indicating when the dedicated inference deployment was last updated.
            }
        ],
        "architecture": "str",  # Optional. Model architecture type
          (free-form string from config.json).
        "config_json": {},  # Optional. Raw config.json contents from the
          model repository.
        "context_length": 0,  # Optional. Maximum context length supported by
          the model.
        "cost_estimate_per_month": 0,  # Optional. Estimated monthly cost in
          dollars for hosting.
        "created_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          model was created.
        "description": "str",  # Optional. Description of the custom model.
        "file_count": 0,  # Optional. Number of files in the model.
        "input_modalities": [
            "str"  # Optional. Input modalities supported (e.g., text,
              image).
        ],
        "license": "str",  # Optional. License under which the model is
          distributed.
        "name": "str",  # Optional. Name of the custom model.
        "output_modalities": [
            "str"  # Optional. Output modalities supported (e.g., text,
              image).
        ],
        "parameters": "str",  # Optional. Number of parameters in the model.
        "source_ref": {
            "access_type": "ACCESS_TYPE_UNSPECIFIED",  # Optional.
              Default value is "ACCESS_TYPE_UNSPECIFIED". Access level required for the
              model repository. Known values are: "ACCESS_TYPE_UNSPECIFIED",
              "ACCESS_TYPE_PUBLIC", "ACCESS_TYPE_PRIVATE", and "ACCESS_TYPE_GATED".
            "bucket": "str",  # Optional. Spaces bucket name.
            "commit_sha": "str",  # Optional. Git commit SHA of the model
              version.
            "hf_token": "str",  # Optional. User-provided HuggingFace
              token for gated/private models (not persisted in source_ref).
            "prefix": "str",  # Optional. Object prefix path in the
              bucket.
            "region": "str",  # Optional. Spaces bucket region.
            "repo_id": "str"  # Optional. Huggingface repository
              identifier.
        },
        "source_type": "SOURCE_TYPE_UNSPECIFIED",  # Optional. Default value
          is "SOURCE_TYPE_UNSPECIFIED". Source from which the model was imported. Known
          values are: "SOURCE_TYPE_UNSPECIFIED", "SOURCE_TYPE_HUGGINGFACE",
          "SOURCE_TYPE_SPACES_BUCKET", "SOURCE_TYPE_SDK_UPLOAD", and
          "SOURCE_TYPE_FINE_TUNING".
        "status": "STATUS_UNSPECIFIED",  # Optional. Default value is
          "STATUS_UNSPECIFIED". Import and deployment status of the custom model. Known
          values are: "STATUS_UNSPECIFIED", "STATUS_IMPORTING", "STATUS_READY",
          "STATUS_FAILED", and "STATUS_DELETED".
        "storage_region": "str",  # Optional. Region of the Spaces bucket
          where model files are stored.
        "tags": {
            "tags": [
                "str"  # Optional. List of tag strings.
            ]
        },
        "team_id": "str",  # Optional. Team that owns the model.
        "total_size_bytes": "str",  # Optional. Total size of model files in
          bytes.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          model was last updated.
        "uuid": "str"  # Optional. Unique identifier for the custom model.
    },
    "validation_steps": [
        {
            "error": "str",  # Optional. Error message if validation
              failed.
            "name": "str",  # Optional. Name of the validation step.
            "passed": bool  # Optional. Whether the validation step
              passed.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_agent_api_keys(agent_uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Agent API Keys.

To list all agent API keys, send a GET request to /v2/gen-ai/agents/{agent_uuid}/api_keys.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_infos": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. Created by.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "name": "str",  # Optional. Name.
            "secret_key": "str",  # Optional. Api key infos.
            "uuid": "str"  # Optional. Uuid.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_agent_versions(uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Agent Versions.

To list all agent versions, send a GET request to /v2/gen-ai/agents/{uuid}/versions.

Parameters:
  • uuid (str) – Agent uuid. Required.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agent_versions": [
        {
            "agent_uuid": "str",  # Optional. Uuid of the agent this
              version belongs to.
            "attached_child_agents": [
                {
                    "agent_name": "str",  # Optional. Name of the
                      child agent.
                    "child_agent_uuid": "str",  # Optional. Child
                      agent unique identifier.
                    "if_case": "str",  # Optional. If case.
                    "is_deleted": bool,  # Optional. Child agent
                      is deleted.
                    "route_name": "str"  # Optional. Route name.
                }
            ],
            "attached_functions": [
                {
                    "description": "str",  # Optional.
                      Description of the function.
                    "faas_name": "str",  # Optional. FaaS name of
                      the function.
                    "faas_namespace": "str",  # Optional. FaaS
                      namespace of the function.
                    "is_deleted": bool,  # Optional. Whether the
                      function is deleted.
                    "name": "str"  # Optional. Name of the
                      function.
                }
            ],
            "attached_guardrails": [
                {
                    "is_deleted": bool,  # Optional. Whether the
                      guardrail is deleted.
                    "name": "str",  # Optional. Guardrail Name.
                    "priority": 0,  # Optional. Guardrail
                      Priority.
                    "uuid": "str"  # Optional. Guardrail UUID.
                }
            ],
            "attached_knowledgebases": [
                {
                    "is_deleted": bool,  # Optional. Deletet at
                      date / time.
                    "name": "str",  # Optional. Name of the
                      knowledge base.
                    "uuid": "str"  # Optional. Unique id of the
                      knowledge base.
                }
            ],
            "can_rollback": bool,  # Optional. Whether the version is
              able to be rolled back to.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by_email": "str",  # Optional. User who created this
              version.
            "currently_applied": bool,  # Optional. Whether this is the
              currently applied configuration.
            "description": "str",  # Optional. Description of the agent.
            "id": "str",  # Optional. Unique identifier.
            "instruction": "str",  # Optional. Instruction for the agent.
            "k": 0,  # Optional. K value for the agent's configuration.
            "max_tokens": 0,  # Optional. Max tokens setting for the
              agent.
            "model_name": "str",  # Optional. Name of model associated to
              the agent version.
            "name": "str",  # Optional. Name of the agent.
            "provide_citations": bool,  # Optional. Whether the agent
              should provide in-response citations.
            "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional.
              Default value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN:
              The retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
              retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval
              method is step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval
              method is sub queries   * RETRIEVAL_METHOD_NONE: The retrieval method is
              none. Known values are: "RETRIEVAL_METHOD_UNKNOWN",
              "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK",
              "RETRIEVAL_METHOD_SUB_QUERIES", and "RETRIEVAL_METHOD_NONE".
            "tags": [
                "str"  # Optional. Tags associated with the agent.
            ],
            "temperature": 0.0,  # Optional. Temperature setting for the
              agent.
            "top_p": 0.0,  # Optional. Top_p setting for the agent.
            "trigger_action": "str",  # Optional. Action triggering the
              configuration update.
            "version_hash": "str"  # Optional. Version hash.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_agents(*, only_deployed: Optional[bool] = None, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Agents.

To list all agents, send a GET request to /v2/gen-ai/agents.

Parameters:
  • only_deployed (bool) – Only list agents that are deployed. Default value is None.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agents": [
        {
            "chatbot": {
                "allowed_domains": [
                    "str"  # Optional. A Chatbot.
                ],
                "button_background_color": "str",  # Optional. A
                  Chatbot.
                "logo": "str",  # Optional. A Chatbot.
                "name": "str",  # Optional. Name of chatbot.
                "primary_color": "str",  # Optional. A Chatbot.
                "secondary_color": "str",  # Optional. A Chatbot.
                "starting_message": "str"  # Optional. A Chatbot.
            },
            "chatbot_identifiers": [
                {
                    "agent_chatbot_identifier": "str"  #
                      Optional. Agent chatbot identifier.
                }
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "deployment": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "name": "str",  # Optional. Name.
                "status": "STATUS_UNKNOWN",  # Optional. Default
                  value is "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
                  "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING",
                  "STATUS_RUNNING", "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT",
                  "STATUS_UNDEPLOYING", "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED",
                  and "STATUS_BUILDING".
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your deployed agent
                  here.
                "uuid": "str",  # Optional. Unique id.
                "visibility": "VISIBILITY_UNKNOWN"  # Optional.
                  Default value is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The
                  status of the deployment is unknown    * VISIBILITY_DISABLED: The
                  deployment is disabled and will no longer service requests   *
                  VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state   *
                  VISIBILITY_PUBLIC: The deployment is public and will service requests
                  from the public internet   * VISIBILITY_PRIVATE: The deployment is
                  private and will only service requests from other agents, or through
                  API keys. Known values are: "VISIBILITY_UNKNOWN",
                  "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC",
                  and "VISIBILITY_PRIVATE".
            },
            "description": "str",  # Optional. Description of agent.
            "if_case": "str",  # Optional. Instructions to the agent on
              how to use the route.
            "instruction": "str",  # Optional. Agent instruction.
              Instructions help your agent to perform its job effectively. See `Write
              Effective Agent Instructions
              <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
              for best practices.
            "k": 0,  # Optional. How many results should be considered
              from an attached knowledge base.
            "max_tokens": 0,  # Optional. Specifies the maximum number of
              tokens the model can process in a single input or output, set as a number
              between 1 and 512. This determines the length of each response.
            "mcp_servers": [
                {
                    "allowed_tools": [
                        "str"  # Optional. Optional list of
                          allowed tool names to expose from this server.
                    ],
                    "authorization": "str",  # Optional. Optional
                      authorization header value for the MCP server.
                    "headers": {
                        "str": "str"  # Optional. Optional
                          additional headers to send to the MCP server.
                    },
                    "server_label": "str",  # Optional. A label
                      identifying this MCP server.
                    "server_url": "str"  # Optional. The URL of
                      the MCP server.
                }
            ],
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "model_router": {
                "config": {
                    "fallback_models": [
                        "str"  # Optional. Router-level
                          fallback models.
                    ],
                    "policies": [
                        {
                            "custom_task": {
                                "description": "str",
                                  # Optional. Short task description.
                                "name": "str"  #
                                  Optional. Task name.
                            },
                            "models": [
                                "str"  # Optional.
                                  Models assigned to the task.
                            ],
                            "selection_policy": {
                                "prefer": "str"  #
                                  Optional. One of: none, cheapest, fastest.
                            },
                            "task_slug": "str"  #
                              Optional. Task slug.
                        }
                    ]
                },
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "description": "str",  # Optional. Description.
                "name": "str",  # Optional. Name of the model router.
                "regions": [
                    "str"  # Optional. Target regions for the
                      router.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "uuid": "str"  # Optional. Unique id.
            },
            "name": "str",  # Optional. Agent name.
            "project_id": "str",  # Optional. The DigitalOcean project ID
              associated with the agent.
            "provide_citations": bool,  # Optional. Whether the agent
              should provide in-response citations.
            "reasoning_effort": "str",  # Optional. The reasoning effort
              for the agent.
            "region": "str",  # Optional. Region code.
            "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional.
              Default value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN:
              The retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
              retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval
              method is step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval
              method is sub queries   * RETRIEVAL_METHOD_NONE: The retrieval method is
              none. Known values are: "RETRIEVAL_METHOD_UNKNOWN",
              "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK",
              "RETRIEVAL_METHOD_SUB_QUERIES", and "RETRIEVAL_METHOD_NONE".
            "route_created_at": "2020-02-20 00:00:00",  # Optional.
              Creation of route date / time.
            "route_created_by": "str",  # Optional. Id of user that
              created the route.
            "route_name": "str",  # Optional. Route name.
            "route_uuid": "str",  # Optional. Route uuid.
            "tags": [
                "str"  # Optional. A set of abitrary tags to organize
                  your agent.
            ],
            "temperature": 0.0,  # Optional. Controls the model"u2019s
              creativity, specified as a number between 0 and 1. Lower values produce
              more predictable and conservative responses, while higher values
              encourage creativity and variation.
            "template": {
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's creation date.
                "description": "str",  # Optional. Deprecated - Use
                  summary instead.
                "guardrails": [
                    {
                        "priority": 0,  # Optional. Priority
                          of the guardrail.
                        "uuid": "str"  # Optional. Uuid of
                          the guardrail.
                    }
                ],
                "instruction": "str",  # Optional. Instructions for
                  the agent template.
                "k": 0,  # Optional. The 'k' value for the agent
                  template.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "embedding_model_uuid": "str",  #
                          Optional. List of knowledge bases associated with the agent
                          template.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "long_description": "str",  # Optional. The long
                  description of the agent template.
                "max_tokens": 0,  # Optional. The max_tokens setting
                  for the agent template.
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "name": "str",  # Optional. Name of the agent
                  template.
                "short_description": "str",  # Optional. The short
                  description of the agent template.
                "summary": "str",  # Optional. The summary of the
                  agent template.
                "tags": [
                    "str"  # Optional. List of tags associated
                      with the agent template.
                ],
                "temperature": 0.0,  # Optional. The temperature
                  setting for the agent template.
                "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  #
                  Optional. Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
                  AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
                  AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known
                  values are: "AGENT_TEMPLATE_TYPE_STANDARD" and
                  "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                "top_p": 0.0,  # Optional. The top_p setting for the
                  agent template.
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's last updated date.
                "uuid": "str"  # Optional. Unique id.
            },
            "thinking_token_budget": 0,  # Optional. The thinking token
              budget for Anthropic extended thinking (0 = disabled).
            "top_p": 0.0,  # Optional. Defines the cumulative probability
              threshold for word selection, specified as a number between 0 and 1.
              Higher values allow for more diverse outputs, while lower values ensure
              focused and coherent responses.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your agent under this url.
            "user_id": "str",  # Optional. Id of user that created the
              agent.
            "uuid": "str",  # Optional. Unique agent id.
            "version_hash": "str"  # Optional. The latest version of the
              agent.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_agents_by_anthropic_key(uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List agents by Anthropic key.

List Agents by Anthropic Key.

Parameters:
  • uuid (str) – Unique ID of Anthropic key. Required.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agents": [
        {
            "anthropic_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "api_key_infos": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date.
                    "created_by": "str",  # Optional. Created by.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Deleted date.
                    "name": "str",  # Optional. Name.
                    "secret_key": "str",  # Optional. Api key
                      infos.
                    "uuid": "str"  # Optional. Uuid.
                }
            ],
            "api_keys": [
                {
                    "api_key": "str"  # Optional. Api key.
                }
            ],
            "chatbot": {
                "allowed_domains": [
                    "str"  # Optional. A Chatbot.
                ],
                "button_background_color": "str",  # Optional. A
                  Chatbot.
                "logo": "str",  # Optional. A Chatbot.
                "name": "str",  # Optional. Name of chatbot.
                "primary_color": "str",  # Optional. A Chatbot.
                "secondary_color": "str",  # Optional. A Chatbot.
                "starting_message": "str"  # Optional. A Chatbot.
            },
            "chatbot_identifiers": [
                {
                    "agent_chatbot_identifier": "str"  #
                      Optional. Agent chatbot identifier.
                }
            ],
            "child_agents": [
                ...
            ],
            "conversation_logs_enabled": bool,  # Optional. Whether
              conversation logs are enabled for the agent.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "deployment": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "name": "str",  # Optional. Name.
                "status": "STATUS_UNKNOWN",  # Optional. Default
                  value is "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
                  "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING",
                  "STATUS_RUNNING", "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT",
                  "STATUS_UNDEPLOYING", "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED",
                  and "STATUS_BUILDING".
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your deployed agent
                  here.
                "uuid": "str",  # Optional. Unique id.
                "visibility": "VISIBILITY_UNKNOWN"  # Optional.
                  Default value is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The
                  status of the deployment is unknown    * VISIBILITY_DISABLED: The
                  deployment is disabled and will no longer service requests   *
                  VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state   *
                  VISIBILITY_PUBLIC: The deployment is public and will service requests
                  from the public internet   * VISIBILITY_PRIVATE: The deployment is
                  private and will only service requests from other agents, or through
                  API keys. Known values are: "VISIBILITY_UNKNOWN",
                  "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC",
                  and "VISIBILITY_PRIVATE".
            },
            "description": "str",  # Optional. Description of agent.
            "functions": [
                {
                    "api_key": "str",  # Optional. Api key.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "description": "str",  # Optional. Agent
                      description.
                    "faas_name": "str",  # Optional.
                    "faas_namespace": "str",  # Optional.
                    "input_schema": {},  # Optional. Any object.
                    "name": "str",  # Optional. Name.
                    "output_schema": {},  # Optional. Any object.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Download your
                      agent here.
                    "uuid": "str"  # Optional. Unique id.
                }
            ],
            "guardrails": [
                {
                    "agent_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "default_response": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "description": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "guardrail_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "is_attached": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "is_default": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "metadata": {},  # Optional. Any object.
                    "name": "str",  # Optional. The guardrails
                      the agent is attached to.
                    "priority": 0,  # Optional. The guardrails
                      the agent is attached to.
                    "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                      Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values
                      are: "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                      "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                      "GUARDRAIL_TYPE_CONTENT_MODERATION".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "uuid": "str"  # Optional. The guardrails the
                      agent is attached to.
                }
            ],
            "if_case": "str",  # Optional.
            "instruction": "str",  # Optional. Agent instruction.
              Instructions help your agent to perform its job effectively. See `Write
              Effective Agent Instructions
              <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
              for best practices.
            "k": 0,  # Optional.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. Knowledge
                      bases.
                    "embedding_model_uuid": "str",  # Optional.
                      Knowledge bases.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. Knowledge
                      bases.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "logging_config": {
                "galileo_project_id": "str",  # Optional. Galileo
                  project identifier.
                "galileo_project_name": "str",  # Optional. Name of
                  the Galileo project.
                "insights_enabled": bool,  # Optional. Whether
                  insights are enabled.
                "insights_enabled_at": "2020-02-20 00:00:00",  #
                  Optional. Timestamp when insights were enabled.
                "log_stream_id": "str",  # Optional. Identifier for
                  the log stream.
                "log_stream_name": "str"  # Optional. Name of the log
                  stream.
            },
            "max_tokens": 0,  # Optional.
            "mcp_servers": [
                {
                    "allowed_tools": [
                        "str"  # Optional. Optional list of
                          allowed tool names to expose from this server.
                    ],
                    "authorization": "str",  # Optional. Optional
                      authorization header value for the MCP server.
                    "headers": {
                        "str": "str"  # Optional. Optional
                          additional headers to send to the MCP server.
                    },
                    "server_label": "str",  # Optional. A label
                      identifying this MCP server.
                    "server_url": "str"  # Optional. The URL of
                      the MCP server.
                }
            ],
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "model_provider_key": {
                "api_key_uuid": "str",  # Optional. API key ID.
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name of the key.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "updated_at": "2020-02-20 00:00:00"  # Optional. Key
                  last updated date.
            },
            "model_router": {
                "config": {
                    "fallback_models": [
                        "str"  # Optional. Router-level
                          fallback models.
                    ],
                    "policies": [
                        {
                            "custom_task": {
                                "description": "str",
                                  # Optional. Short task description.
                                "name": "str"  #
                                  Optional. Task name.
                            },
                            "models": [
                                "str"  # Optional.
                                  Models assigned to the task.
                            ],
                            "selection_policy": {
                                "prefer": "str"  #
                                  Optional. One of: none, cheapest, fastest.
                            },
                            "task_slug": "str"  #
                              Optional. Task slug.
                        }
                    ]
                },
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "description": "str",  # Optional. Description.
                "name": "str",  # Optional. Name of the model router.
                "regions": [
                    "str"  # Optional. Target regions for the
                      router.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "uuid": "str"  # Optional. Unique id.
            },
            "name": "str",  # Optional. Agent name.
            "openai_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "parent_agents": [
                ...
            ],
            "project_id": "str",  # Optional.
            "provide_citations": bool,  # Optional. Whether the agent
              should provide in-response citations.
            "reasoning_effort": "str",  # Optional. The reasoning effort
              for the agent.
            "region": "str",  # Optional. Region code.
            "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional.
              Default value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN:
              The retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
              retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval
              method is step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval
              method is sub queries   * RETRIEVAL_METHOD_NONE: The retrieval method is
              none. Known values are: "RETRIEVAL_METHOD_UNKNOWN",
              "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK",
              "RETRIEVAL_METHOD_SUB_QUERIES", and "RETRIEVAL_METHOD_NONE".
            "route_created_at": "2020-02-20 00:00:00",  # Optional.
              Creation of route date / time.
            "route_created_by": "str",  # Optional.
            "route_name": "str",  # Optional. Route name.
            "route_uuid": "str",  # Optional.
            "tags": [
                "str"  # Optional. Agent tag to organize related
                  resources.
            ],
            "temperature": 0.0,  # Optional.
            "template": {
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's creation date.
                "description": "str",  # Optional. Deprecated - Use
                  summary instead.
                "guardrails": [
                    {
                        "priority": 0,  # Optional. Priority
                          of the guardrail.
                        "uuid": "str"  # Optional. Uuid of
                          the guardrail.
                    }
                ],
                "instruction": "str",  # Optional. Instructions for
                  the agent template.
                "k": 0,  # Optional. The 'k' value for the agent
                  template.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "embedding_model_uuid": "str",  #
                          Optional. List of knowledge bases associated with the agent
                          template.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "long_description": "str",  # Optional. The long
                  description of the agent template.
                "max_tokens": 0,  # Optional. The max_tokens setting
                  for the agent template.
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "name": "str",  # Optional. Name of the agent
                  template.
                "short_description": "str",  # Optional. The short
                  description of the agent template.
                "summary": "str",  # Optional. The summary of the
                  agent template.
                "tags": [
                    "str"  # Optional. List of tags associated
                      with the agent template.
                ],
                "temperature": 0.0,  # Optional. The temperature
                  setting for the agent template.
                "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  #
                  Optional. Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
                  AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
                  AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known
                  values are: "AGENT_TEMPLATE_TYPE_STANDARD" and
                  "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                "top_p": 0.0,  # Optional. The top_p setting for the
                  agent template.
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's last updated date.
                "uuid": "str"  # Optional. Unique id.
            },
            "thinking_token_budget": 0,  # Optional. The thinking token
              budget for Anthropic extended thinking (0 = disabled).
            "top_p": 0.0,  # Optional.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your agent under this url.
            "user_id": "str",  # Optional. Id of user that created the
              agent.
            "uuid": "str",  # Optional. Unique agent id.
            "version_hash": "str",  # Optional. The latest version of the
              agent.
            "vpc_egress_ips": [
                "str"  # Optional. VPC Egress IPs.
            ],
            "vpc_uuid": "str",  # Optional.
            "workspace": {
                "agents": [
                    ...
                ],
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. The id of user who
                  created this workspace.
                "created_by_email": "str",  # Optional. The email of
                  the user who created this workspace.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "description": "str",  # Optional. Description of the
                  workspace.
                "evaluation_test_cases": [
                    {
                        "archived_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_by_user_email": "str",  #
                          Optional. Evaluations.
                        "created_by_user_id": "str",  #
                          Optional. Evaluations.
                        "dataset": {
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Time created at.
                            "dataset_name": "str",  #
                              Optional. Name of the dataset.
                            "dataset_type":
                              "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default
                              value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values
                              are: "EVALUATION_DATASET_TYPE_UNKNOWN",
                              "EVALUATION_DATASET_TYPE_ADK",
                              "EVALUATION_DATASET_TYPE_NON_ADK", and
                              "EVALUATION_DATASET_TYPE_MODEL".
                            "dataset_uuid": "str",  #
                              Optional. UUID of the dataset.
                            "file_size": "str",  #
                              Optional. The size of the dataset uploaded file in bytes.
                            "has_ground_truth": bool,  #
                              Optional. Does the dataset have a ground truth column?.
                            "row_count": 0  # Optional.
                              Number of rows in the dataset.
                        },
                        "dataset_name": "str",  # Optional.
                          Evaluations.
                        "dataset_uuid": "str",  # Optional.
                          Evaluations.
                        "description": "str",  # Optional.
                          Evaluations.
                        "latest_version_number_of_runs": 0,
                          # Optional. Evaluations.
                        "metrics": [
                            {
                                "category":
                                  "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_CATEGORY_UNSPECIFIED". Known values
                                  are: "METRIC_CATEGORY_UNSPECIFIED",
                                  "METRIC_CATEGORY_CORRECTNESS",
                                  "METRIC_CATEGORY_USER_OUTCOMES",
                                  "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                                  "METRIC_CATEGORY_CONTEXT_QUALITY", and
                                  "METRIC_CATEGORY_MODEL_FIT".
                                "description": "str",
                                  # Optional. Evaluations.
                                "evaluation_scope":
                                  "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                                  value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                                  determines whether a metric belongs to agent
                                  evaluation or model evaluation. For backwards
                                  compatibility, UNSPECIFIED defaults to agent metrics
                                  only in list operations. Known values are:
                                  "EVALUATION_SCOPE_UNSPECIFIED",
                                  "EVALUATION_SCOPE_AGENT", and
                                  "EVALUATION_SCOPE_MODEL".
                                "inverted": bool,  #
                                  Optional. If true, the metric is inverted, meaning
                                  that a lower value is better.
                                "is_metric_goal":
                                  bool,  # Optional. Evaluations.
                                "metric_name": "str",
                                  # Optional. Evaluations.
                                "metric_rank": 0,  #
                                  Optional. Evaluations.
                                "metric_type":
                                  "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value
                                  is "METRIC_TYPE_UNSPECIFIED". Known values are:
                                  "METRIC_TYPE_UNSPECIFIED",
                                  "METRIC_TYPE_GENERAL_QUALITY",
                                  "METRIC_TYPE_RAG_AND_TOOL",
                                  "METRIC_TYPE_MODEL_QUALITY", and
                                  "METRIC_TYPE_MODEL_SAFETY".
                                "metric_uuid": "str",
                                  # Optional. Evaluations.
                                "metric_value_type":
                                  "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                                  "METRIC_VALUE_TYPE_NUMBER",
                                  "METRIC_VALUE_TYPE_STRING", and
                                  "METRIC_VALUE_TYPE_PERCENTAGE".
                                "range_max": 0.0,  #
                                  Optional. The maximum value for the metric.
                                "range_min": 0.0  #
                                  Optional. The minimum value for the metric.
                            }
                        ],
                        "name": "str",  # Optional.
                          Evaluations.
                        "star_metric": {
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "name": "str",  # Optional.
                              Evaluations.
                            "success_threshold": 0.0,  #
                              Optional. The success threshold for the star metric. This
                              is a value that the metric must reach to be considered
                              successful.
                            "success_threshold_pct": 0  #
                              Optional. The success threshold for the star metric. This
                              is a percentage value between 0 and 100.
                        },
                        "test_case_uuid": "str",  # Optional.
                          Evaluations.
                        "total_runs": 0,  # Optional.
                          Evaluations.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "updated_by_user_email": "str",  #
                          Optional. Evaluations.
                        "updated_by_user_id": "str",  #
                          Optional. Evaluations.
                        "version": 0  # Optional.
                          Evaluations.
                    }
                ],
                "name": "str",  # Optional. Name of the workspace.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Update date.
                "uuid": "str"  # Optional. Unique id.
            }
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_agents_by_openai_key(uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List agents by OpenAI key.

List Agents by OpenAI Key.

Parameters:
  • uuid (str) – Unique ID of OpenAI key. Required.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agents": [
        {
            "anthropic_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "api_key_infos": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date.
                    "created_by": "str",  # Optional. Created by.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Deleted date.
                    "name": "str",  # Optional. Name.
                    "secret_key": "str",  # Optional. Api key
                      infos.
                    "uuid": "str"  # Optional. Uuid.
                }
            ],
            "api_keys": [
                {
                    "api_key": "str"  # Optional. Api key.
                }
            ],
            "chatbot": {
                "allowed_domains": [
                    "str"  # Optional. A Chatbot.
                ],
                "button_background_color": "str",  # Optional. A
                  Chatbot.
                "logo": "str",  # Optional. A Chatbot.
                "name": "str",  # Optional. Name of chatbot.
                "primary_color": "str",  # Optional. A Chatbot.
                "secondary_color": "str",  # Optional. A Chatbot.
                "starting_message": "str"  # Optional. A Chatbot.
            },
            "chatbot_identifiers": [
                {
                    "agent_chatbot_identifier": "str"  #
                      Optional. Agent chatbot identifier.
                }
            ],
            "child_agents": [
                ...
            ],
            "conversation_logs_enabled": bool,  # Optional. Whether
              conversation logs are enabled for the agent.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "deployment": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "name": "str",  # Optional. Name.
                "status": "STATUS_UNKNOWN",  # Optional. Default
                  value is "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
                  "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING",
                  "STATUS_RUNNING", "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT",
                  "STATUS_UNDEPLOYING", "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED",
                  and "STATUS_BUILDING".
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your deployed agent
                  here.
                "uuid": "str",  # Optional. Unique id.
                "visibility": "VISIBILITY_UNKNOWN"  # Optional.
                  Default value is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The
                  status of the deployment is unknown    * VISIBILITY_DISABLED: The
                  deployment is disabled and will no longer service requests   *
                  VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state   *
                  VISIBILITY_PUBLIC: The deployment is public and will service requests
                  from the public internet   * VISIBILITY_PRIVATE: The deployment is
                  private and will only service requests from other agents, or through
                  API keys. Known values are: "VISIBILITY_UNKNOWN",
                  "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC",
                  and "VISIBILITY_PRIVATE".
            },
            "description": "str",  # Optional. Description of agent.
            "functions": [
                {
                    "api_key": "str",  # Optional. Api key.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "description": "str",  # Optional. Agent
                      description.
                    "faas_name": "str",  # Optional.
                    "faas_namespace": "str",  # Optional.
                    "input_schema": {},  # Optional. Any object.
                    "name": "str",  # Optional. Name.
                    "output_schema": {},  # Optional. Any object.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Download your
                      agent here.
                    "uuid": "str"  # Optional. Unique id.
                }
            ],
            "guardrails": [
                {
                    "agent_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "default_response": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "description": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "guardrail_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "is_attached": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "is_default": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "metadata": {},  # Optional. Any object.
                    "name": "str",  # Optional. The guardrails
                      the agent is attached to.
                    "priority": 0,  # Optional. The guardrails
                      the agent is attached to.
                    "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                      Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values
                      are: "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                      "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                      "GUARDRAIL_TYPE_CONTENT_MODERATION".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "uuid": "str"  # Optional. The guardrails the
                      agent is attached to.
                }
            ],
            "if_case": "str",  # Optional.
            "instruction": "str",  # Optional. Agent instruction.
              Instructions help your agent to perform its job effectively. See `Write
              Effective Agent Instructions
              <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
              for best practices.
            "k": 0,  # Optional.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. Knowledge
                      bases.
                    "embedding_model_uuid": "str",  # Optional.
                      Knowledge bases.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. Knowledge
                      bases.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "logging_config": {
                "galileo_project_id": "str",  # Optional. Galileo
                  project identifier.
                "galileo_project_name": "str",  # Optional. Name of
                  the Galileo project.
                "insights_enabled": bool,  # Optional. Whether
                  insights are enabled.
                "insights_enabled_at": "2020-02-20 00:00:00",  #
                  Optional. Timestamp when insights were enabled.
                "log_stream_id": "str",  # Optional. Identifier for
                  the log stream.
                "log_stream_name": "str"  # Optional. Name of the log
                  stream.
            },
            "max_tokens": 0,  # Optional.
            "mcp_servers": [
                {
                    "allowed_tools": [
                        "str"  # Optional. Optional list of
                          allowed tool names to expose from this server.
                    ],
                    "authorization": "str",  # Optional. Optional
                      authorization header value for the MCP server.
                    "headers": {
                        "str": "str"  # Optional. Optional
                          additional headers to send to the MCP server.
                    },
                    "server_label": "str",  # Optional. A label
                      identifying this MCP server.
                    "server_url": "str"  # Optional. The URL of
                      the MCP server.
                }
            ],
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "model_provider_key": {
                "api_key_uuid": "str",  # Optional. API key ID.
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name of the key.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "updated_at": "2020-02-20 00:00:00"  # Optional. Key
                  last updated date.
            },
            "model_router": {
                "config": {
                    "fallback_models": [
                        "str"  # Optional. Router-level
                          fallback models.
                    ],
                    "policies": [
                        {
                            "custom_task": {
                                "description": "str",
                                  # Optional. Short task description.
                                "name": "str"  #
                                  Optional. Task name.
                            },
                            "models": [
                                "str"  # Optional.
                                  Models assigned to the task.
                            ],
                            "selection_policy": {
                                "prefer": "str"  #
                                  Optional. One of: none, cheapest, fastest.
                            },
                            "task_slug": "str"  #
                              Optional. Task slug.
                        }
                    ]
                },
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "description": "str",  # Optional. Description.
                "name": "str",  # Optional. Name of the model router.
                "regions": [
                    "str"  # Optional. Target regions for the
                      router.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "uuid": "str"  # Optional. Unique id.
            },
            "name": "str",  # Optional. Agent name.
            "openai_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "parent_agents": [
                ...
            ],
            "project_id": "str",  # Optional.
            "provide_citations": bool,  # Optional. Whether the agent
              should provide in-response citations.
            "reasoning_effort": "str",  # Optional. The reasoning effort
              for the agent.
            "region": "str",  # Optional. Region code.
            "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional.
              Default value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN:
              The retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
              retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval
              method is step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval
              method is sub queries   * RETRIEVAL_METHOD_NONE: The retrieval method is
              none. Known values are: "RETRIEVAL_METHOD_UNKNOWN",
              "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK",
              "RETRIEVAL_METHOD_SUB_QUERIES", and "RETRIEVAL_METHOD_NONE".
            "route_created_at": "2020-02-20 00:00:00",  # Optional.
              Creation of route date / time.
            "route_created_by": "str",  # Optional.
            "route_name": "str",  # Optional. Route name.
            "route_uuid": "str",  # Optional.
            "tags": [
                "str"  # Optional. Agent tag to organize related
                  resources.
            ],
            "temperature": 0.0,  # Optional.
            "template": {
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's creation date.
                "description": "str",  # Optional. Deprecated - Use
                  summary instead.
                "guardrails": [
                    {
                        "priority": 0,  # Optional. Priority
                          of the guardrail.
                        "uuid": "str"  # Optional. Uuid of
                          the guardrail.
                    }
                ],
                "instruction": "str",  # Optional. Instructions for
                  the agent template.
                "k": 0,  # Optional. The 'k' value for the agent
                  template.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "embedding_model_uuid": "str",  #
                          Optional. List of knowledge bases associated with the agent
                          template.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "long_description": "str",  # Optional. The long
                  description of the agent template.
                "max_tokens": 0,  # Optional. The max_tokens setting
                  for the agent template.
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "name": "str",  # Optional. Name of the agent
                  template.
                "short_description": "str",  # Optional. The short
                  description of the agent template.
                "summary": "str",  # Optional. The summary of the
                  agent template.
                "tags": [
                    "str"  # Optional. List of tags associated
                      with the agent template.
                ],
                "temperature": 0.0,  # Optional. The temperature
                  setting for the agent template.
                "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  #
                  Optional. Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
                  AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
                  AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known
                  values are: "AGENT_TEMPLATE_TYPE_STANDARD" and
                  "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                "top_p": 0.0,  # Optional. The top_p setting for the
                  agent template.
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's last updated date.
                "uuid": "str"  # Optional. Unique id.
            },
            "thinking_token_budget": 0,  # Optional. The thinking token
              budget for Anthropic extended thinking (0 = disabled).
            "top_p": 0.0,  # Optional.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your agent under this url.
            "user_id": "str",  # Optional. Id of user that created the
              agent.
            "uuid": "str",  # Optional. Unique agent id.
            "version_hash": "str",  # Optional. The latest version of the
              agent.
            "vpc_egress_ips": [
                "str"  # Optional. VPC Egress IPs.
            ],
            "vpc_uuid": "str",  # Optional.
            "workspace": {
                "agents": [
                    ...
                ],
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. The id of user who
                  created this workspace.
                "created_by_email": "str",  # Optional. The email of
                  the user who created this workspace.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "description": "str",  # Optional. Description of the
                  workspace.
                "evaluation_test_cases": [
                    {
                        "archived_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_by_user_email": "str",  #
                          Optional. Evaluations.
                        "created_by_user_id": "str",  #
                          Optional. Evaluations.
                        "dataset": {
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Time created at.
                            "dataset_name": "str",  #
                              Optional. Name of the dataset.
                            "dataset_type":
                              "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default
                              value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values
                              are: "EVALUATION_DATASET_TYPE_UNKNOWN",
                              "EVALUATION_DATASET_TYPE_ADK",
                              "EVALUATION_DATASET_TYPE_NON_ADK", and
                              "EVALUATION_DATASET_TYPE_MODEL".
                            "dataset_uuid": "str",  #
                              Optional. UUID of the dataset.
                            "file_size": "str",  #
                              Optional. The size of the dataset uploaded file in bytes.
                            "has_ground_truth": bool,  #
                              Optional. Does the dataset have a ground truth column?.
                            "row_count": 0  # Optional.
                              Number of rows in the dataset.
                        },
                        "dataset_name": "str",  # Optional.
                          Evaluations.
                        "dataset_uuid": "str",  # Optional.
                          Evaluations.
                        "description": "str",  # Optional.
                          Evaluations.
                        "latest_version_number_of_runs": 0,
                          # Optional. Evaluations.
                        "metrics": [
                            {
                                "category":
                                  "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_CATEGORY_UNSPECIFIED". Known values
                                  are: "METRIC_CATEGORY_UNSPECIFIED",
                                  "METRIC_CATEGORY_CORRECTNESS",
                                  "METRIC_CATEGORY_USER_OUTCOMES",
                                  "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                                  "METRIC_CATEGORY_CONTEXT_QUALITY", and
                                  "METRIC_CATEGORY_MODEL_FIT".
                                "description": "str",
                                  # Optional. Evaluations.
                                "evaluation_scope":
                                  "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                                  value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                                  determines whether a metric belongs to agent
                                  evaluation or model evaluation. For backwards
                                  compatibility, UNSPECIFIED defaults to agent metrics
                                  only in list operations. Known values are:
                                  "EVALUATION_SCOPE_UNSPECIFIED",
                                  "EVALUATION_SCOPE_AGENT", and
                                  "EVALUATION_SCOPE_MODEL".
                                "inverted": bool,  #
                                  Optional. If true, the metric is inverted, meaning
                                  that a lower value is better.
                                "is_metric_goal":
                                  bool,  # Optional. Evaluations.
                                "metric_name": "str",
                                  # Optional. Evaluations.
                                "metric_rank": 0,  #
                                  Optional. Evaluations.
                                "metric_type":
                                  "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value
                                  is "METRIC_TYPE_UNSPECIFIED". Known values are:
                                  "METRIC_TYPE_UNSPECIFIED",
                                  "METRIC_TYPE_GENERAL_QUALITY",
                                  "METRIC_TYPE_RAG_AND_TOOL",
                                  "METRIC_TYPE_MODEL_QUALITY", and
                                  "METRIC_TYPE_MODEL_SAFETY".
                                "metric_uuid": "str",
                                  # Optional. Evaluations.
                                "metric_value_type":
                                  "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                                  "METRIC_VALUE_TYPE_NUMBER",
                                  "METRIC_VALUE_TYPE_STRING", and
                                  "METRIC_VALUE_TYPE_PERCENTAGE".
                                "range_max": 0.0,  #
                                  Optional. The maximum value for the metric.
                                "range_min": 0.0  #
                                  Optional. The minimum value for the metric.
                            }
                        ],
                        "name": "str",  # Optional.
                          Evaluations.
                        "star_metric": {
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "name": "str",  # Optional.
                              Evaluations.
                            "success_threshold": 0.0,  #
                              Optional. The success threshold for the star metric. This
                              is a value that the metric must reach to be considered
                              successful.
                            "success_threshold_pct": 0  #
                              Optional. The success threshold for the star metric. This
                              is a percentage value between 0 and 100.
                        },
                        "test_case_uuid": "str",  # Optional.
                          Evaluations.
                        "total_runs": 0,  # Optional.
                          Evaluations.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "updated_by_user_email": "str",  #
                          Optional. Evaluations.
                        "updated_by_user_id": "str",  #
                          Optional. Evaluations.
                        "version": 0  # Optional.
                          Evaluations.
                    }
                ],
                "name": "str",  # Optional. Name of the workspace.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Update date.
                "uuid": "str"  # Optional. Unique id.
            }
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_agents_by_workspace(workspace_uuid: str, *, only_deployed: Optional[bool] = None, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List agents by Workspace.

To list all agents by a Workspace, send a GET request to /v2/gen-ai/workspaces/{workspace_uuid}/agents.

Parameters:
  • workspace_uuid (str) – Workspace UUID. Required.

  • only_deployed (bool) – Only list agents that are deployed. Default value is None.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "agents": [
        {
            "anthropic_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "api_key_infos": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date.
                    "created_by": "str",  # Optional. Created by.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Deleted date.
                    "name": "str",  # Optional. Name.
                    "secret_key": "str",  # Optional. Api key
                      infos.
                    "uuid": "str"  # Optional. Uuid.
                }
            ],
            "api_keys": [
                {
                    "api_key": "str"  # Optional. Api key.
                }
            ],
            "chatbot": {
                "allowed_domains": [
                    "str"  # Optional. A Chatbot.
                ],
                "button_background_color": "str",  # Optional. A
                  Chatbot.
                "logo": "str",  # Optional. A Chatbot.
                "name": "str",  # Optional. Name of chatbot.
                "primary_color": "str",  # Optional. A Chatbot.
                "secondary_color": "str",  # Optional. A Chatbot.
                "starting_message": "str"  # Optional. A Chatbot.
            },
            "chatbot_identifiers": [
                {
                    "agent_chatbot_identifier": "str"  #
                      Optional. Agent chatbot identifier.
                }
            ],
            "child_agents": [
                ...
            ],
            "conversation_logs_enabled": bool,  # Optional. Whether
              conversation logs are enabled for the agent.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "deployment": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "name": "str",  # Optional. Name.
                "status": "STATUS_UNKNOWN",  # Optional. Default
                  value is "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
                  "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING",
                  "STATUS_RUNNING", "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT",
                  "STATUS_UNDEPLOYING", "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED",
                  and "STATUS_BUILDING".
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your deployed agent
                  here.
                "uuid": "str",  # Optional. Unique id.
                "visibility": "VISIBILITY_UNKNOWN"  # Optional.
                  Default value is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The
                  status of the deployment is unknown    * VISIBILITY_DISABLED: The
                  deployment is disabled and will no longer service requests   *
                  VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state   *
                  VISIBILITY_PUBLIC: The deployment is public and will service requests
                  from the public internet   * VISIBILITY_PRIVATE: The deployment is
                  private and will only service requests from other agents, or through
                  API keys. Known values are: "VISIBILITY_UNKNOWN",
                  "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC",
                  and "VISIBILITY_PRIVATE".
            },
            "description": "str",  # Optional. Description of agent.
            "functions": [
                {
                    "api_key": "str",  # Optional. Api key.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "description": "str",  # Optional. Agent
                      description.
                    "faas_name": "str",  # Optional.
                    "faas_namespace": "str",  # Optional.
                    "input_schema": {},  # Optional. Any object.
                    "name": "str",  # Optional. Name.
                    "output_schema": {},  # Optional. Any object.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Download your
                      agent here.
                    "uuid": "str"  # Optional. Unique id.
                }
            ],
            "guardrails": [
                {
                    "agent_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "default_response": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "description": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "guardrail_uuid": "str",  # Optional. The
                      guardrails the agent is attached to.
                    "is_attached": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "is_default": bool,  # Optional. The
                      guardrails the agent is attached to.
                    "metadata": {},  # Optional. Any object.
                    "name": "str",  # Optional. The guardrails
                      the agent is attached to.
                    "priority": 0,  # Optional. The guardrails
                      the agent is attached to.
                    "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                      Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values
                      are: "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                      "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                      "GUARDRAIL_TYPE_CONTENT_MODERATION".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The guardrails the agent is attached to.
                    "uuid": "str"  # Optional. The guardrails the
                      agent is attached to.
                }
            ],
            "if_case": "str",  # Optional.
            "instruction": "str",  # Optional. Agent instruction.
              Instructions help your agent to perform its job effectively. See `Write
              Effective Agent Instructions
              <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
              for best practices.
            "k": 0,  # Optional.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. Knowledge
                      bases.
                    "embedding_model_uuid": "str",  # Optional.
                      Knowledge bases.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. Knowledge
                      bases.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "logging_config": {
                "galileo_project_id": "str",  # Optional. Galileo
                  project identifier.
                "galileo_project_name": "str",  # Optional. Name of
                  the Galileo project.
                "insights_enabled": bool,  # Optional. Whether
                  insights are enabled.
                "insights_enabled_at": "2020-02-20 00:00:00",  #
                  Optional. Timestamp when insights were enabled.
                "log_stream_id": "str",  # Optional. Identifier for
                  the log stream.
                "log_stream_name": "str"  # Optional. Name of the log
                  stream.
            },
            "max_tokens": 0,  # Optional.
            "mcp_servers": [
                {
                    "allowed_tools": [
                        "str"  # Optional. Optional list of
                          allowed tool names to expose from this server.
                    ],
                    "authorization": "str",  # Optional. Optional
                      authorization header value for the MCP server.
                    "headers": {
                        "str": "str"  # Optional. Optional
                          additional headers to send to the MCP server.
                    },
                    "server_label": "str",  # Optional. A label
                      identifying this MCP server.
                    "server_url": "str"  # Optional. The URL of
                      the MCP server.
                }
            ],
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "model_provider_key": {
                "api_key_uuid": "str",  # Optional. API key ID.
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name of the key.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "updated_at": "2020-02-20 00:00:00"  # Optional. Key
                  last updated date.
            },
            "model_router": {
                "config": {
                    "fallback_models": [
                        "str"  # Optional. Router-level
                          fallback models.
                    ],
                    "policies": [
                        {
                            "custom_task": {
                                "description": "str",
                                  # Optional. Short task description.
                                "name": "str"  #
                                  Optional. Task name.
                            },
                            "models": [
                                "str"  # Optional.
                                  Models assigned to the task.
                            ],
                            "selection_policy": {
                                "prefer": "str"  #
                                  Optional. One of: none, cheapest, fastest.
                            },
                            "task_slug": "str"  #
                              Optional. Task slug.
                        }
                    ]
                },
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "description": "str",  # Optional. Description.
                "name": "str",  # Optional. Name of the model router.
                "regions": [
                    "str"  # Optional. Target regions for the
                      router.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "uuid": "str"  # Optional. Unique id.
            },
            "name": "str",  # Optional. Agent name.
            "openai_api_key": {
                "created_at": "2020-02-20 00:00:00",  # Optional. Key
                  creation date.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "deleted_at": "2020-02-20 00:00:00",  # Optional. Key
                  deleted date.
                "models": [
                    {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    }
                ],
                "name": "str",  # Optional. Name.
                "updated_at": "2020-02-20 00:00:00",  # Optional. Key
                  last updated date.
                "uuid": "str"  # Optional. Uuid.
            },
            "parent_agents": [
                ...
            ],
            "project_id": "str",  # Optional.
            "provide_citations": bool,  # Optional. Whether the agent
              should provide in-response citations.
            "reasoning_effort": "str",  # Optional. The reasoning effort
              for the agent.
            "region": "str",  # Optional. Region code.
            "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional.
              Default value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN:
              The retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
              retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval
              method is step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval
              method is sub queries   * RETRIEVAL_METHOD_NONE: The retrieval method is
              none. Known values are: "RETRIEVAL_METHOD_UNKNOWN",
              "RETRIEVAL_METHOD_REWRITE", "RETRIEVAL_METHOD_STEP_BACK",
              "RETRIEVAL_METHOD_SUB_QUERIES", and "RETRIEVAL_METHOD_NONE".
            "route_created_at": "2020-02-20 00:00:00",  # Optional.
              Creation of route date / time.
            "route_created_by": "str",  # Optional.
            "route_name": "str",  # Optional. Route name.
            "route_uuid": "str",  # Optional.
            "tags": [
                "str"  # Optional. Agent tag to organize related
                  resources.
            ],
            "temperature": 0.0,  # Optional.
            "template": {
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's creation date.
                "description": "str",  # Optional. Deprecated - Use
                  summary instead.
                "guardrails": [
                    {
                        "priority": 0,  # Optional. Priority
                          of the guardrail.
                        "uuid": "str"  # Optional. Uuid of
                          the guardrail.
                    }
                ],
                "instruction": "str",  # Optional. Instructions for
                  the agent template.
                "k": 0,  # Optional. The 'k' value for the agent
                  template.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "embedding_model_uuid": "str",  #
                          Optional. List of knowledge bases associated with the agent
                          template.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          List of knowledge bases associated with the agent template.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "long_description": "str",  # Optional. The long
                  description of the agent template.
                "max_tokens": 0,  # Optional. The max_tokens setting
                  for the agent template.
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "name": "str",  # Optional. Name of the agent
                  template.
                "short_description": "str",  # Optional. The short
                  description of the agent template.
                "summary": "str",  # Optional. The summary of the
                  agent template.
                "tags": [
                    "str"  # Optional. List of tags associated
                      with the agent template.
                ],
                "temperature": 0.0,  # Optional. The temperature
                  setting for the agent template.
                "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  #
                  Optional. Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
                  AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
                  AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known
                  values are: "AGENT_TEMPLATE_TYPE_STANDARD" and
                  "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                "top_p": 0.0,  # Optional. The top_p setting for the
                  agent template.
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  agent template's last updated date.
                "uuid": "str"  # Optional. Unique id.
            },
            "thinking_token_budget": 0,  # Optional. The thinking token
              budget for Anthropic extended thinking (0 = disabled).
            "top_p": 0.0,  # Optional.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your agent under this url.
            "user_id": "str",  # Optional. Id of user that created the
              agent.
            "uuid": "str",  # Optional. Unique agent id.
            "version_hash": "str",  # Optional. The latest version of the
              agent.
            "vpc_egress_ips": [
                "str"  # Optional. VPC Egress IPs.
            ],
            "vpc_uuid": "str",  # Optional.
            "workspace": {
                "agents": [
                    ...
                ],
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. The id of user who
                  created this workspace.
                "created_by_email": "str",  # Optional. The email of
                  the user who created this workspace.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "description": "str",  # Optional. Description of the
                  workspace.
                "evaluation_test_cases": [
                    {
                        "archived_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "created_by_user_email": "str",  #
                          Optional. Evaluations.
                        "created_by_user_id": "str",  #
                          Optional. Evaluations.
                        "dataset": {
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Time created at.
                            "dataset_name": "str",  #
                              Optional. Name of the dataset.
                            "dataset_type":
                              "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default
                              value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values
                              are: "EVALUATION_DATASET_TYPE_UNKNOWN",
                              "EVALUATION_DATASET_TYPE_ADK",
                              "EVALUATION_DATASET_TYPE_NON_ADK", and
                              "EVALUATION_DATASET_TYPE_MODEL".
                            "dataset_uuid": "str",  #
                              Optional. UUID of the dataset.
                            "file_size": "str",  #
                              Optional. The size of the dataset uploaded file in bytes.
                            "has_ground_truth": bool,  #
                              Optional. Does the dataset have a ground truth column?.
                            "row_count": 0  # Optional.
                              Number of rows in the dataset.
                        },
                        "dataset_name": "str",  # Optional.
                          Evaluations.
                        "dataset_uuid": "str",  # Optional.
                          Evaluations.
                        "description": "str",  # Optional.
                          Evaluations.
                        "latest_version_number_of_runs": 0,
                          # Optional. Evaluations.
                        "metrics": [
                            {
                                "category":
                                  "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_CATEGORY_UNSPECIFIED". Known values
                                  are: "METRIC_CATEGORY_UNSPECIFIED",
                                  "METRIC_CATEGORY_CORRECTNESS",
                                  "METRIC_CATEGORY_USER_OUTCOMES",
                                  "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                                  "METRIC_CATEGORY_CONTEXT_QUALITY", and
                                  "METRIC_CATEGORY_MODEL_FIT".
                                "description": "str",
                                  # Optional. Evaluations.
                                "evaluation_scope":
                                  "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                                  value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                                  determines whether a metric belongs to agent
                                  evaluation or model evaluation. For backwards
                                  compatibility, UNSPECIFIED defaults to agent metrics
                                  only in list operations. Known values are:
                                  "EVALUATION_SCOPE_UNSPECIFIED",
                                  "EVALUATION_SCOPE_AGENT", and
                                  "EVALUATION_SCOPE_MODEL".
                                "inverted": bool,  #
                                  Optional. If true, the metric is inverted, meaning
                                  that a lower value is better.
                                "is_metric_goal":
                                  bool,  # Optional. Evaluations.
                                "metric_name": "str",
                                  # Optional. Evaluations.
                                "metric_rank": 0,  #
                                  Optional. Evaluations.
                                "metric_type":
                                  "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value
                                  is "METRIC_TYPE_UNSPECIFIED". Known values are:
                                  "METRIC_TYPE_UNSPECIFIED",
                                  "METRIC_TYPE_GENERAL_QUALITY",
                                  "METRIC_TYPE_RAG_AND_TOOL",
                                  "METRIC_TYPE_MODEL_QUALITY", and
                                  "METRIC_TYPE_MODEL_SAFETY".
                                "metric_uuid": "str",
                                  # Optional. Evaluations.
                                "metric_value_type":
                                  "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                                  value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                                  "METRIC_VALUE_TYPE_NUMBER",
                                  "METRIC_VALUE_TYPE_STRING", and
                                  "METRIC_VALUE_TYPE_PERCENTAGE".
                                "range_max": 0.0,  #
                                  Optional. The maximum value for the metric.
                                "range_min": 0.0  #
                                  Optional. The minimum value for the metric.
                            }
                        ],
                        "name": "str",  # Optional.
                          Evaluations.
                        "star_metric": {
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "name": "str",  # Optional.
                              Evaluations.
                            "success_threshold": 0.0,  #
                              Optional. The success threshold for the star metric. This
                              is a value that the metric must reach to be considered
                              successful.
                            "success_threshold_pct": 0  #
                              Optional. The success threshold for the star metric. This
                              is a percentage value between 0 and 100.
                        },
                        "test_case_uuid": "str",  # Optional.
                          Evaluations.
                        "total_runs": 0,  # Optional.
                          Evaluations.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Evaluations.
                        "updated_by_user_email": "str",  #
                          Optional. Evaluations.
                        "updated_by_user_id": "str",  #
                          Optional. Evaluations.
                        "version": 0  # Optional.
                          Evaluations.
                    }
                ],
                "name": "str",  # Optional. Name of the workspace.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Update date.
                "uuid": "str"  # Optional. Unique id.
            }
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_anthropic_api_keys(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Anthropic API Keys.

To list all Anthropic API keys, send a GET request to /v2/gen-ai/anthropic/keys.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_infos": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_custom_models(*, page: Optional[int] = None, per_page: Optional[int] = None, status: str = 'STATUS_UNSPECIFIED', **kwargs: Any) MutableMapping[str, Any]

List Custom Models.

To list custom models, send a GET request to /v2/gen-ai/custom_models.

Parameters:
  • page (int) – Page number for pagination. Default value is None.

  • per_page (int) – Number of items per page. Default value is None.

  • status (str) – Filter by model status. Known values are: “STATUS_UNSPECIFIED”, “STATUS_IMPORTING”, “STATUS_READY”, “STATUS_FAILED”, and “STATUS_DELETED”. Default value is “STATUS_UNSPECIFIED”.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "max_threshold": 0,  # Optional. Maximum number of custom models allowed for
      this team's tier.
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "models": [
        {
            "active_deployments": [
                {
                    "created_at": "str",  # Optional. RFC 3339
                      timestamp indicating when the dedicated inference deployment was
                      created.
                    "endpoints": {
                        "private_endpoint_fqdn": "str",  #
                          Optional. Private FQDN for the deployment.
                        "public_endpoint_fqdn": "str"  #
                          Optional. Public FQDN for the deployment.
                    },
                    "id": "str",  # Optional. Unique identifier
                      (UUID) of the dedicated inference deployment.
                    "name": "str",  # Optional. Human-readable
                      name of the dedicated inference deployment.
                    "region_slug": "str",  # Optional. Slug of
                      the region where the dedicated inference deployment is running
                      (e.g. "atl1").
                    "state": "str",  # Optional. Current
                      lifecycle state of the dedicated inference deployment (e.g.
                      "ACTIVE", "PROVISIONING").
                    "updated_at": "str"  # Optional. RFC 3339
                      timestamp indicating when the dedicated inference deployment was
                      last updated.
                }
            ],
            "architecture": "str",  # Optional. Model architecture type
              (free-form string from config.json).
            "config_json": {},  # Optional. Raw config.json contents from
              the model repository.
            "context_length": 0,  # Optional. Maximum context length
              supported by the model.
            "cost_estimate_per_month": 0,  # Optional. Estimated monthly
              cost in dollars for hosting.
            "created_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when the model was created.
            "description": "str",  # Optional. Description of the custom
              model.
            "file_count": 0,  # Optional. Number of files in the model.
            "input_modalities": [
                "str"  # Optional. Input modalities supported (e.g.,
                  text, image).
            ],
            "license": "str",  # Optional. License under which the model
              is distributed.
            "name": "str",  # Optional. Name of the custom model.
            "output_modalities": [
                "str"  # Optional. Output modalities supported (e.g.,
                  text, image).
            ],
            "parameters": "str",  # Optional. Number of parameters in the
              model.
            "source_ref": {
                "access_type": "ACCESS_TYPE_UNSPECIFIED",  #
                  Optional. Default value is "ACCESS_TYPE_UNSPECIFIED". Access level
                  required for the model repository. Known values are:
                  "ACCESS_TYPE_UNSPECIFIED", "ACCESS_TYPE_PUBLIC",
                  "ACCESS_TYPE_PRIVATE", and "ACCESS_TYPE_GATED".
                "bucket": "str",  # Optional. Spaces bucket name.
                "commit_sha": "str",  # Optional. Git commit SHA of
                  the model version.
                "hf_token": "str",  # Optional. User-provided
                  HuggingFace token for gated/private models (not persisted in
                  source_ref).
                "prefix": "str",  # Optional. Object prefix path in
                  the bucket.
                "region": "str",  # Optional. Spaces bucket region.
                "repo_id": "str"  # Optional. Huggingface repository
                  identifier.
            },
            "source_type": "SOURCE_TYPE_UNSPECIFIED",  # Optional.
              Default value is "SOURCE_TYPE_UNSPECIFIED". Source from which the model
              was imported. Known values are: "SOURCE_TYPE_UNSPECIFIED",
              "SOURCE_TYPE_HUGGINGFACE", "SOURCE_TYPE_SPACES_BUCKET",
              "SOURCE_TYPE_SDK_UPLOAD", and "SOURCE_TYPE_FINE_TUNING".
            "status": "STATUS_UNSPECIFIED",  # Optional. Default value is
              "STATUS_UNSPECIFIED". Import and deployment status of the custom model.
              Known values are: "STATUS_UNSPECIFIED", "STATUS_IMPORTING",
              "STATUS_READY", "STATUS_FAILED", and "STATUS_DELETED".
            "storage_region": "str",  # Optional. Region of the Spaces
              bucket where model files are stored.
            "tags": {
                "tags": [
                    "str"  # Optional. List of tag strings.
                ]
            },
            "team_id": "str",  # Optional. Team that owns the model.
            "total_size_bytes": "str",  # Optional. Total size of model
              files in bytes.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when the model was last updated.
            "uuid": "str"  # Optional. Unique identifier for the custom
              model.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_datacenter_regions(*, serves_inference: Optional[bool] = None, serves_batch: Optional[bool] = None, **kwargs: Any) MutableMapping[str, Any]

List Datacenter Regions.

To list all datacenter regions, send a GET request to /v2/gen-ai/regions.

Parameters:
  • serves_inference (bool) – Include datacenters that serve inference. Default value is None.

  • serves_batch (bool) – Include datacenters that are capable of running batch jobs. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "regions": [
        {
            "inference_url": "str",  # Optional. Url for inference
              server.
            "region": "str",  # Optional. Region code.
            "serves_batch": bool,  # Optional. This datacenter is capable
              of running batch jobs.
            "serves_inference": bool,  # Optional. This datacenter is
              capable of serving inference.
            "stream_inference_url": "str"  # Optional. The url for the
              inference streaming server.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_evaluation_metrics(**kwargs: Any) MutableMapping[str, Any]

List Evaluation Metrics.

To list all evaluation metrics, send a GET request to /v2/gen-ai/evaluation_metrics.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "metrics": [
        {
            "category": "METRIC_CATEGORY_UNSPECIFIED",  # Optional.
              Default value is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
              "METRIC_CATEGORY_UNSPECIFIED", "METRIC_CATEGORY_CORRECTNESS",
              "METRIC_CATEGORY_USER_OUTCOMES", "METRIC_CATEGORY_SAFETY_AND_SECURITY",
              "METRIC_CATEGORY_CONTEXT_QUALITY", and "METRIC_CATEGORY_MODEL_FIT".
            "description": "str",  # Optional.
            "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED",  #
              Optional. Default value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
              determines whether a metric belongs to agent evaluation or model
              evaluation. For backwards compatibility, UNSPECIFIED defaults to agent
              metrics only in list operations. Known values are:
              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
              "EVALUATION_SCOPE_MODEL".
            "inverted": bool,  # Optional. If true, the metric is
              inverted, meaning that a lower value is better.
            "is_metric_goal": bool,  # Optional.
            "metric_name": "str",  # Optional.
            "metric_rank": 0,  # Optional.
            "metric_type": "METRIC_TYPE_UNSPECIFIED",  # Optional.
              Default value is "METRIC_TYPE_UNSPECIFIED". Known values are:
              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
              "METRIC_TYPE_MODEL_SAFETY".
            "metric_uuid": "str",  # Optional.
            "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",  #
              Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
              are: "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
              "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
            "range_max": 0.0,  # Optional. The maximum value for the
              metric.
            "range_min": 0.0  # Optional. The minimum value for the
              metric.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_evaluation_runs_by_test_case(evaluation_test_case_uuid: str, *, evaluation_test_case_version: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Evaluation Runs by Test Case.

To list all evaluation runs by test case, send a GET request to /v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs.

Parameters:
  • evaluation_test_case_uuid (str) – Evaluation run UUID. Required.

  • evaluation_test_case_version (int) – Version of the test case. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "evaluation_runs": [
        {
            "agent_deleted": bool,  # Optional. Whether agent is deleted.
            "agent_deployment_name": "str",  # Optional. The agent
              deployment name.
            "agent_name": "str",  # Optional. Agent name.
            "agent_uuid": "str",  # Optional. Agent UUID.
            "agent_version_hash": "str",  # Optional. Version hash.
            "agent_workspace_uuid": "str",  # Optional. Agent workspace
              uuid.
            "created_by_user_email": "str",  # Optional. List of
              evaluation runs.
            "created_by_user_id": "str",  # Optional. List of evaluation
              runs.
            "error_description": "str",  # Optional. The error
              description.
            "evaluation_run_uuid": "str",  # Optional. Evaluation run
              UUID.
            "evaluation_test_case_workspace_uuid": "str",  # Optional.
              Evaluation test case workspace uuid.
            "finished_at": "2020-02-20 00:00:00",  # Optional. Run end
              time.
            "pass_status": bool,  # Optional. The pass status of the
              evaluation run based on the star metric.
            "queued_at": "2020-02-20 00:00:00",  # Optional. Run queued
              time.
            "run_level_metric_results": [
                {
                    "error_description": "str",  # Optional.
                      Error description if the metric could not be calculated.
                    "metric_name": "str",  # Optional. Metric
                      name.
                    "metric_value_type":
                      "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value is
                      "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                      "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                      "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
                    "number_value": 0.0,  # Optional. The value
                      of the metric as a number.
                    "reasoning": "str",  # Optional. Reasoning of
                      the metric result.
                    "string_value": "str"  # Optional. The value
                      of the metric as a string.
                }
            ],
            "run_name": "str",  # Optional. Run name.
            "star_metric_result": {
                "error_description": "str",  # Optional. Error
                  description if the metric could not be calculated.
                "metric_name": "str",  # Optional. Metric name.
                "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
                  # Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known
                  values are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                  "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING", and
                  "METRIC_VALUE_TYPE_PERCENTAGE".
                "number_value": 0.0,  # Optional. The value of the
                  metric as a number.
                "reasoning": "str",  # Optional. Reasoning of the
                  metric result.
                "string_value": "str"  # Optional. The value of the
                  metric as a string.
            },
            "started_at": "2020-02-20 00:00:00",  # Optional. Run start
              time.
            "status": "EVALUATION_RUN_STATUS_UNSPECIFIED",  # Optional.
              Default value is "EVALUATION_RUN_STATUS_UNSPECIFIED". Evaluation Run
              Statuses. Known values are: "EVALUATION_RUN_STATUS_UNSPECIFIED",
              "EVALUATION_RUN_QUEUED", "EVALUATION_RUN_RUNNING_DATASET",
              "EVALUATION_RUN_EVALUATING_RESULTS", "EVALUATION_RUN_CANCELLING",
              "EVALUATION_RUN_CANCELLED", "EVALUATION_RUN_SUCCESSFUL",
              "EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and "EVALUATION_RUN_FAILED".
            "test_case_description": "str",  # Optional. Test case
              description.
            "test_case_name": "str",  # Optional. Test case name.
            "test_case_uuid": "str",  # Optional. Test-case UUID.
            "test_case_version": 0  # Optional. Test-case-version.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_evaluation_test_cases(**kwargs: Any) MutableMapping[str, Any]

List Evaluation Test Cases.

To list all evaluation test cases, send a GET request to /v2/gen-ai/evaluation_test_cases.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "evaluation_test_cases": [
        {
            "archived_at": "2020-02-20 00:00:00",  # Optional.
              Alternative way of authentication for internal usage only - should not be
              exposed to public api.
            "created_at": "2020-02-20 00:00:00",  # Optional. Alternative
              way of authentication for internal usage only - should not be exposed to
              public api.
            "created_by_user_email": "str",  # Optional. Alternative way
              of authentication for internal usage only - should not be exposed to
              public api.
            "created_by_user_id": "str",  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "dataset": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Time created at.
                "dataset_name": "str",  # Optional. Name of the
                  dataset.
                "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN",  #
                  Optional. Default value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known
                  values are: "EVALUATION_DATASET_TYPE_UNKNOWN",
                  "EVALUATION_DATASET_TYPE_ADK", "EVALUATION_DATASET_TYPE_NON_ADK", and
                  "EVALUATION_DATASET_TYPE_MODEL".
                "dataset_uuid": "str",  # Optional. UUID of the
                  dataset.
                "file_size": "str",  # Optional. The size of the
                  dataset uploaded file in bytes.
                "has_ground_truth": bool,  # Optional. Does the
                  dataset have a ground truth column?.
                "row_count": 0  # Optional. Number of rows in the
                  dataset.
            },
            "dataset_name": "str",  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "dataset_uuid": "str",  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "description": "str",  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "latest_version_number_of_runs": 0,  # Optional. Alternative
              way of authentication for internal usage only - should not be exposed to
              public api.
            "metrics": [
                {
                    "category": "METRIC_CATEGORY_UNSPECIFIED",  #
                      Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known
                      values are: "METRIC_CATEGORY_UNSPECIFIED",
                      "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES",
                      "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                      "METRIC_CATEGORY_CONTEXT_QUALITY", and
                      "METRIC_CATEGORY_MODEL_FIT".
                    "description": "str",  # Optional.
                      Alternative way of authentication for internal usage only -
                      should not be exposed to public api.
                    "evaluation_scope":
                      "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default value is
                      "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether a
                      metric belongs to agent evaluation or model evaluation. For
                      backwards compatibility, UNSPECIFIED defaults to agent metrics
                      only in list operations. Known values are:
                      "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                      "EVALUATION_SCOPE_MODEL".
                    "inverted": bool,  # Optional. If true, the
                      metric is inverted, meaning that a lower value is better.
                    "is_metric_goal": bool,  # Optional.
                      Alternative way of authentication for internal usage only -
                      should not be exposed to public api.
                    "metric_name": "str",  # Optional.
                      Alternative way of authentication for internal usage only -
                      should not be exposed to public api.
                    "metric_rank": 0,  # Optional. Alternative
                      way of authentication for internal usage only - should not be
                      exposed to public api.
                    "metric_type": "METRIC_TYPE_UNSPECIFIED",  #
                      Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known
                      values are: "METRIC_TYPE_UNSPECIFIED",
                      "METRIC_TYPE_GENERAL_QUALITY", "METRIC_TYPE_RAG_AND_TOOL",
                      "METRIC_TYPE_MODEL_QUALITY", and "METRIC_TYPE_MODEL_SAFETY".
                    "metric_uuid": "str",  # Optional.
                      Alternative way of authentication for internal usage only -
                      should not be exposed to public api.
                    "metric_value_type":
                      "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value is
                      "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                      "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                      "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
                    "range_max": 0.0,  # Optional. The maximum
                      value for the metric.
                    "range_min": 0.0  # Optional. The minimum
                      value for the metric.
                }
            ],
            "name": "str",  # Optional. Alternative way of authentication
              for internal usage only - should not be exposed to public api.
            "star_metric": {
                "metric_uuid": "str",  # Optional. Alternative way of
                  authentication for internal usage only - should not be exposed to
                  public api.
                "name": "str",  # Optional. Alternative way of
                  authentication for internal usage only - should not be exposed to
                  public api.
                "success_threshold": 0.0,  # Optional. The success
                  threshold for the star metric. This is a value that the metric must
                  reach to be considered successful.
                "success_threshold_pct": 0  # Optional. The success
                  threshold for the star metric. This is a percentage value between 0
                  and 100.
            },
            "test_case_uuid": "str",  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "total_runs": 0,  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Alternative
              way of authentication for internal usage only - should not be exposed to
              public api.
            "updated_by_user_email": "str",  # Optional. Alternative way
              of authentication for internal usage only - should not be exposed to
              public api.
            "updated_by_user_id": "str",  # Optional. Alternative way of
              authentication for internal usage only - should not be exposed to public
              api.
            "version": 0  # Optional. Alternative way of authentication
              for internal usage only - should not be exposed to public api.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_evaluation_test_cases_by_workspace(workspace_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Evaluation Test Cases by Workspace.

To list all evaluation test cases by a workspace, send a GET request to /v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases.

Parameters:

workspace_uuid (str) – Workspace UUID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "evaluation_test_cases": [
        {
            "archived_at": "2020-02-20 00:00:00",  # Optional.
            "created_at": "2020-02-20 00:00:00",  # Optional.
            "created_by_user_email": "str",  # Optional.
            "created_by_user_id": "str",  # Optional.
            "dataset": {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Time created at.
                "dataset_name": "str",  # Optional. Name of the
                  dataset.
                "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN",  #
                  Optional. Default value is "EVALUATION_DATASET_TYPE_UNKNOWN". Known
                  values are: "EVALUATION_DATASET_TYPE_UNKNOWN",
                  "EVALUATION_DATASET_TYPE_ADK", "EVALUATION_DATASET_TYPE_NON_ADK", and
                  "EVALUATION_DATASET_TYPE_MODEL".
                "dataset_uuid": "str",  # Optional. UUID of the
                  dataset.
                "file_size": "str",  # Optional. The size of the
                  dataset uploaded file in bytes.
                "has_ground_truth": bool,  # Optional. Does the
                  dataset have a ground truth column?.
                "row_count": 0  # Optional. Number of rows in the
                  dataset.
            },
            "dataset_name": "str",  # Optional.
            "dataset_uuid": "str",  # Optional.
            "description": "str",  # Optional.
            "latest_version_number_of_runs": 0,  # Optional.
            "metrics": [
                {
                    "category": "METRIC_CATEGORY_UNSPECIFIED",  #
                      Optional. Default value is "METRIC_CATEGORY_UNSPECIFIED". Known
                      values are: "METRIC_CATEGORY_UNSPECIFIED",
                      "METRIC_CATEGORY_CORRECTNESS", "METRIC_CATEGORY_USER_OUTCOMES",
                      "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                      "METRIC_CATEGORY_CONTEXT_QUALITY", and
                      "METRIC_CATEGORY_MODEL_FIT".
                    "description": "str",  # Optional.
                    "evaluation_scope":
                      "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default value is
                      "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether a
                      metric belongs to agent evaluation or model evaluation. For
                      backwards compatibility, UNSPECIFIED defaults to agent metrics
                      only in list operations. Known values are:
                      "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                      "EVALUATION_SCOPE_MODEL".
                    "inverted": bool,  # Optional. If true, the
                      metric is inverted, meaning that a lower value is better.
                    "is_metric_goal": bool,  # Optional.
                    "metric_name": "str",  # Optional.
                    "metric_rank": 0,  # Optional.
                    "metric_type": "METRIC_TYPE_UNSPECIFIED",  #
                      Optional. Default value is "METRIC_TYPE_UNSPECIFIED". Known
                      values are: "METRIC_TYPE_UNSPECIFIED",
                      "METRIC_TYPE_GENERAL_QUALITY", "METRIC_TYPE_RAG_AND_TOOL",
                      "METRIC_TYPE_MODEL_QUALITY", and "METRIC_TYPE_MODEL_SAFETY".
                    "metric_uuid": "str",  # Optional.
                    "metric_value_type":
                      "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value is
                      "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                      "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                      "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
                    "range_max": 0.0,  # Optional. The maximum
                      value for the metric.
                    "range_min": 0.0  # Optional. The minimum
                      value for the metric.
                }
            ],
            "name": "str",  # Optional.
            "star_metric": {
                "metric_uuid": "str",  # Optional.
                "name": "str",  # Optional.
                "success_threshold": 0.0,  # Optional. The success
                  threshold for the star metric. This is a value that the metric must
                  reach to be considered successful.
                "success_threshold_pct": 0  # Optional. The success
                  threshold for the star metric. This is a percentage value between 0
                  and 100.
            },
            "test_case_uuid": "str",  # Optional.
            "total_runs": 0,  # Optional.
            "updated_at": "2020-02-20 00:00:00",  # Optional.
            "updated_by_user_email": "str",  # Optional.
            "updated_by_user_id": "str",  # Optional.
            "version": 0  # Optional.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_indexing_job_data_sources(indexing_job_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Data Sources for Indexing Job for a Knowledge Base.

To list all datasources for an indexing job, send a GET request to /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources.

Parameters:

indexing_job_uuid (str) – Uuid of the indexing job. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "indexed_data_sources": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when data source completed indexing.
            "data_source_uuid": "str",  # Optional. Uuid of the indexed
              data source.
            "error_details": "str",  # Optional. A detailed error
              description.
            "error_msg": "str",  # Optional. A string code provinding a
              hint which part of the system experienced an error.
            "failed_item_count": "str",  # Optional. Total count of files
              that have failed.
            "indexed_file_count": "str",  # Optional. Total count of
              files that have been indexed.
            "indexed_item_count": "str",  # Optional. Total count of
              files that have been indexed.
            "removed_item_count": "str",  # Optional. Total count of
              files that have been removed.
            "skipped_item_count": "str",  # Optional. Total count of
              files that have been skipped.
            "started_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when data source started indexing.
            "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
              value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
              "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
              "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
              "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
              "DATA_SOURCE_STATUS_CANCELLED".
            "total_bytes": "str",  # Optional. Total size of files in
              data source in bytes.
            "total_bytes_indexed": "str",  # Optional. Total size of
              files in data source in bytes that have been indexed.
            "total_file_count": "str"  # Optional. Total file count in
              the data source.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_indexing_jobs(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Indexing Jobs for a Knowledge Base.

To list all indexing jobs for a knowledge base, send a GET request to /v2/gen-ai/indexing_jobs.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "jobs": [
        {
            "completed_datasources": 0,  # Optional. Number of
              datasources indexed completed.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "data_source_jobs": [
                {
                    "completed_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source completed indexing.
                    "data_source_uuid": "str",  # Optional. Uuid
                      of the indexed data source.
                    "error_details": "str",  # Optional. A
                      detailed error description.
                    "error_msg": "str",  # Optional. A string
                      code provinding a hint which part of the system experienced an
                      error.
                    "failed_item_count": "str",  # Optional.
                      Total count of files that have failed.
                    "indexed_file_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "indexed_item_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "removed_item_count": "str",  # Optional.
                      Total count of files that have been removed.
                    "skipped_item_count": "str",  # Optional.
                      Total count of files that have been skipped.
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source started indexing.
                    "status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                      Optional. Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known
                      values are: "DATA_SOURCE_STATUS_UNKNOWN",
                      "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED",
                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                      "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED",
                      and "DATA_SOURCE_STATUS_CANCELLED".
                    "total_bytes": "str",  # Optional. Total size
                      of files in data source in bytes.
                    "total_bytes_indexed": "str",  # Optional.
                      Total size of files in data source in bytes that have been
                      indexed.
                    "total_file_count": "str"  # Optional. Total
                      file count in the data source.
                }
            ],
            "data_source_uuids": [
                "str"  # Optional. The indexing jobs.
            ],
            "finished_at": "2020-02-20 00:00:00",  # Optional. The
              indexing jobs.
            "is_report_available": bool,  # Optional. Boolean value to
              determine if the indexing job details are available.
            "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
            "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default
              value is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
              "BATCH_JOB_PHASE_CANCELLED".
            "started_at": "2020-02-20 00:00:00",  # Optional. The
              indexing jobs.
            "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
              value is "INDEX_JOB_STATUS_UNKNOWN". Known values are:
              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
              "INDEX_JOB_STATUS_IN_PROGRESS", "INDEX_JOB_STATUS_COMPLETED",
              "INDEX_JOB_STATUS_FAILED", "INDEX_JOB_STATUS_NO_CHANGES",
              "INDEX_JOB_STATUS_PENDING", and "INDEX_JOB_STATUS_CANCELLED".
            "tokens": 0,  # Optional. Number of tokens [This field is
              deprecated].
            "total_datasources": 0,  # Optional. Number of datasources
              being indexed.
            "total_tokens": "str",  # Optional. Total Tokens Consumed By
              the Indexing Job.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_indexing_jobs_by_knowledge_base(knowledge_base_uuid: str, **kwargs: Any) MutableMapping[str, Any]

List Indexing Jobs for a Knowledge Base.

To list latest 15 indexing jobs for a knowledge base, send a GET request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs.

Parameters:

knowledge_base_uuid (str) – Knowledge base uuid in string. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "jobs": [
        {
            "completed_datasources": 0,  # Optional. Number of
              datasources indexed completed.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "data_source_jobs": [
                {
                    "completed_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source completed indexing.
                    "data_source_uuid": "str",  # Optional. Uuid
                      of the indexed data source.
                    "error_details": "str",  # Optional. A
                      detailed error description.
                    "error_msg": "str",  # Optional. A string
                      code provinding a hint which part of the system experienced an
                      error.
                    "failed_item_count": "str",  # Optional.
                      Total count of files that have failed.
                    "indexed_file_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "indexed_item_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "removed_item_count": "str",  # Optional.
                      Total count of files that have been removed.
                    "skipped_item_count": "str",  # Optional.
                      Total count of files that have been skipped.
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source started indexing.
                    "status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                      Optional. Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known
                      values are: "DATA_SOURCE_STATUS_UNKNOWN",
                      "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED",
                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                      "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED",
                      and "DATA_SOURCE_STATUS_CANCELLED".
                    "total_bytes": "str",  # Optional. Total size
                      of files in data source in bytes.
                    "total_bytes_indexed": "str",  # Optional.
                      Total size of files in data source in bytes that have been
                      indexed.
                    "total_file_count": "str"  # Optional. Total
                      file count in the data source.
                }
            ],
            "data_source_uuids": [
                "str"  # Optional. The indexing jobs.
            ],
            "finished_at": "2020-02-20 00:00:00",  # Optional. The
              indexing jobs.
            "is_report_available": bool,  # Optional. Boolean value to
              determine if the indexing job details are available.
            "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
            "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default
              value is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
              "BATCH_JOB_PHASE_CANCELLED".
            "started_at": "2020-02-20 00:00:00",  # Optional. The
              indexing jobs.
            "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
              value is "INDEX_JOB_STATUS_UNKNOWN". Known values are:
              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
              "INDEX_JOB_STATUS_IN_PROGRESS", "INDEX_JOB_STATUS_COMPLETED",
              "INDEX_JOB_STATUS_FAILED", "INDEX_JOB_STATUS_NO_CHANGES",
              "INDEX_JOB_STATUS_PENDING", and "INDEX_JOB_STATUS_CANCELLED".
            "tokens": 0,  # Optional. Number of tokens [This field is
              deprecated].
            "total_datasources": 0,  # Optional. Number of datasources
              being indexed.
            "total_tokens": "str",  # Optional. Total Tokens Consumed By
              the Indexing Job.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_knowledge_base_data_sources(knowledge_base_uuid: str, *, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Data Sources for a Knowledge Base.

To list all data sources for a knowledge base, send a GET request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources.

Parameters:
  • knowledge_base_uuid (str) – Knowledge base id. Required.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "knowledge_base_data_sources": [
        {
            "aws_data_source": {
                "bucket_name": "str",  # Optional. Spaces bucket
                  name.
                "item_path": "str",  # Optional. AWS S3 Data Source
                  for Display.
                "region": "str"  # Optional. Region of bucket.
            },
            "bucket_name": "str",  # Optional. Name of storage bucket -
              Deprecated, moved to data_source_details.
            "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",  #
              Optional. Default value is "CHUNKING_ALGORITHM_UNKNOWN". Known values
              are: "CHUNKING_ALGORITHM_UNKNOWN", "CHUNKING_ALGORITHM_SECTION_BASED",
              "CHUNKING_ALGORITHM_HIERARCHICAL", "CHUNKING_ALGORITHM_SEMANTIC", and
              "CHUNKING_ALGORITHM_FIXED_LENGTH".
            "chunking_options": {
                "child_chunk_size": 0,  # Optional. The data sources.
                "max_chunk_size": 0,  # Optional. Common options.
                "parent_chunk_size": 0,  # Optional. Hierarchical
                  options.
                "semantic_threshold": 0.0  # Optional. Semantic
                  options.
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "dropbox_data_source": {
                "folder": "str"  # Optional. Dropbox Data Source for
                  Display.
            },
            "file_upload_data_source": {
                "original_file_name": "str",  # Optional. The
                  original file name.
                "size_in_bytes": "str",  # Optional. The size of the
                  file in bytes.
                "stored_object_key": "str"  # Optional. The object
                  key the file was stored as.
            },
            "google_drive_data_source": {
                "folder_id": "str",  # Optional. Google Drive Data
                  Source for Display.
                "folder_name": "str"  # Optional. Name of the
                  selected folder if available.
            },
            "item_path": "str",  # Optional. Path of folder or object in
              bucket - Deprecated, moved to data_source_details.
            "last_datasource_indexing_job": {
                "completed_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source completed indexing.
                "data_source_uuid": "str",  # Optional. Uuid of the
                  indexed data source.
                "error_details": "str",  # Optional. A detailed error
                  description.
                "error_msg": "str",  # Optional. A string code
                  provinding a hint which part of the system experienced an error.
                "failed_item_count": "str",  # Optional. Total count
                  of files that have failed.
                "indexed_file_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "indexed_item_count": "str",  # Optional. Total count
                  of files that have been indexed.
                "removed_item_count": "str",  # Optional. Total count
                  of files that have been removed.
                "skipped_item_count": "str",  # Optional. Total count
                  of files that have been skipped.
                "started_at": "2020-02-20 00:00:00",  # Optional.
                  Timestamp when data source started indexing.
                "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                  Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                  "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
                  "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                  "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
                  "DATA_SOURCE_STATUS_CANCELLED".
                "total_bytes": "str",  # Optional. Total size of
                  files in data source in bytes.
                "total_bytes_indexed": "str",  # Optional. Total size
                  of files in data source in bytes that have been indexed.
                "total_file_count": "str"  # Optional. Total file
                  count in the data source.
            },
            "region": "str",  # Optional. Region code - Deprecated, moved
              to data_source_details.
            "spaces_data_source": {
                "bucket_name": "str",  # Optional. Spaces bucket
                  name.
                "item_path": "str",  # Optional. Spaces Bucket Data
                  Source.
                "region": "str"  # Optional. Region of bucket.
            },
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str",  # Optional. Unique id of knowledge base.
            "web_crawler_data_source": {
                "base_url": "str",  # Optional. The base url to
                  crawl.
                "crawling_option": "UNKNOWN",  # Optional. Default
                  value is "UNKNOWN". Options for specifying how URLs found on pages
                  should be handled.   * UNKNOWN: Default unknown value * SCOPED: Only
                  include the base URL. * PATH: Crawl the base URL and linked pages
                  within the URL path. * DOMAIN: Crawl the base URL and linked pages
                  within the same domain. * SUBDOMAINS: Crawl the base URL and linked
                  pages for any subdomain. * SITEMAP: Crawl URLs discovered in the
                  sitemap. Known values are: "UNKNOWN", "SCOPED", "PATH", "DOMAIN",
                  "SUBDOMAINS", and "SITEMAP".
                "embed_media": bool,  # Optional. Whether to ingest
                  and index media (images, etc.) on web pages.
                "exclude_tags": [
                    "str"  # Optional. Declaring which tags to
                      exclude in web pages while webcrawling.
                ]
            }
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_knowledge_bases(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Knowledge Bases.

To list all knowledge bases, send a GET request to /v2/gen-ai/knowledge_bases.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "knowledge_bases": [
        {
            "added_to_agent_at": "2020-02-20 00:00:00",  # Optional. Time
              when the knowledge base was added to the agent.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "database_id": "str",  # Optional. The knowledge bases.
            "embedding_model_uuid": "str",  # Optional. The knowledge
              bases.
            "is_public": bool,  # Optional. Whether the knowledge base is
              public or not.
            "last_indexing_job": {
                "completed_datasources": 0,  # Optional. Number of
                  datasources indexed completed.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "data_source_jobs": [
                    {
                        "completed_at": "2020-02-20
                          00:00:00",  # Optional. Timestamp when data source completed
                          indexing.
                        "data_source_uuid": "str",  #
                          Optional. Uuid of the indexed data source.
                        "error_details": "str",  # Optional.
                          A detailed error description.
                        "error_msg": "str",  # Optional. A
                          string code provinding a hint which part of the system
                          experienced an error.
                        "failed_item_count": "str",  #
                          Optional. Total count of files that have failed.
                        "indexed_file_count": "str",  #
                          Optional. Total count of files that have been indexed.
                        "indexed_item_count": "str",  #
                          Optional. Total count of files that have been indexed.
                        "removed_item_count": "str",  #
                          Optional. Total count of files that have been removed.
                        "skipped_item_count": "str",  #
                          Optional. Total count of files that have been skipped.
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. Timestamp when data source started indexing.
                        "status":
                          "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value is
                          "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                          "DATA_SOURCE_STATUS_UNKNOWN",
                          "DATA_SOURCE_STATUS_IN_PROGRESS",
                          "DATA_SOURCE_STATUS_UPDATED",
                          "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                          "DATA_SOURCE_STATUS_NOT_UPDATED",
                          "DATA_SOURCE_STATUS_FAILED", and
                          "DATA_SOURCE_STATUS_CANCELLED".
                        "total_bytes": "str",  # Optional.
                          Total size of files in data source in bytes.
                        "total_bytes_indexed": "str",  #
                          Optional. Total size of files in data source in bytes that
                          have been indexed.
                        "total_file_count": "str"  #
                          Optional. Total file count in the data source.
                    }
                ],
                "data_source_uuids": [
                    "str"  # Optional. IndexingJob description.
                ],
                "finished_at": "2020-02-20 00:00:00",  # Optional.
                  IndexingJob description.
                "is_report_available": bool,  # Optional. Boolean
                  value to determine if the indexing job details are available.
                "knowledge_base_uuid": "str",  # Optional. Knowledge
                  base id.
                "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional.
                  Default value is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                  "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                  "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                  "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                  "BATCH_JOB_PHASE_CANCELLED".
                "started_at": "2020-02-20 00:00:00",  # Optional.
                  IndexingJob description.
                "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional.
                  Default value is "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                  "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                  "INDEX_JOB_STATUS_IN_PROGRESS", "INDEX_JOB_STATUS_COMPLETED",
                  "INDEX_JOB_STATUS_FAILED", "INDEX_JOB_STATUS_NO_CHANGES",
                  "INDEX_JOB_STATUS_PENDING", and "INDEX_JOB_STATUS_CANCELLED".
                "tokens": 0,  # Optional. Number of tokens [This
                  field is deprecated].
                "total_datasources": 0,  # Optional. Number of
                  datasources being indexed.
                "total_tokens": "str",  # Optional. Total Tokens
                  Consumed By the Indexing Job.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "uuid": "str"  # Optional. Unique id.
            },
            "name": "str",  # Optional. Name of knowledge base.
            "project_id": "str",  # Optional. The knowledge bases.
            "region": "str",  # Optional. Region code.
            "reranking_config": {
                "enabled": bool,  # Optional. Whether reranking is
                  enabled for retrieval.
                "model": "str"  # Optional. Reranker model internal
                  name.
            },
            "tags": [
                "str"  # Optional. Tags to organize related
                  resources.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "user_id": "str",  # Optional. Id of user that created the
              knowledge base.
            "uuid": "str"  # Optional. Unique id for knowledge base.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_api_keys(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Model API Keys.

To list all model API keys, send a GET request to /v2/gen-ai/models/api_keys.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_infos": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. Created by.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "name": "str",  # Optional. Name.
            "secret_key": "str",  # Optional. Api key infos.
            "uuid": "str"  # Optional. Uuid.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_catalog(*, page: Optional[int] = None, limit: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Model Catalog.

Returns all available models.

Parameters:
  • page (int) – Default value is None.

  • limit (int) – Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": [
        {
            "availability": [
                "str"  # Optional.
            ],
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional.
            ],
            "context_window": "str",  # Optional. Specs (flat).
            "creator": "str",  # Optional. Model creator/developer (e.g.,
              "Meta", "Anthropic", "OpenAI").
            "id": "str",  # Optional. Identity.
            "model_id": "str",  # Optional. Model identifier used for API
              calls (e.g., "llama3.1-70b-instruct").
            "name": "str",  # Optional.
            "parameter_count": 0.0,  # Optional.
            "pricing": {
                "input_price_per_million": 0.0,  # Optional. Pricing
                  per million tokens (aligns with existing ModelPrice pattern).
                "output_price_per_million": 0.0,  # Optional. Pricing
                  per million tokens (aligns with existing ModelPrice pattern).
                "price_per_audio": 0.0,  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
                "price_per_image": 0.0,  # Optional. Unit-based
                  pricing for non-token models (e.g., Fal AI image/video/audio
                  generation, speech models). At most one of these is typically
                  populated per model. Token-based models (chat, embeddings) leave all
                  of these at 0 and populate input_price_per_million /
                  output_price_per_million instead.
                "price_per_megapixel": 0.0,  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
                "price_per_second": 0.0,  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
                "price_per_thousand_characters": 0.0,  # Optional.
                  Pricing per million tokens (aligns with existing ModelPrice pattern).
                "price_per_video": 0.0  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
            },
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "short_description": "str",  # Optional.
            "type": "str"  # Optional.
        }
    ],
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_evaluation_metrics(**kwargs: Any) MutableMapping[str, Any]

List Model Evaluation Metrics.

To list all available metrics for model evaluation, send a GET request to /v2/genai/model_evaluation_metrics.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "metrics": [
        {
            "category": "METRIC_CATEGORY_UNSPECIFIED",  # Optional.
              Default value is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
              "METRIC_CATEGORY_UNSPECIFIED", "METRIC_CATEGORY_CORRECTNESS",
              "METRIC_CATEGORY_USER_OUTCOMES", "METRIC_CATEGORY_SAFETY_AND_SECURITY",
              "METRIC_CATEGORY_CONTEXT_QUALITY", and "METRIC_CATEGORY_MODEL_FIT".
            "description": "str",  # Optional. List of model evaluation
              metrics.
            "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED",  #
              Optional. Default value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
              determines whether a metric belongs to agent evaluation or model
              evaluation. For backwards compatibility, UNSPECIFIED defaults to agent
              metrics only in list operations. Known values are:
              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
              "EVALUATION_SCOPE_MODEL".
            "inverted": bool,  # Optional. If true, the metric is
              inverted, meaning that a lower value is better.
            "is_metric_goal": bool,  # Optional. List of model evaluation
              metrics.
            "metric_name": "str",  # Optional. List of model evaluation
              metrics.
            "metric_rank": 0,  # Optional. List of model evaluation
              metrics.
            "metric_type": "METRIC_TYPE_UNSPECIFIED",  # Optional.
              Default value is "METRIC_TYPE_UNSPECIFIED". Known values are:
              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
              "METRIC_TYPE_MODEL_SAFETY".
            "metric_uuid": "str",  # Optional. List of model evaluation
              metrics.
            "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",  #
              Optional. Default value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
              are: "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
              "METRIC_VALUE_TYPE_STRING", and "METRIC_VALUE_TYPE_PERCENTAGE".
            "range_max": 0.0,  # Optional. The maximum value for the
              metric.
            "range_min": 0.0  # Optional. The minimum value for the
              metric.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_evaluation_runs(*, eval_preset_uuid: Optional[str] = None, status: str = 'MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED', page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Model Evaluation Runs.

To list model evaluation runs, send a GET request to /v2/genai/model_evaluation_runs.

Parameters:
  • eval_preset_uuid (str) – UUID of the evaluation preset to filter by. Default value is None.

  • status (str) – Filter by evaluation run status. Known values are: “MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED”, “MODEL_EVALUATION_RUN_QUEUED”, “MODEL_EVALUATION_RUN_RUNNING_DATASET”, “MODEL_EVALUATION_RUN_EVALUATING_RESULTS”, “MODEL_EVALUATION_RUN_CANCELLING”, “MODEL_EVALUATION_RUN_CANCELLED”, “MODEL_EVALUATION_RUN_SUCCESSFUL”, “MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL”, and “MODEL_EVALUATION_RUN_FAILED”. Default value is “MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED”.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "runs": [
        {
            "candidate_model_name": "str",  # Optional. Name of the
              candidate model being evaluated.
            "candidate_model_source":
              "CANDIDATE_MODEL_SOURCE_SERVERLESS",  # Optional. Default value is
              "CANDIDATE_MODEL_SOURCE_SERVERLESS". Whether inference runs against the
              serverless platform, a dedicated deployment, or a model router. Known
              values are: "CANDIDATE_MODEL_SOURCE_SERVERLESS",
              "CANDIDATE_MODEL_SOURCE_DEDICATED", and "CANDIDATE_MODEL_SOURCE_ROUTER".
            "candidate_model_uuid": "str",  # Optional. UUID of the
              candidate model being evaluated.
            "created_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when the run was created.
            "dataset_name": "str",  # Optional. Name of the dataset used
              for evaluation.
            "dataset_uuid": "str",  # Optional. UUID of the dataset used
              for evaluation.
            "eval_run_uuid": "str",  # Optional. UUID of the evaluation
              run.
            "judge_model_name": "str",  # Optional. Summary view of
              evaluation runs for the run history list.
            "judge_model_uuid": "str",  # Optional. Judge model used to
              score responses.
            "name": "str",  # Optional. Name of the evaluation run.
            "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"  #
              Optional. Default value is "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED".
              Model Evaluation Run Statuses. Known values are:
              "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED", "MODEL_EVALUATION_RUN_QUEUED",
              "MODEL_EVALUATION_RUN_RUNNING_DATASET",
              "MODEL_EVALUATION_RUN_EVALUATING_RESULTS",
              "MODEL_EVALUATION_RUN_CANCELLING", "MODEL_EVALUATION_RUN_CANCELLED",
              "MODEL_EVALUATION_RUN_SUCCESSFUL",
              "MODEL_EVALUATION_RUN_PARTIALLY_SUCCESSFUL", and
              "MODEL_EVALUATION_RUN_FAILED".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_router_presets(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Model Router Presets.

To list model router presets, send a GET request to /v2/gen-ai/models/routers/presets.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "presets": [
        {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "display_name": "str",  # Optional. Display name for UI
              surfaces.
            "long_description": "str",  # Optional. Long description for
              details views.
            "short_description": "str",  # Optional. Short description
              for list views.
            "slug": "str"  # Optional. Stable slug for routing usage.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_router_task_presets(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Model Router Task Presets.

To list model router task presets, send a GET request to /v2/gen-ai/models/routers/tasks/presets.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "tasks": [
        {
            "category": "str",  # Optional. Higher-level grouping used by
              the UI.
            "description": "str",  # Optional. Task description.
            "models": [
                "str"  # Optional. Default models assigned to this
                  task.
            ],
            "name": "str",  # Optional. Display name.
            "selection_policy": {
                "prefer": "str"  # Optional. One of: none, cheapest,
                  fastest.
            },
            "tags": [
                "str"  # Optional. Lightweight labels for filtering.
            ],
            "task_slug": "str"  # Optional. Task slug.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_model_routers(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Model Routers.

To list model routers, send a GET request to /v2/gen-ai/models/routers.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "model_routers": [
        {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_models(*, usecases: Optional[List[str]] = None, public_only: Optional[bool] = None, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List Available Models.

To list all models, send a GET request to /v2/gen-ai/models.

Parameters:
  • usecases (list[str]) –

    Include only models defined for the listed usecases.

    • MODEL_USECASE_UNKNOWN: The use case of the model is unknown

    • MODEL_USECASE_AGENT: The model maybe used in an agent

    • MODEL_USECASE_FINETUNED: The model maybe used for fine tuning

    • MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models)

    • MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails

    • MODEL_USECASE_REASONING: The model usecase for reasoning

    • MODEL_USECASE_SERVERLESS: The model usecase for serverless inference. Default value is None.

  • public_only (bool) – Only include models that are publicly available. Default value is None.

  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    },
    "models": [
        {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. Model capabilities (inference,
                  reasoning, vectorization, etc.).
            ],
            "context_window": "str",  # Optional. Context window (maximum
              tokens).
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Model description.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "id": "str",  # Optional. Human-readable model identifier.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "model_availability": "str",  # Optional. Model availability
              (serverless, dedicated, etc.).
            "name": "str",  # Optional. Display name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "pricing": {
                "input_price_per_million": 0.0,  # Optional. Pricing
                  per million tokens (aligns with existing ModelPrice pattern).
                "output_price_per_million": 0.0,  # Optional. Pricing
                  per million tokens (aligns with existing ModelPrice pattern).
                "price_per_audio": 0.0,  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
                "price_per_image": 0.0,  # Optional. Unit-based
                  pricing for non-token models (e.g., Fal AI image/video/audio
                  generation, speech models). At most one of these is typically
                  populated per model. Token-based models (chat, embeddings) leave all
                  of these at 0 and populate input_price_per_million /
                  output_price_per_million instead.
                "price_per_megapixel": 0.0,  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
                "price_per_second": 0.0,  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
                "price_per_thousand_characters": 0.0,  # Optional.
                  Pricing per million tokens (aligns with existing ModelPrice pattern).
                "price_per_video": 0.0  # Optional. Pricing per
                  million tokens (aligns with existing ModelPrice pattern).
            },
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_openai_api_keys(*, page: Optional[int] = None, per_page: Optional[int] = None, **kwargs: Any) MutableMapping[str, Any]

List OpenAI API Keys.

To list all OpenAI API keys, send a GET request to /v2/gen-ai/openai/keys.

Parameters:
  • page (int) – Page number. Default value is None.

  • per_page (int) – Items per page. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_infos": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        }
    ],
    "links": {
        "pages": {
            "first": "str",  # Optional. First page.
            "last": "str",  # Optional. Last page.
            "next": "str",  # Optional. Next page.
            "previous": "str"  # Optional. Previous page.
        }
    },
    "meta": {
        "page": 0,  # Optional. The current page.
        "pages": 0,  # Optional. Total number of pages.
        "total": 0  # Optional. Total amount of items over all pages.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_workspaces(**kwargs: Any) MutableMapping[str, Any]

List Workspaces.

To list all workspaces, send a GET request to /v2/gen-ai/workspaces.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "workspaces": [
        {
            "agents": [
                {
                    "anthropic_api_key": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Key creation date.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Key deleted date.
                        "name": "str",  # Optional. Name.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Key last updated date.
                        "uuid": "str"  # Optional. Uuid.
                    },
                    "api_key_infos": [
                        {
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date.
                            "created_by": "str",  #
                              Optional. Created by.
                            "deleted_at": "2020-02-20
                              00:00:00",  # Optional. Deleted date.
                            "name": "str",  # Optional.
                              Name.
                            "secret_key": "str",  #
                              Optional. Api key infos.
                            "uuid": "str"  # Optional.
                              Uuid.
                        }
                    ],
                    "api_keys": [
                        {
                            "api_key": "str"  # Optional.
                              Api key.
                        }
                    ],
                    "chatbot": {
                        "allowed_domains": [
                            "str"  # Optional. A Chatbot.
                        ],
                        "button_background_color": "str",  #
                          Optional. A Chatbot.
                        "logo": "str",  # Optional. A
                          Chatbot.
                        "name": "str",  # Optional. Name of
                          chatbot.
                        "primary_color": "str",  # Optional.
                          A Chatbot.
                        "secondary_color": "str",  #
                          Optional. A Chatbot.
                        "starting_message": "str"  #
                          Optional. A Chatbot.
                    },
                    "chatbot_identifiers": [
                        {
                            "agent_chatbot_identifier":
                              "str"  # Optional. Agent chatbot identifier.
                        }
                    ],
                    "child_agents": [
                        ...
                    ],
                    "conversation_logs_enabled": bool,  #
                      Optional. Whether conversation logs are enabled for the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "deployment": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "name": "str",  # Optional. Name.
                        "status": "STATUS_UNKNOWN",  #
                          Optional. Default value is "STATUS_UNKNOWN". Known values
                          are: "STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT",
                          "STATUS_DEPLOYING", "STATUS_RUNNING", "STATUS_FAILED",
                          "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
                          "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and
                          "STATUS_BUILDING".
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "url": "str",  # Optional. Access
                          your deployed agent here.
                        "uuid": "str",  # Optional. Unique
                          id.
                        "visibility": "VISIBILITY_UNKNOWN"  #
                          Optional. Default value is "VISIBILITY_UNKNOWN". *
                          VISIBILITY_UNKNOWN: The status of the deployment is unknown
                          * VISIBILITY_DISABLED: The deployment is disabled and will no
                          longer service requests   * VISIBILITY_PLAYGROUND:
                          Deprecated: No longer a valid state   * VISIBILITY_PUBLIC:
                          The deployment is public and will service requests from the
                          public internet   * VISIBILITY_PRIVATE: The deployment is
                          private and will only service requests from other agents, or
                          through API keys. Known values are: "VISIBILITY_UNKNOWN",
                          "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
                          "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
                    },
                    "description": "str",  # Optional.
                      Description of agent.
                    "functions": [
                        {
                            "api_key": "str",  #
                              Optional. Api key.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "created_by": "str",  #
                              Optional. Created by user id from DO.
                            "description": "str",  #
                              Optional. Agent description.
                            "faas_name": "str",  #
                              Optional. Agents.
                            "faas_namespace": "str",  #
                              Optional. Agents.
                            "input_schema": {},  #
                              Optional. Any object.
                            "name": "str",  # Optional.
                              Name.
                            "output_schema": {},  #
                              Optional. Any object.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "url": "str",  # Optional.
                              Download your agent here.
                            "uuid": "str"  # Optional.
                              Unique id.
                        }
                    ],
                    "guardrails": [
                        {
                            "agent_uuid": "str",  #
                              Optional. The guardrails the agent is attached to.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. The guardrails the agent is
                              attached to.
                            "default_response": "str",  #
                              Optional. The guardrails the agent is attached to.
                            "description": "str",  #
                              Optional. The guardrails the agent is attached to.
                            "guardrail_uuid": "str",  #
                              Optional. The guardrails the agent is attached to.
                            "is_attached": bool,  #
                              Optional. The guardrails the agent is attached to.
                            "is_default": bool,  #
                              Optional. The guardrails the agent is attached to.
                            "metadata": {},  # Optional.
                              Any object.
                            "name": "str",  # Optional.
                              The guardrails the agent is attached to.
                            "priority": 0,  # Optional.
                              The guardrails the agent is attached to.
                            "type":
                              "GUARDRAIL_TYPE_UNKNOWN",  # Optional. Default value is
                              "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                              "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                              "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                              "GUARDRAIL_TYPE_CONTENT_MODERATION".
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. The guardrails the agent is
                              attached to.
                            "uuid": "str"  # Optional.
                              The guardrails the agent is attached to.
                        }
                    ],
                    "if_case": "str",  # Optional. Agents.
                    "instruction": "str",  # Optional. Agent
                      instruction. Instructions help your agent to perform its job
                      effectively. See `Write Effective Agent Instructions
                      <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
                      for best practices.
                    "k": 0,  # Optional. Agents.
                    "knowledge_bases": [
                        {
                            "added_to_agent_at":
                              "2020-02-20 00:00:00",  # Optional. Time when the
                              knowledge base was added to the agent.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "database_id": "str",  #
                              Optional. Knowledge bases.
                            "embedding_model_uuid":
                              "str",  # Optional. Knowledge bases.
                            "is_public": bool,  #
                              Optional. Whether the knowledge base is public or not.
                            "last_indexing_job": {
"completed_datasources": 0,  # Optional. Number of
                                  datasources indexed completed.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "data_source_jobs": [
                                    {
"completed_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source
                                          completed indexing.
"data_source_uuid": "str",  # Optional. Uuid
                                          of the indexed data source.
"error_details": "str",  # Optional. A
                                          detailed error description.
"error_msg": "str",  # Optional. A string
                                          code provinding a hint which part of the
                                          system experienced an error.
"failed_item_count": "str",  # Optional.
                                          Total count of files that have failed.
"indexed_file_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"indexed_item_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"removed_item_count": "str",  # Optional.
                                          Total count of files that have been removed.
"skipped_item_count": "str",  # Optional.
                                          Total count of files that have been skipped.
"started_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source started
                                          indexing.
"status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                                          Optional. Default value is
                                          "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                          are: "DATA_SOURCE_STATUS_UNKNOWN",
                                          "DATA_SOURCE_STATUS_IN_PROGRESS",
                                          "DATA_SOURCE_STATUS_UPDATED",
                                          "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                          "DATA_SOURCE_STATUS_NOT_UPDATED",
                                          "DATA_SOURCE_STATUS_FAILED", and
                                          "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size
                                          of files in data source in bytes.
"total_bytes_indexed": "str",  # Optional.
                                          Total size of files in data source in bytes
                                          that have been indexed.
"total_file_count": "str"  # Optional. Total
                                          file count in the data source.
                                    }
                                ],
                                "data_source_uuids":
                                  [
                                    "str"  #
                                      Optional. IndexingJob description.
                                ],
                                "finished_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
"is_report_available": bool,  # Optional. Boolean
                                  value to determine if the indexing job details are
                                  available.
"knowledge_base_uuid": "str",  # Optional. Knowledge
                                  base id.
                                "phase":
                                  "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value
                                  is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                                  "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                                  "BATCH_JOB_PHASE_RUNNING",
                                  "BATCH_JOB_PHASE_SUCCEEDED",
                                  "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR",
                                  and "BATCH_JOB_PHASE_CANCELLED".
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
                                "status":
                                  "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
                                  value is "INDEX_JOB_STATUS_UNKNOWN". Known values
                                  are: "INDEX_JOB_STATUS_UNKNOWN",
                                  "INDEX_JOB_STATUS_PARTIAL",
                                  "INDEX_JOB_STATUS_IN_PROGRESS",
                                  "INDEX_JOB_STATUS_COMPLETED",
                                  "INDEX_JOB_STATUS_FAILED",
                                  "INDEX_JOB_STATUS_NO_CHANGES",
                                  "INDEX_JOB_STATUS_PENDING", and
                                  "INDEX_JOB_STATUS_CANCELLED".
                                "tokens": 0,  #
                                  Optional. Number of tokens [This field is
                                  deprecated].
                                "total_datasources":
                                  0,  # Optional. Number of datasources being indexed.
                                "total_tokens":
                                  "str",  # Optional. Total Tokens Consumed By the
                                  Indexing Job.
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "uuid": "str"  #
                                  Optional. Unique id.
                            },
                            "name": "str",  # Optional.
                              Name of knowledge base.
                            "project_id": "str",  #
                              Optional. Knowledge bases.
                            "region": "str",  # Optional.
                              Region code.
                            "reranking_config": {
                                "enabled": bool,  #
                                  Optional. Whether reranking is enabled for retrieval.
                                "model": "str"  #
                                  Optional. Reranker model internal name.
                            },
                            "tags": [
                                "str"  # Optional.
                                  Tags to organize related resources.
                            ],
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "user_id": "str",  #
                              Optional. Id of user that created the knowledge base.
                            "uuid": "str"  # Optional.
                              Unique id for knowledge base.
                        }
                    ],
                    "logging_config": {
                        "galileo_project_id": "str",  #
                          Optional. Galileo project identifier.
                        "galileo_project_name": "str",  #
                          Optional. Name of the Galileo project.
                        "insights_enabled": bool,  #
                          Optional. Whether insights are enabled.
                        "insights_enabled_at": "2020-02-20
                          00:00:00",  # Optional. Timestamp when insights were enabled.
                        "log_stream_id": "str",  # Optional.
                          Identifier for the log stream.
                        "log_stream_name": "str"  # Optional.
                          Name of the log stream.
                    },
                    "max_tokens": 0,  # Optional. Agents.
                    "mcp_servers": [
                        {
                            "allowed_tools": [
                                "str"  # Optional.
                                  Optional list of allowed tool names to expose from
                                  this server.
                            ],
                            "authorization": "str",  #
                              Optional. Optional authorization header value for the MCP
                              server.
                            "headers": {
                                "str": "str"  #
                                  Optional. Optional additional headers to send to the
                                  MCP server.
                            },
                            "server_label": "str",  #
                              Optional. A label identifying this MCP server.
                            "server_url": "str"  #
                              Optional. The URL of the MCP server.
                        }
                    ],
                    "model": {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    },
                    "model_provider_key": {
                        "api_key_uuid": "str",  # Optional.
                          API key ID.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Key creation date.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Key deleted date.
                        "models": [
                            {
                                "agreement": {
"description": "str",  # Optional. Agreement
                                      Description.
                                    "name":
                                      "str",  # Optional. Agreement Description.
                                    "url": "str",
                                      # Optional. Agreement Description.
                                    "uuid": "str"
                                      # Optional. Agreement Description.
                                },
                                "benchmark_score":
                                  {},  # Optional. Benchmark scores for this model,
                                  stored as arbitrary JSON.
                                "capabilities": [
                                    "str"  #
                                      Optional. High-level capabilities (e.g.
                                      tool_calling, vision, streaming).
                                ],
                                "context_window":
                                  "str",  # Optional. Context window size in tokens.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "endpoints": [
                                    {
"capabilities": [
"str"  # Optional. Capabilities supported
                                              by this endpoint (e.g. input_text,
                                              output_text, input_image).
                                        ],
"endpoint": "str"  # Optional. The endpoint
                                          path (e.g. /chat/responses).
                                    }
                                ],
                                "inference_name":
                                  "str",  # Optional. Internally used name.
                                "inference_version":
                                  "str",  # Optional. Internally used version.
                                "is_foundational":
                                  bool,  # Optional. True if it is a foundational model
                                  provided by do.
"kb_default_chunk_size": 0,  # Optional. Default
                                  chunking size limit to show in UI.
                                "kb_max_chunk_size":
                                  0,  # Optional. Maximum chunk size limit of model.
                                "kb_min_chunk_size":
                                  0,  # Optional. Minimum chunking size token limits if
                                  model supports KNOWLEDGEBASE usecase.
                                "lifecycle_status":
                                  "str",  # Optional. Lifecycle status of the model
                                  (internal, public-preview, active, deprecated,
                                  end_of_life).
                                "metadata": {},  #
                                  Optional. Additional meta data.
                                "modalities": {
                                    "input": [
                                        "str"
                                          # Optional. Input/output modalities.
                                    ],
                                    "output": [
                                        "str"
                                          # Optional. Input/output modalities.
                                    ]
                                },
                                "name": "str",  #
                                  Optional. Name of the model.
                                "parameter_count":
                                  0.0,  # Optional. Parameter count in billions.
                                "parent_uuid": "str",
                                  # Optional. Unique id of the model, this model is
                                  based on.
                                "provider":
                                  "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default
                                  value is "MODEL_PROVIDER_DIGITALOCEAN". Known values
                                  are: "MODEL_PROVIDER_DIGITALOCEAN",
                                  "MODEL_PROVIDER_ANTHROPIC", and
                                  "MODEL_PROVIDER_OPENAI".
                                "reasoning_efforts":
                                  [
                                    "str"  #
                                      Optional. Available reasoning efforts for this
                                      model.
                                ],
                                "settings": [
                                    {
"default_string": "str",  # Optional. String
                                          default value (for type="dropdown", e.g.
                                          "medium").
"default_value": 0.0,  # Optional. Numeric
                                          default value (for type="number").
"max": 0.0,  # Optional. Maximum allowed
                                          value (for type="number").
"min": 0.0,  # Optional. Minimum allowed
                                          value (for type="number").
"name": "str",  # Optional. Setting key name
                                          (e.g. "max_tokens", "temperature",
                                          "resolution").
"options": [
"str"  # Optional. Allowed values for
                                              dropdown selections (for
                                              type="dropdown").
                                        ],
"step": 0.0,  # Optional. Step increment for
                                          numeric settings (for type="number").
"type": "str"  # Optional. Setting value
                                          type: "number" or "dropdown".
                                    }
                                ],
                                "thinking": bool,  #
                                  Optional. Whether this model supports extended
                                  thinking (Anthropic models).
                                "type": "str",  #
                                  Optional. Model type (chat, embedding, image,
                                  reasoning, coding).
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "upload_complete":
                                  bool,  # Optional. Model has been fully uploaded.
                                "url": "str",  #
                                  Optional. Download url.
                                "usecases": [
                                    "str"  #
                                      Optional. Usecases of the model.
                                ],
                                "uuid": "str",  #
                                  Optional. Unique id.
                                "version": {
                                    "major": 0,
                                      # Optional. Major version number.
                                    "minor": 0,
                                      # Optional. Minor version number.
                                    "patch": 0  #
                                      Optional. Patch version number.
                                }
                            }
                        ],
                        "name": "str",  # Optional. Name of
                          the key.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "updated_at": "2020-02-20 00:00:00"
                          # Optional. Key last updated date.
                    },
                    "model_router": {
                        "config": {
                            "fallback_models": [
                                "str"  # Optional.
                                  Router-level fallback models.
                            ],
                            "policies": [
                                {
"custom_task": {
"description": "str",  # Optional. Short task
                                          description.
"name": "str"  # Optional. Task name.
                                    },
                                    "models": [
                                        "str"
                                          # Optional. Models assigned to the task.
                                    ],
"selection_policy": {
"prefer": "str"  # Optional. One of: none,
                                          cheapest, fastest.
                                    },
                                    "task_slug":
                                      "str"  # Optional. Task slug.
                                }
                            ]
                        },
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "description": "str",  # Optional.
                          Description.
                        "name": "str",  # Optional. Name of
                          the model router.
                        "regions": [
                            "str"  # Optional. Target
                              regions for the router.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Agent name.
                    "openai_api_key": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Key creation date.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Key deleted date.
                        "models": [
                            {
                                "agreement": {
"description": "str",  # Optional. Agreement
                                      Description.
                                    "name":
                                      "str",  # Optional. Agreement Description.
                                    "url": "str",
                                      # Optional. Agreement Description.
                                    "uuid": "str"
                                      # Optional. Agreement Description.
                                },
                                "benchmark_score":
                                  {},  # Optional. Benchmark scores for this model,
                                  stored as arbitrary JSON.
                                "capabilities": [
                                    "str"  #
                                      Optional. High-level capabilities (e.g.
                                      tool_calling, vision, streaming).
                                ],
                                "context_window":
                                  "str",  # Optional. Context window size in tokens.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "endpoints": [
                                    {
"capabilities": [
"str"  # Optional. Capabilities supported
                                              by this endpoint (e.g. input_text,
                                              output_text, input_image).
                                        ],
"endpoint": "str"  # Optional. The endpoint
                                          path (e.g. /chat/responses).
                                    }
                                ],
                                "inference_name":
                                  "str",  # Optional. Internally used name.
                                "inference_version":
                                  "str",  # Optional. Internally used version.
                                "is_foundational":
                                  bool,  # Optional. True if it is a foundational model
                                  provided by do.
"kb_default_chunk_size": 0,  # Optional. Default
                                  chunking size limit to show in UI.
                                "kb_max_chunk_size":
                                  0,  # Optional. Maximum chunk size limit of model.
                                "kb_min_chunk_size":
                                  0,  # Optional. Minimum chunking size token limits if
                                  model supports KNOWLEDGEBASE usecase.
                                "lifecycle_status":
                                  "str",  # Optional. Lifecycle status of the model
                                  (internal, public-preview, active, deprecated,
                                  end_of_life).
                                "metadata": {},  #
                                  Optional. Additional meta data.
                                "modalities": {
                                    "input": [
                                        "str"
                                          # Optional. Input/output modalities.
                                    ],
                                    "output": [
                                        "str"
                                          # Optional. Input/output modalities.
                                    ]
                                },
                                "name": "str",  #
                                  Optional. Name of the model.
                                "parameter_count":
                                  0.0,  # Optional. Parameter count in billions.
                                "parent_uuid": "str",
                                  # Optional. Unique id of the model, this model is
                                  based on.
                                "provider":
                                  "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default
                                  value is "MODEL_PROVIDER_DIGITALOCEAN". Known values
                                  are: "MODEL_PROVIDER_DIGITALOCEAN",
                                  "MODEL_PROVIDER_ANTHROPIC", and
                                  "MODEL_PROVIDER_OPENAI".
                                "reasoning_efforts":
                                  [
                                    "str"  #
                                      Optional. Available reasoning efforts for this
                                      model.
                                ],
                                "settings": [
                                    {
"default_string": "str",  # Optional. String
                                          default value (for type="dropdown", e.g.
                                          "medium").
"default_value": 0.0,  # Optional. Numeric
                                          default value (for type="number").
"max": 0.0,  # Optional. Maximum allowed
                                          value (for type="number").
"min": 0.0,  # Optional. Minimum allowed
                                          value (for type="number").
"name": "str",  # Optional. Setting key name
                                          (e.g. "max_tokens", "temperature",
                                          "resolution").
"options": [
"str"  # Optional. Allowed values for
                                              dropdown selections (for
                                              type="dropdown").
                                        ],
"step": 0.0,  # Optional. Step increment for
                                          numeric settings (for type="number").
"type": "str"  # Optional. Setting value
                                          type: "number" or "dropdown".
                                    }
                                ],
                                "thinking": bool,  #
                                  Optional. Whether this model supports extended
                                  thinking (Anthropic models).
                                "type": "str",  #
                                  Optional. Model type (chat, embedding, image,
                                  reasoning, coding).
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "upload_complete":
                                  bool,  # Optional. Model has been fully uploaded.
                                "url": "str",  #
                                  Optional. Download url.
                                "usecases": [
                                    "str"  #
                                      Optional. Usecases of the model.
                                ],
                                "uuid": "str",  #
                                  Optional. Unique id.
                                "version": {
                                    "major": 0,
                                      # Optional. Major version number.
                                    "minor": 0,
                                      # Optional. Minor version number.
                                    "patch": 0  #
                                      Optional. Patch version number.
                                }
                            }
                        ],
                        "name": "str",  # Optional. Name.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Key last updated date.
                        "uuid": "str"  # Optional. Uuid.
                    },
                    "parent_agents": [
                        ...
                    ],
                    "project_id": "str",  # Optional. Agents.
                    "provide_citations": bool,  # Optional.
                      Whether the agent should provide in-response citations.
                    "reasoning_effort": "str",  # Optional. The
                      reasoning effort for the agent.
                    "region": "str",  # Optional. Region code.
                    "retrieval_method":
                      "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default value is
                      "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
                      retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The
                      retrieval method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The
                      retrieval method is step back   * RETRIEVAL_METHOD_SUB_QUERIES:
                      The retrieval method is sub queries   * RETRIEVAL_METHOD_NONE:
                      The retrieval method is none. Known values are:
                      "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
                      "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
                      "RETRIEVAL_METHOD_NONE".
                    "route_created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation of route date / time.
                    "route_created_by": "str",  # Optional.
                      Agents.
                    "route_name": "str",  # Optional. Route name.
                    "route_uuid": "str",  # Optional. Agents.
                    "tags": [
                        "str"  # Optional. Agent tag to
                          organize related resources.
                    ],
                    "temperature": 0.0,  # Optional. Agents.
                    "template": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. The agent template's creation date.
                        "description": "str",  # Optional.
                          Deprecated - Use summary instead.
                        "guardrails": [
                            {
                                "priority": 0,  #
                                  Optional. Priority of the guardrail.
                                "uuid": "str"  #
                                  Optional. Uuid of the guardrail.
                            }
                        ],
                        "instruction": "str",  # Optional.
                          Instructions for the agent template.
                        "k": 0,  # Optional. The 'k' value
                          for the agent template.
                        "knowledge_bases": [
                            {
                                "added_to_agent_at":
                                  "2020-02-20 00:00:00",  # Optional. Time when the
                                  knowledge base was added to the agent.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "database_id": "str",
                                  # Optional. List of knowledge bases associated with
                                  the agent template.
"embedding_model_uuid": "str",  # Optional. List of
                                  knowledge bases associated with the agent template.
                                "is_public": bool,  #
                                  Optional. Whether the knowledge base is public or
                                  not.
                                "last_indexing_job":
                                  {
"completed_datasources": 0,  # Optional. Number
                                      of datasources indexed completed.
                                    "created_at":
                                      "2020-02-20 00:00:00",  # Optional. Creation date
                                      / time.
"data_source_jobs": [
                                        {
"completed_at": "2020-02-20 00:00:00",  #
                                              Optional. Timestamp when data source
                                              completed indexing.
"data_source_uuid": "str",  # Optional.
                                              Uuid of the indexed data source.
"error_details": "str",  # Optional. A
                                              detailed error description.
"error_msg": "str",  # Optional. A string
                                              code provinding a hint which part of the
                                              system experienced an error.
"failed_item_count": "str",  # Optional.
                                              Total count of files that have failed.
"indexed_file_count": "str",  # Optional.
                                              Total count of files that have been
                                              indexed.
"indexed_item_count": "str",  # Optional.
                                              Total count of files that have been
                                              indexed.
"removed_item_count": "str",  # Optional.
                                              Total count of files that have been
                                              removed.
"skipped_item_count": "str",  # Optional.
                                              Total count of files that have been
                                              skipped.
"started_at": "2020-02-20 00:00:00",  #
                                              Optional. Timestamp when data source
                                              started indexing.
"status": "DATA_SOURCE_STATUS_UNKNOWN",
                                              # Optional. Default value is
                                              "DATA_SOURCE_STATUS_UNKNOWN". Known
                                              values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                                              "DATA_SOURCE_STATUS_UPDATED",
                                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                                              "DATA_SOURCE_STATUS_FAILED", and
                                              "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total
                                              size of files in data source in bytes.
"total_bytes_indexed": "str",  #
                                              Optional. Total size of files in data
                                              source in bytes that have been indexed.
"total_file_count": "str"  # Optional.
                                              Total file count in the data source.
                                        }
                                    ],
"data_source_uuids": [
                                        "str"
                                          # Optional. IndexingJob description.
                                    ],
"finished_at": "2020-02-20 00:00:00",  #
                                      Optional. IndexingJob description.
"is_report_available": bool,  # Optional. Boolean
                                      value to determine if the indexing job details
                                      are available.
"knowledge_base_uuid": "str",  # Optional.
                                      Knowledge base id.
                                    "phase":
                                      "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default
                                      value is "BATCH_JOB_PHASE_UNKNOWN". Known values
                                      are: "BATCH_JOB_PHASE_UNKNOWN",
                                      "BATCH_JOB_PHASE_PENDING",
                                      "BATCH_JOB_PHASE_RUNNING",
                                      "BATCH_JOB_PHASE_SUCCEEDED",
                                      "BATCH_JOB_PHASE_FAILED",
                                      "BATCH_JOB_PHASE_ERROR", and
                                      "BATCH_JOB_PHASE_CANCELLED".
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. IndexingJob
                                      description.
                                    "status":
                                      "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
                                      value is "INDEX_JOB_STATUS_UNKNOWN". Known values
                                      are: "INDEX_JOB_STATUS_UNKNOWN",
                                      "INDEX_JOB_STATUS_PARTIAL",
                                      "INDEX_JOB_STATUS_IN_PROGRESS",
                                      "INDEX_JOB_STATUS_COMPLETED",
                                      "INDEX_JOB_STATUS_FAILED",
                                      "INDEX_JOB_STATUS_NO_CHANGES",
                                      "INDEX_JOB_STATUS_PENDING", and
                                      "INDEX_JOB_STATUS_CANCELLED".
                                    "tokens": 0,
                                      # Optional. Number of tokens [This field is
                                      deprecated].
"total_datasources": 0,  # Optional. Number of
                                      datasources being indexed.
"total_tokens": "str",  # Optional. Total Tokens
                                      Consumed By the Indexing Job.
                                    "updated_at":
                                      "2020-02-20 00:00:00",  # Optional. Last
                                      modified.
                                    "uuid": "str"
                                      # Optional. Unique id.
                                },
                                "name": "str",  #
                                  Optional. Name of knowledge base.
                                "project_id": "str",
                                  # Optional. List of knowledge bases associated with
                                  the agent template.
                                "region": "str",  #
                                  Optional. Region code.
                                "reranking_config": {
                                    "enabled":
                                      bool,  # Optional. Whether reranking is enabled
                                      for retrieval.
                                    "model":
                                      "str"  # Optional. Reranker model internal name.
                                },
                                "tags": [
                                    "str"  #
                                      Optional. Tags to organize related resources.
                                ],
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "user_id": "str",  #
                                  Optional. Id of user that created the knowledge base.
                                "uuid": "str"  #
                                  Optional. Unique id for knowledge base.
                            }
                        ],
                        "long_description": "str",  #
                          Optional. The long description of the agent template.
                        "max_tokens": 0,  # Optional. The
                          max_tokens setting for the agent template.
                        "model": {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        },
                        "name": "str",  # Optional. Name of
                          the agent template.
                        "short_description": "str",  #
                          Optional. The short description of the agent template.
                        "summary": "str",  # Optional. The
                          summary of the agent template.
                        "tags": [
                            "str"  # Optional. List of
                              tags associated with the agent template.
                        ],
                        "temperature": 0.0,  # Optional. The
                          temperature setting for the agent template.
                        "template_type":
                          "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional. Default value is
                          "AGENT_TEMPLATE_TYPE_STANDARD". *
                          AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
                          * AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent
                          template. Known values are: "AGENT_TEMPLATE_TYPE_STANDARD"
                          and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                        "top_p": 0.0,  # Optional. The top_p
                          setting for the agent template.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. The agent template's last updated date.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "thinking_token_budget": 0,  # Optional. The
                      thinking token budget for Anthropic extended thinking (0 =
                      disabled).
                    "top_p": 0.0,  # Optional. Agents.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Access your agent
                      under this url.
                    "user_id": "str",  # Optional. Id of user
                      that created the agent.
                    "uuid": "str",  # Optional. Unique agent id.
                    "version_hash": "str",  # Optional. The
                      latest version of the agent.
                    "vpc_egress_ips": [
                        "str"  # Optional. VPC Egress IPs.
                    ],
                    "vpc_uuid": "str",  # Optional. Agents.
                    "workspace": ...
                }
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
regenerate_agent_api_key(agent_uuid: str, api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Regenerate API Key for an Agent.

To regenerate an agent API key, send a PUT request to /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • api_key_uuid (str) – API key ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Agent API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
regenerate_model_api_key(api_key_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Regenerate API Key for a Model.

To regenerate a model API key, send a PUT request to /v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate.

Parameters:

api_key_uuid (str) – API key ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Model API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
rollback_to_agent_version(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
rollback_to_agent_version(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Rollback to Agent Version.

To update to a specific agent version, send a PUT request to /v2/gen-ai/agents/{uuid}/versions.

Parameters:
  • uuid (str) – Agent unique identifier. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "uuid": "str",  # Optional. Agent unique identifier.
    "version_hash": "str"  # Optional. Unique identifier.
}

# response body for status code(s): 200
response == {
    "audit_header": {
        "actor_id": "str",  # Optional. An alternative way to provide auth
          information. for internal use only.
        "actor_ip": "str",  # Optional. An alternative way to provide auth
          information. for internal use only.
        "actor_uuid": "str",  # Optional. An alternative way to provide auth
          information. for internal use only.
        "context_urn": "str",  # Optional. An alternative way to provide auth
          information. for internal use only.
        "origin_application": "str",  # Optional. An alternative way to
          provide auth information. for internal use only.
        "user_id": "str",  # Optional. An alternative way to provide auth
          information. for internal use only.
        "user_uuid": "str"  # Optional. An alternative way to provide auth
          information. for internal use only.
    },
    "version_hash": "str"  # Optional. Unique identifier.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
run_evaluation_test_case(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
run_evaluation_test_case(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Run an Evaluation Test Case.

To run an evaluation test case, send a POST request to /v2/gen-ai/evaluation_runs.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_deployment_names": [
        "str"  # Optional. Agent deployment names to run the test case
          against (ADK agent workspaces).
    ],
    "agent_uuids": [
        "str"  # Optional. Agent UUIDs to run the test case against (legacy
          agents).
    ],
    "run_name": "str",  # Optional. The name of the run.
    "test_case_uuid": "str"  # Optional. Test-case UUID to run.
}

# response body for status code(s): 200
response == {
    "evaluation_run_uuids": [
        "str"  # Optional.
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_agent(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_agent(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an Agent.

To update an agent, send a PUT request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.

Parameters:
  • uuid (str) – Unique agent id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_log_insights_enabled": bool,  # Optional.
    "allowed_domains": [
        "str"  # Optional. Optional list of allowed domains for the chatbot -
          Must use fully qualified domain name (FQDN) such as https://example.com.
    ],
    "anthropic_key_uuid": "str",  # Optional. Optional anthropic key uuid for use
      with anthropic models.
    "clear_mcp_servers": bool,  # Optional. When true, removes all MCP servers
      from the agent. Use this instead of sending an empty mcp_servers array.
    "conversation_logs_enabled": bool,  # Optional. Optional update of
      conversation logs enabled.
    "description": "str",  # Optional. Agent description.
    "instruction": "str",  # Optional. Agent instruction. Instructions help your
      agent to perform its job effectively. See `Write Effective Agent Instructions
      <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
      for best practices.
    "k": 0,  # Optional. How many results should be considered from an attached
      knowledge base.
    "max_tokens": 0,  # Optional. Specifies the maximum number of tokens the
      model can process in a single input or output, set as a number between 1 and 512.
      This determines the length of each response.
    "mcp_servers": [
        {
            "allowed_tools": [
                "str"  # Optional. Optional list of allowed tool
                  names to expose from this server.
            ],
            "authorization": "str",  # Optional. Optional authorization
              header value for the MCP server.
            "headers": {
                "str": "str"  # Optional. Optional additional headers
                  to send to the MCP server.
            },
            "server_label": "str",  # Optional. A label identifying this
              MCP server.
            "server_url": "str"  # Optional. The URL of the MCP server.
        }
    ],
    "model_provider_key_uuid": "str",  # Optional. Optional Model Provider uuid
      for use with provider models.
    "model_router_uuid": "str",  # Optional.
    "model_uuid": "str",  # Optional. Identifier for the foundation model.
    "name": "str",  # Optional. Agent name.
    "open_ai_key_uuid": "str",  # Optional. Optional OpenAI key uuid for use with
      OpenAI models.
    "project_id": "str",  # Optional. The id of the DigitalOcean project this
      agent will belong to.
    "provide_citations": bool,  # Optional.
    "reasoning_effort": "str",  # Optional.
    "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default value is
      "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The retrieval method is
      unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite   *
      RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back   *
      RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries   *
      RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values are:
      "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
      "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
      "RETRIEVAL_METHOD_NONE".
    "router_preset_slug": "str",  # Optional.
    "tags": [
        "str"  # Optional. A set of abitrary tags to organize your agent.
    ],
    "temperature": 0.0,  # Optional. Controls the model"u2019s creativity,
      specified as a number between 0 and 1. Lower values produce more predictable and
      conservative responses, while higher values encourage creativity and variation.
    "thinking_token_budget": 0,  # Optional.
    "top_p": 0.0,  # Optional. Defines the cumulative probability threshold for
      word selection, specified as a number between 0 and 1. Higher values allow for
      more diverse outputs, while lower values ensure focused and coherent responses.
    "uuid": "str"  # Optional. Unique agent id.
}

# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_agent_api_key(agent_uuid: str, api_key_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_agent_api_key(agent_uuid: str, api_key_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update API Key for an Agent.

To update an agent API key, send a PUT request to /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • api_key_uuid (str) – API key ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuid": "str",  # Optional. Agent id.
    "api_key_uuid": "str",  # Optional. API key ID.
    "name": "str"  # Optional. Name.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Agent API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_agent_deployment_visibility(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_agent_deployment_visibility(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Agent Status.

Check whether an agent is public or private. To update the agent status, send a PUT request to /v2/gen-ai/agents/{uuid}/deployment_visibility.

Parameters:
  • uuid (str) – Unique id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "uuid": "str",  # Optional. Unique id.
    "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value is
      "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the deployment is
      unknown    * VISIBILITY_DISABLED: The deployment is disabled and will no longer
      service requests   * VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
      * VISIBILITY_PUBLIC: The deployment is public and will service requests from the
      public internet   * VISIBILITY_PRIVATE: The deployment is private and will only
      service requests from other agents, or through API keys. Known values are:
      "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
      "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
}

# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_agent_function(agent_uuid: str, function_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_agent_function(agent_uuid: str, function_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Function Route for an Agent.

To update the function route, send a PUT request to /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}.

Parameters:
  • agent_uuid (str) – Agent id. Required.

  • function_uuid (str) – Function id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuid": "str",  # Optional. Agent id.
    "description": "str",  # Optional. Funciton description.
    "faas_name": "str",  # Optional. The name of the function in the DigitalOcean
      functions platform.
    "faas_namespace": "str",  # Optional. The namespace of the function in the
      DigitalOcean functions platform.
    "function_name": "str",  # Optional. Function name.
    "function_uuid": "str",  # Optional. Function id.
    "input_schema": {},  # Optional. Describe the input schema for the function
      so the agent may call it.
    "output_schema": {}  # Optional. Describe the output schema for the function
      so the agent handle its response.
}

# response body for status code(s): 200
response == {
    "agent": {
        "anthropic_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "api_key_infos": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date.
                "created_by": "str",  # Optional. Created by.
                "deleted_at": "2020-02-20 00:00:00",  # Optional.
                  Deleted date.
                "name": "str",  # Optional. Name.
                "secret_key": "str",  # Optional. Api key infos.
                "uuid": "str"  # Optional. Uuid.
            }
        ],
        "api_keys": [
            {
                "api_key": "str"  # Optional. Api key.
            }
        ],
        "chatbot": {
            "allowed_domains": [
                "str"  # Optional. A Chatbot.
            ],
            "button_background_color": "str",  # Optional. A Chatbot.
            "logo": "str",  # Optional. A Chatbot.
            "name": "str",  # Optional. Name of chatbot.
            "primary_color": "str",  # Optional. A Chatbot.
            "secondary_color": "str",  # Optional. A Chatbot.
            "starting_message": "str"  # Optional. A Chatbot.
        },
        "chatbot_identifiers": [
            {
                "agent_chatbot_identifier": "str"  # Optional. Agent
                  chatbot identifier.
            }
        ],
        "child_agents": [
            ...
        ],
        "conversation_logs_enabled": bool,  # Optional. Whether conversation
          logs are enabled for the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "deployment": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "name": "str",  # Optional. Name.
            "status": "STATUS_UNKNOWN",  # Optional. Default value is
              "STATUS_UNKNOWN". Known values are: "STATUS_UNKNOWN",
              "STATUS_WAITING_FOR_DEPLOYMENT", "STATUS_DEPLOYING", "STATUS_RUNNING",
              "STATUS_FAILED", "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
              "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and "STATUS_BUILDING".
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "url": "str",  # Optional. Access your deployed agent here.
            "uuid": "str",  # Optional. Unique id.
            "visibility": "VISIBILITY_UNKNOWN"  # Optional. Default value
              is "VISIBILITY_UNKNOWN". * VISIBILITY_UNKNOWN: The status of the
              deployment is unknown    * VISIBILITY_DISABLED: The deployment is
              disabled and will no longer service requests   * VISIBILITY_PLAYGROUND:
              Deprecated: No longer a valid state   * VISIBILITY_PUBLIC: The deployment
              is public and will service requests from the public internet   *
              VISIBILITY_PRIVATE: The deployment is private and will only service
              requests from other agents, or through API keys. Known values are:
              "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED", "VISIBILITY_PLAYGROUND",
              "VISIBILITY_PUBLIC", and "VISIBILITY_PRIVATE".
        },
        "description": "str",  # Optional. Description of agent.
        "functions": [
            {
                "api_key": "str",  # Optional. Api key.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "created_by": "str",  # Optional. Created by user id
                  from DO.
                "description": "str",  # Optional. Agent description.
                "faas_name": "str",  # Optional. An Agent.
                "faas_namespace": "str",  # Optional. An Agent.
                "input_schema": {},  # Optional. Any object.
                "name": "str",  # Optional. Name.
                "output_schema": {},  # Optional. Any object.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Download your agent here.
                "uuid": "str"  # Optional. Unique id.
            }
        ],
        "guardrails": [
            {
                "agent_uuid": "str",  # Optional. The guardrails the
                  agent is attached to.
                "created_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "default_response": "str",  # Optional. The
                  guardrails the agent is attached to.
                "description": "str",  # Optional. The guardrails the
                  agent is attached to.
                "guardrail_uuid": "str",  # Optional. The guardrails
                  the agent is attached to.
                "is_attached": bool,  # Optional. The guardrails the
                  agent is attached to.
                "is_default": bool,  # Optional. The guardrails the
                  agent is attached to.
                "metadata": {},  # Optional. Any object.
                "name": "str",  # Optional. The guardrails the agent
                  is attached to.
                "priority": 0,  # Optional. The guardrails the agent
                  is attached to.
                "type": "GUARDRAIL_TYPE_UNKNOWN",  # Optional.
                  Default value is "GUARDRAIL_TYPE_UNKNOWN". Known values are:
                  "GUARDRAIL_TYPE_UNKNOWN", "GUARDRAIL_TYPE_JAILBREAK",
                  "GUARDRAIL_TYPE_SENSITIVE_DATA", and
                  "GUARDRAIL_TYPE_CONTENT_MODERATION".
                "updated_at": "2020-02-20 00:00:00",  # Optional. The
                  guardrails the agent is attached to.
                "uuid": "str"  # Optional. The guardrails the agent
                  is attached to.
            }
        ],
        "if_case": "str",  # Optional. An Agent.
        "instruction": "str",  # Optional. Agent instruction. Instructions
          help your agent to perform its job effectively. See `Write Effective Agent
          Instructions
          <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
          for best practices.
        "k": 0,  # Optional. An Agent.
        "knowledge_bases": [
            {
                "added_to_agent_at": "2020-02-20 00:00:00",  #
                  Optional. Time when the knowledge base was added to the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "database_id": "str",  # Optional. Knowledge bases.
                "embedding_model_uuid": "str",  # Optional. Knowledge
                  bases.
                "is_public": bool,  # Optional. Whether the knowledge
                  base is public or not.
                "last_indexing_job": {
                    "completed_datasources": 0,  # Optional.
                      Number of datasources indexed completed.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "data_source_jobs": [
                        {
                            "completed_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              completed indexing.
                            "data_source_uuid": "str",  #
                              Optional. Uuid of the indexed data source.
                            "error_details": "str",  #
                              Optional. A detailed error description.
                            "error_msg": "str",  #
                              Optional. A string code provinding a hint which part of
                              the system experienced an error.
                            "failed_item_count": "str",
                              # Optional. Total count of files that have failed.
                            "indexed_file_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "indexed_item_count": "str",
                              # Optional. Total count of files that have been indexed.
                            "removed_item_count": "str",
                              # Optional. Total count of files that have been removed.
                            "skipped_item_count": "str",
                              # Optional. Total count of files that have been skipped.
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. Timestamp when data source
                              started indexing.
                            "status":
                              "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default value
                              is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
                              "DATA_SOURCE_STATUS_UNKNOWN",
                              "DATA_SOURCE_STATUS_IN_PROGRESS",
                              "DATA_SOURCE_STATUS_UPDATED",
                              "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                              "DATA_SOURCE_STATUS_NOT_UPDATED",
                              "DATA_SOURCE_STATUS_FAILED", and
                              "DATA_SOURCE_STATUS_CANCELLED".
                            "total_bytes": "str",  #
                              Optional. Total size of files in data source in bytes.
                            "total_bytes_indexed": "str",
                              # Optional. Total size of files in data source in bytes
                              that have been indexed.
                            "total_file_count": "str"  #
                              Optional. Total file count in the data source.
                        }
                    ],
                    "data_source_uuids": [
                        "str"  # Optional. IndexingJob
                          description.
                    ],
                    "finished_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "is_report_available": bool,  # Optional.
                      Boolean value to determine if the indexing job details are
                      available.
                    "knowledge_base_uuid": "str",  # Optional.
                      Knowledge base id.
                    "phase": "BATCH_JOB_PHASE_UNKNOWN",  #
                      Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                      values are: "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                      "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                      "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                      "BATCH_JOB_PHASE_CANCELLED".
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. IndexingJob description.
                    "status": "INDEX_JOB_STATUS_UNKNOWN",  #
                      Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN". Known
                      values are: "INDEX_JOB_STATUS_UNKNOWN",
                      "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                      "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                      "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING", and
                      "INDEX_JOB_STATUS_CANCELLED".
                    "tokens": 0,  # Optional. Number of tokens
                      [This field is deprecated].
                    "total_datasources": 0,  # Optional. Number
                      of datasources being indexed.
                    "total_tokens": "str",  # Optional. Total
                      Tokens Consumed By the Indexing Job.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Name of knowledge base.
                "project_id": "str",  # Optional. Knowledge bases.
                "region": "str",  # Optional. Region code.
                "reranking_config": {
                    "enabled": bool,  # Optional. Whether
                      reranking is enabled for retrieval.
                    "model": "str"  # Optional. Reranker model
                      internal name.
                },
                "tags": [
                    "str"  # Optional. Tags to organize related
                      resources.
                ],
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "user_id": "str",  # Optional. Id of user that
                  created the knowledge base.
                "uuid": "str"  # Optional. Unique id for knowledge
                  base.
            }
        ],
        "logging_config": {
            "galileo_project_id": "str",  # Optional. Galileo project
              identifier.
            "galileo_project_name": "str",  # Optional. Name of the
              Galileo project.
            "insights_enabled": bool,  # Optional. Whether insights are
              enabled.
            "insights_enabled_at": "2020-02-20 00:00:00",  # Optional.
              Timestamp when insights were enabled.
            "log_stream_id": "str",  # Optional. Identifier for the log
              stream.
            "log_stream_name": "str"  # Optional. Name of the log stream.
        },
        "max_tokens": 0,  # Optional. An Agent.
        "mcp_servers": [
            {
                "allowed_tools": [
                    "str"  # Optional. Optional list of allowed
                      tool names to expose from this server.
                ],
                "authorization": "str",  # Optional. Optional
                  authorization header value for the MCP server.
                "headers": {
                    "str": "str"  # Optional. Optional additional
                      headers to send to the MCP server.
                },
                "server_label": "str",  # Optional. A label
                  identifying this MCP server.
                "server_url": "str"  # Optional. The URL of the MCP
                  server.
            }
        ],
        "model": {
            "agreement": {
                "description": "str",  # Optional. Agreement
                  Description.
                "name": "str",  # Optional. Agreement Description.
                "url": "str",  # Optional. Agreement Description.
                "uuid": "str"  # Optional. Agreement Description.
            },
            "benchmark_score": {},  # Optional. Benchmark scores for this
              model, stored as arbitrary JSON.
            "capabilities": [
                "str"  # Optional. High-level capabilities (e.g.
                  tool_calling, vision, streaming).
            ],
            "context_window": "str",  # Optional. Context window size in
              tokens.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "endpoints": [
                {
                    "capabilities": [
                        "str"  # Optional. Capabilities
                          supported by this endpoint (e.g. input_text, output_text,
                          input_image).
                    ],
                    "endpoint": "str"  # Optional. The endpoint
                      path (e.g. /chat/responses).
                }
            ],
            "inference_name": "str",  # Optional. Internally used name.
            "inference_version": "str",  # Optional. Internally used
              version.
            "is_foundational": bool,  # Optional. True if it is a
              foundational model provided by do.
            "kb_default_chunk_size": 0,  # Optional. Default chunking
              size limit to show in UI.
            "kb_max_chunk_size": 0,  # Optional. Maximum chunk size limit
              of model.
            "kb_min_chunk_size": 0,  # Optional. Minimum chunking size
              token limits if model supports KNOWLEDGEBASE usecase.
            "lifecycle_status": "str",  # Optional. Lifecycle status of
              the model (internal, public-preview, active, deprecated, end_of_life).
            "metadata": {},  # Optional. Additional meta data.
            "modalities": {
                "input": [
                    "str"  # Optional. Input/output modalities.
                ],
                "output": [
                    "str"  # Optional. Input/output modalities.
                ]
            },
            "name": "str",  # Optional. Name of the model.
            "parameter_count": 0.0,  # Optional. Parameter count in
              billions.
            "parent_uuid": "str",  # Optional. Unique id of the model,
              this model is based on.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "reasoning_efforts": [
                "str"  # Optional. Available reasoning efforts for
                  this model.
            ],
            "settings": [
                {
                    "default_string": "str",  # Optional. String
                      default value (for type="dropdown", e.g. "medium").
                    "default_value": 0.0,  # Optional. Numeric
                      default value (for type="number").
                    "max": 0.0,  # Optional. Maximum allowed
                      value (for type="number").
                    "min": 0.0,  # Optional. Minimum allowed
                      value (for type="number").
                    "name": "str",  # Optional. Setting key name
                      (e.g. "max_tokens", "temperature", "resolution").
                    "options": [
                        "str"  # Optional. Allowed values for
                          dropdown selections (for type="dropdown").
                    ],
                    "step": 0.0,  # Optional. Step increment for
                      numeric settings (for type="number").
                    "type": "str"  # Optional. Setting value
                      type: "number" or "dropdown".
                }
            ],
            "thinking": bool,  # Optional. Whether this model supports
              extended thinking (Anthropic models).
            "type": "str",  # Optional. Model type (chat, embedding,
              image, reasoning, coding).
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "upload_complete": bool,  # Optional. Model has been fully
              uploaded.
            "url": "str",  # Optional. Download url.
            "usecases": [
                "str"  # Optional. Usecases of the model.
            ],
            "uuid": "str",  # Optional. Unique id.
            "version": {
                "major": 0,  # Optional. Major version number.
                "minor": 0,  # Optional. Minor version number.
                "patch": 0  # Optional. Patch version number.
            }
        },
        "model_provider_key": {
            "api_key_uuid": "str",  # Optional. API key ID.
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name of the key.
            "provider": "MODEL_PROVIDER_DIGITALOCEAN",  # Optional.
              Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
              "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC", and
              "MODEL_PROVIDER_OPENAI".
            "updated_at": "2020-02-20 00:00:00"  # Optional. Key last
              updated date.
        },
        "model_router": {
            "config": {
                "fallback_models": [
                    "str"  # Optional. Router-level fallback
                      models.
                ],
                "policies": [
                    {
                        "custom_task": {
                            "description": "str",  #
                              Optional. Short task description.
                            "name": "str"  # Optional.
                              Task name.
                        },
                        "models": [
                            "str"  # Optional. Models
                              assigned to the task.
                        ],
                        "selection_policy": {
                            "prefer": "str"  # Optional.
                              One of: none, cheapest, fastest.
                        },
                        "task_slug": "str"  # Optional. Task
                          slug.
                    }
                ]
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "description": "str",  # Optional. Description.
            "name": "str",  # Optional. Name of the model router.
            "regions": [
                "str"  # Optional. Target regions for the router.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Agent name.
        "openai_api_key": {
            "created_at": "2020-02-20 00:00:00",  # Optional. Key
              creation date.
            "created_by": "str",  # Optional. Created by user id from DO.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted
              date.
            "models": [
                {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                }
            ],
            "name": "str",  # Optional. Name.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Key last
              updated date.
            "uuid": "str"  # Optional. Uuid.
        },
        "parent_agents": [
            ...
        ],
        "project_id": "str",  # Optional. An Agent.
        "provide_citations": bool,  # Optional. Whether the agent should
          provide in-response citations.
        "reasoning_effort": "str",  # Optional. The reasoning effort for the
          agent.
        "region": "str",  # Optional. Region code.
        "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  # Optional. Default
          value is "RETRIEVAL_METHOD_UNKNOWN". * RETRIEVAL_METHOD_UNKNOWN: The
          retrieval method is unknown    * RETRIEVAL_METHOD_REWRITE: The retrieval
          method is rewrite   * RETRIEVAL_METHOD_STEP_BACK: The retrieval method is
          step back   * RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub
          queries   * RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
          are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
          "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
          "RETRIEVAL_METHOD_NONE".
        "route_created_at": "2020-02-20 00:00:00",  # Optional. Creation of
          route date / time.
        "route_created_by": "str",  # Optional. An Agent.
        "route_name": "str",  # Optional. Route name.
        "route_uuid": "str",  # Optional. An Agent.
        "tags": [
            "str"  # Optional. Agent tag to organize related resources.
        ],
        "temperature": 0.0,  # Optional. An Agent.
        "template": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's creation date.
            "description": "str",  # Optional. Deprecated - Use summary
              instead.
            "guardrails": [
                {
                    "priority": 0,  # Optional. Priority of the
                      guardrail.
                    "uuid": "str"  # Optional. Uuid of the
                      guardrail.
                }
            ],
            "instruction": "str",  # Optional. Instructions for the agent
              template.
            "k": 0,  # Optional. The 'k' value for the agent template.
            "knowledge_bases": [
                {
                    "added_to_agent_at": "2020-02-20 00:00:00",
                      # Optional. Time when the knowledge base was added to the agent.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "database_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "embedding_model_uuid": "str",  # Optional.
                      List of knowledge bases associated with the agent template.
                    "is_public": bool,  # Optional. Whether the
                      knowledge base is public or not.
                    "last_indexing_job": {
                        "completed_datasources": 0,  #
                          Optional. Number of datasources indexed completed.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "data_source_jobs": [
                            {
                                "completed_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source completed indexing.
                                "data_source_uuid":
                                  "str",  # Optional. Uuid of the indexed data source.
                                "error_details":
                                  "str",  # Optional. A detailed error description.
                                "error_msg": "str",
                                  # Optional. A string code provinding a hint which
                                  part of the system experienced an error.
                                "failed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  failed.
                                "indexed_file_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "indexed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been indexed.
                                "removed_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been removed.
                                "skipped_item_count":
                                  "str",  # Optional. Total count of files that have
                                  been skipped.
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. Timestamp when
                                  data source started indexing.
                                "status":
                                  "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
                                  value is "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                  are: "DATA_SOURCE_STATUS_UNKNOWN",
                                  "DATA_SOURCE_STATUS_IN_PROGRESS",
                                  "DATA_SOURCE_STATUS_UPDATED",
                                  "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                  "DATA_SOURCE_STATUS_NOT_UPDATED",
                                  "DATA_SOURCE_STATUS_FAILED", and
                                  "DATA_SOURCE_STATUS_CANCELLED".
                                "total_bytes": "str",
                                  # Optional. Total size of files in data source in
                                  bytes.
"total_bytes_indexed": "str",  # Optional. Total size
                                  of files in data source in bytes that have been
                                  indexed.
                                "total_file_count":
                                  "str"  # Optional. Total file count in the data
                                  source.
                            }
                        ],
                        "data_source_uuids": [
                            "str"  # Optional.
                              IndexingJob description.
                        ],
                        "finished_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "is_report_available": bool,  #
                          Optional. Boolean value to determine if the indexing job
                          details are available.
                        "knowledge_base_uuid": "str",  #
                          Optional. Knowledge base id.
                        "phase": "BATCH_JOB_PHASE_UNKNOWN",
                          # Optional. Default value is "BATCH_JOB_PHASE_UNKNOWN". Known
                          values are: "BATCH_JOB_PHASE_UNKNOWN",
                          "BATCH_JOB_PHASE_PENDING", "BATCH_JOB_PHASE_RUNNING",
                          "BATCH_JOB_PHASE_SUCCEEDED", "BATCH_JOB_PHASE_FAILED",
                          "BATCH_JOB_PHASE_ERROR", and "BATCH_JOB_PHASE_CANCELLED".
                        "started_at": "2020-02-20 00:00:00",
                          # Optional. IndexingJob description.
                        "status": "INDEX_JOB_STATUS_UNKNOWN",
                          # Optional. Default value is "INDEX_JOB_STATUS_UNKNOWN".
                          Known values are: "INDEX_JOB_STATUS_UNKNOWN",
                          "INDEX_JOB_STATUS_PARTIAL", "INDEX_JOB_STATUS_IN_PROGRESS",
                          "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                          "INDEX_JOB_STATUS_NO_CHANGES", "INDEX_JOB_STATUS_PENDING",
                          and "INDEX_JOB_STATUS_CANCELLED".
                        "tokens": 0,  # Optional. Number of
                          tokens [This field is deprecated].
                        "total_datasources": 0,  # Optional.
                          Number of datasources being indexed.
                        "total_tokens": "str",  # Optional.
                          Total Tokens Consumed By the Indexing Job.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "uuid": "str"  # Optional. Unique id.
                    },
                    "name": "str",  # Optional. Name of knowledge
                      base.
                    "project_id": "str",  # Optional. List of
                      knowledge bases associated with the agent template.
                    "region": "str",  # Optional. Region code.
                    "reranking_config": {
                        "enabled": bool,  # Optional. Whether
                          reranking is enabled for retrieval.
                        "model": "str"  # Optional. Reranker
                          model internal name.
                    },
                    "tags": [
                        "str"  # Optional. Tags to organize
                          related resources.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "user_id": "str",  # Optional. Id of user
                      that created the knowledge base.
                    "uuid": "str"  # Optional. Unique id for
                      knowledge base.
                }
            ],
            "long_description": "str",  # Optional. The long description
              of the agent template.
            "max_tokens": 0,  # Optional. The max_tokens setting for the
              agent template.
            "model": {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            },
            "name": "str",  # Optional. Name of the agent template.
            "short_description": "str",  # Optional. The short
              description of the agent template.
            "summary": "str",  # Optional. The summary of the agent
              template.
            "tags": [
                "str"  # Optional. List of tags associated with the
                  agent template.
            ],
            "temperature": 0.0,  # Optional. The temperature setting for
              the agent template.
            "template_type": "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional.
              Default value is "AGENT_TEMPLATE_TYPE_STANDARD". *
              AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template    *
              AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template. Known values
              are: "AGENT_TEMPLATE_TYPE_STANDARD" and "AGENT_TEMPLATE_TYPE_ONE_CLICK".
            "top_p": 0.0,  # Optional. The top_p setting for the agent
              template.
            "updated_at": "2020-02-20 00:00:00",  # Optional. The agent
              template's last updated date.
            "uuid": "str"  # Optional. Unique id.
        },
        "thinking_token_budget": 0,  # Optional. The thinking token budget
          for Anthropic extended thinking (0 = disabled).
        "top_p": 0.0,  # Optional. An Agent.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "url": "str",  # Optional. Access your agent under this url.
        "user_id": "str",  # Optional. Id of user that created the agent.
        "uuid": "str",  # Optional. Unique agent id.
        "version_hash": "str",  # Optional. The latest version of the agent.
        "vpc_egress_ips": [
            "str"  # Optional. VPC Egress IPs.
        ],
        "vpc_uuid": "str",  # Optional. An Agent.
        "workspace": {
            "agents": [
                ...
            ],
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date.
            "created_by": "str",  # Optional. The id of user who created
              this workspace.
            "created_by_email": "str",  # Optional. The email of the user
              who created this workspace.
            "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted
              date.
            "description": "str",  # Optional. Description of the
              workspace.
            "evaluation_test_cases": [
                {
                    "archived_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "created_by_user_email": "str",  # Optional.
                      Evaluations.
                    "created_by_user_id": "str",  # Optional.
                      Evaluations.
                    "dataset": {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Time created at.
                        "dataset_name": "str",  # Optional.
                          Name of the dataset.
                        "dataset_type":
                          "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value
                          is "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                          "EVALUATION_DATASET_TYPE_UNKNOWN",
                          "EVALUATION_DATASET_TYPE_ADK",
                          "EVALUATION_DATASET_TYPE_NON_ADK", and
                          "EVALUATION_DATASET_TYPE_MODEL".
                        "dataset_uuid": "str",  # Optional.
                          UUID of the dataset.
                        "file_size": "str",  # Optional. The
                          size of the dataset uploaded file in bytes.
                        "has_ground_truth": bool,  #
                          Optional. Does the dataset have a ground truth column?.
                        "row_count": 0  # Optional. Number of
                          rows in the dataset.
                    },
                    "dataset_name": "str",  # Optional.
                      Evaluations.
                    "dataset_uuid": "str",  # Optional.
                      Evaluations.
                    "description": "str",  # Optional.
                      Evaluations.
                    "latest_version_number_of_runs": 0,  #
                      Optional. Evaluations.
                    "metrics": [
                        {
                            "category":
                              "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value
                              is "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                              "METRIC_CATEGORY_UNSPECIFIED",
                              "METRIC_CATEGORY_CORRECTNESS",
                              "METRIC_CATEGORY_USER_OUTCOMES",
                              "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                              "METRIC_CATEGORY_CONTEXT_QUALITY", and
                              "METRIC_CATEGORY_MODEL_FIT".
                            "description": "str",  #
                              Optional. Evaluations.
                            "evaluation_scope":
                              "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default
                              value is "EVALUATION_SCOPE_UNSPECIFIED". Scope that
                              determines whether a metric belongs to agent evaluation
                              or model evaluation. For backwards compatibility,
                              UNSPECIFIED defaults to agent metrics only in list
                              operations. Known values are:
                              "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT",
                              and "EVALUATION_SCOPE_MODEL".
                            "inverted": bool,  #
                              Optional. If true, the metric is inverted, meaning that a
                              lower value is better.
                            "is_metric_goal": bool,  #
                              Optional. Evaluations.
                            "metric_name": "str",  #
                              Optional. Evaluations.
                            "metric_rank": 0,  #
                              Optional. Evaluations.
                            "metric_type":
                              "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                              "METRIC_TYPE_UNSPECIFIED". Known values are:
                              "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                              "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY",
                              and "METRIC_TYPE_MODEL_SAFETY".
                            "metric_uuid": "str",  #
                              Optional. Evaluations.
                            "metric_value_type":
                              "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default
                              value is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values
                              are: "METRIC_VALUE_TYPE_UNSPECIFIED",
                              "METRIC_VALUE_TYPE_NUMBER", "METRIC_VALUE_TYPE_STRING",
                              and "METRIC_VALUE_TYPE_PERCENTAGE".
                            "range_max": 0.0,  #
                              Optional. The maximum value for the metric.
                            "range_min": 0.0  # Optional.
                              The minimum value for the metric.
                        }
                    ],
                    "name": "str",  # Optional. Evaluations.
                    "star_metric": {
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "name": "str",  # Optional.
                          Evaluations.
                        "success_threshold": 0.0,  #
                          Optional. The success threshold for the star metric. This is
                          a value that the metric must reach to be considered
                          successful.
                        "success_threshold_pct": 0  #
                          Optional. The success threshold for the star metric. This is
                          a percentage value between 0 and 100.
                    },
                    "test_case_uuid": "str",  # Optional.
                      Evaluations.
                    "total_runs": 0,  # Optional. Evaluations.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Evaluations.
                    "updated_by_user_email": "str",  # Optional.
                      Evaluations.
                    "updated_by_user_id": "str",  # Optional.
                      Evaluations.
                    "version": 0  # Optional. Evaluations.
                }
            ],
            "name": "str",  # Optional. Name of the workspace.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Update
              date.
            "uuid": "str"  # Optional. Unique id.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_agents_workspace(workspace_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_agents_workspace(workspace_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Move Agents to a Workspace.

To move all listed agents a given workspace, send a PUT request to /v2/gen-ai/workspaces/{workspace_uuid}/agents.

Parameters:
  • workspace_uuid (str) – Workspace uuid to move agents to. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "agent_uuids": [
        "str"  # Optional. Agent uuids.
    ],
    "workspace_uuid": "str"  # Optional. Workspace uuid to move agents to.
}

# response body for status code(s): 200
response == {
    "workspace": {
        "agents": [
            {
                "anthropic_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "api_key_infos": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date.
                        "created_by": "str",  # Optional.
                          Created by.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Deleted date.
                        "name": "str",  # Optional. Name.
                        "secret_key": "str",  # Optional. Api
                          key infos.
                        "uuid": "str"  # Optional. Uuid.
                    }
                ],
                "api_keys": [
                    {
                        "api_key": "str"  # Optional. Api
                          key.
                    }
                ],
                "chatbot": {
                    "allowed_domains": [
                        "str"  # Optional. A Chatbot.
                    ],
                    "button_background_color": "str",  #
                      Optional. A Chatbot.
                    "logo": "str",  # Optional. A Chatbot.
                    "name": "str",  # Optional. Name of chatbot.
                    "primary_color": "str",  # Optional. A
                      Chatbot.
                    "secondary_color": "str",  # Optional. A
                      Chatbot.
                    "starting_message": "str"  # Optional. A
                      Chatbot.
                },
                "chatbot_identifiers": [
                    {
                        "agent_chatbot_identifier": "str"  #
                          Optional. Agent chatbot identifier.
                    }
                ],
                "child_agents": [
                    ...
                ],
                "conversation_logs_enabled": bool,  # Optional.
                  Whether conversation logs are enabled for the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "deployment": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "name": "str",  # Optional. Name.
                    "status": "STATUS_UNKNOWN",  # Optional.
                      Default value is "STATUS_UNKNOWN". Known values are:
                      "STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT",
                      "STATUS_DEPLOYING", "STATUS_RUNNING", "STATUS_FAILED",
                      "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
                      "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and
                      "STATUS_BUILDING".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Access your
                      deployed agent here.
                    "uuid": "str",  # Optional. Unique id.
                    "visibility": "VISIBILITY_UNKNOWN"  #
                      Optional. Default value is "VISIBILITY_UNKNOWN". *
                      VISIBILITY_UNKNOWN: The status of the deployment is unknown    *
                      VISIBILITY_DISABLED: The deployment is disabled and will no
                      longer service requests   * VISIBILITY_PLAYGROUND: Deprecated: No
                      longer a valid state   * VISIBILITY_PUBLIC: The deployment is
                      public and will service requests from the public internet   *
                      VISIBILITY_PRIVATE: The deployment is private and will only
                      service requests from other agents, or through API keys. Known
                      values are: "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED",
                      "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC", and
                      "VISIBILITY_PRIVATE".
                },
                "description": "str",  # Optional. Description of
                  agent.
                "functions": [
                    {
                        "api_key": "str",  # Optional. Api
                          key.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "description": "str",  # Optional.
                          Agent description.
                        "faas_name": "str",  # Optional.
                          Agents.
                        "faas_namespace": "str",  # Optional.
                          Agents.
                        "input_schema": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. Name.
                        "output_schema": {},  # Optional. Any
                          object.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "url": "str",  # Optional. Download
                          your agent here.
                        "uuid": "str"  # Optional. Unique id.
                    }
                ],
                "guardrails": [
                    {
                        "agent_uuid": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "default_response": "str",  #
                          Optional. The guardrails the agent is attached to.
                        "description": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "guardrail_uuid": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "is_attached": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "is_default": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "metadata": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "priority": 0,  # Optional. The
                          guardrails the agent is attached to.
                        "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                          Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known
                          values are: "GUARDRAIL_TYPE_UNKNOWN",
                          "GUARDRAIL_TYPE_JAILBREAK", "GUARDRAIL_TYPE_SENSITIVE_DATA",
                          and "GUARDRAIL_TYPE_CONTENT_MODERATION".
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "uuid": "str"  # Optional. The
                          guardrails the agent is attached to.
                    }
                ],
                "if_case": "str",  # Optional. Agents.
                "instruction": "str",  # Optional. Agent instruction.
                  Instructions help your agent to perform its job effectively. See
                  `Write Effective Agent Instructions
                  <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
                  for best practices.
                "k": 0,  # Optional. Agents.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          Knowledge bases.
                        "embedding_model_uuid": "str",  #
                          Optional. Knowledge bases.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          Knowledge bases.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "logging_config": {
                    "galileo_project_id": "str",  # Optional.
                      Galileo project identifier.
                    "galileo_project_name": "str",  # Optional.
                      Name of the Galileo project.
                    "insights_enabled": bool,  # Optional.
                      Whether insights are enabled.
                    "insights_enabled_at": "2020-02-20 00:00:00",
                      # Optional. Timestamp when insights were enabled.
                    "log_stream_id": "str",  # Optional.
                      Identifier for the log stream.
                    "log_stream_name": "str"  # Optional. Name of
                      the log stream.
                },
                "max_tokens": 0,  # Optional. Agents.
                "mcp_servers": [
                    {
                        "allowed_tools": [
                            "str"  # Optional. Optional
                              list of allowed tool names to expose from this server.
                        ],
                        "authorization": "str",  # Optional.
                          Optional authorization header value for the MCP server.
                        "headers": {
                            "str": "str"  # Optional.
                              Optional additional headers to send to the MCP server.
                        },
                        "server_label": "str",  # Optional. A
                          label identifying this MCP server.
                        "server_url": "str"  # Optional. The
                          URL of the MCP server.
                    }
                ],
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "model_provider_key": {
                    "api_key_uuid": "str",  # Optional. API key
                      ID.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name of the key.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "updated_at": "2020-02-20 00:00:00"  #
                      Optional. Key last updated date.
                },
                "model_router": {
                    "config": {
                        "fallback_models": [
                            "str"  # Optional.
                              Router-level fallback models.
                        ],
                        "policies": [
                            {
                                "custom_task": {
"description": "str",  # Optional. Short task
                                      description.
                                    "name": "str"
                                      # Optional. Task name.
                                },
                                "models": [
                                    "str"  #
                                      Optional. Models assigned to the task.
                                ],
                                "selection_policy": {
                                    "prefer":
                                      "str"  # Optional. One of: none, cheapest,
                                      fastest.
                                },
                                "task_slug": "str"  #
                                  Optional. Task slug.
                            }
                        ]
                    },
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "description": "str",  # Optional.
                      Description.
                    "name": "str",  # Optional. Name of the model
                      router.
                    "regions": [
                        "str"  # Optional. Target regions for
                          the router.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Agent name.
                "openai_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "parent_agents": [
                    ...
                ],
                "project_id": "str",  # Optional. Agents.
                "provide_citations": bool,  # Optional. Whether the
                  agent should provide in-response citations.
                "reasoning_effort": "str",  # Optional. The reasoning
                  effort for the agent.
                "region": "str",  # Optional. Region code.
                "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  #
                  Optional. Default value is "RETRIEVAL_METHOD_UNKNOWN". *
                  RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown    *
                  RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite   *
                  RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back   *
                  RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries   *
                  RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
                  are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
                  "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
                  "RETRIEVAL_METHOD_NONE".
                "route_created_at": "2020-02-20 00:00:00",  #
                  Optional. Creation of route date / time.
                "route_created_by": "str",  # Optional. Agents.
                "route_name": "str",  # Optional. Route name.
                "route_uuid": "str",  # Optional. Agents.
                "tags": [
                    "str"  # Optional. Agent tag to organize
                      related resources.
                ],
                "temperature": 0.0,  # Optional. Agents.
                "template": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's creation date.
                    "description": "str",  # Optional. Deprecated
                      - Use summary instead.
                    "guardrails": [
                        {
                            "priority": 0,  # Optional.
                              Priority of the guardrail.
                            "uuid": "str"  # Optional.
                              Uuid of the guardrail.
                        }
                    ],
                    "instruction": "str",  # Optional.
                      Instructions for the agent template.
                    "k": 0,  # Optional. The 'k' value for the
                      agent template.
                    "knowledge_bases": [
                        {
                            "added_to_agent_at":
                              "2020-02-20 00:00:00",  # Optional. Time when the
                              knowledge base was added to the agent.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "database_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "embedding_model_uuid":
                              "str",  # Optional. List of knowledge bases associated
                              with the agent template.
                            "is_public": bool,  #
                              Optional. Whether the knowledge base is public or not.
                            "last_indexing_job": {
"completed_datasources": 0,  # Optional. Number of
                                  datasources indexed completed.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "data_source_jobs": [
                                    {
"completed_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source
                                          completed indexing.
"data_source_uuid": "str",  # Optional. Uuid
                                          of the indexed data source.
"error_details": "str",  # Optional. A
                                          detailed error description.
"error_msg": "str",  # Optional. A string
                                          code provinding a hint which part of the
                                          system experienced an error.
"failed_item_count": "str",  # Optional.
                                          Total count of files that have failed.
"indexed_file_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"indexed_item_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"removed_item_count": "str",  # Optional.
                                          Total count of files that have been removed.
"skipped_item_count": "str",  # Optional.
                                          Total count of files that have been skipped.
"started_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source started
                                          indexing.
"status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                                          Optional. Default value is
                                          "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                          are: "DATA_SOURCE_STATUS_UNKNOWN",
                                          "DATA_SOURCE_STATUS_IN_PROGRESS",
                                          "DATA_SOURCE_STATUS_UPDATED",
                                          "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                          "DATA_SOURCE_STATUS_NOT_UPDATED",
                                          "DATA_SOURCE_STATUS_FAILED", and
                                          "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size
                                          of files in data source in bytes.
"total_bytes_indexed": "str",  # Optional.
                                          Total size of files in data source in bytes
                                          that have been indexed.
"total_file_count": "str"  # Optional. Total
                                          file count in the data source.
                                    }
                                ],
                                "data_source_uuids":
                                  [
                                    "str"  #
                                      Optional. IndexingJob description.
                                ],
                                "finished_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
"is_report_available": bool,  # Optional. Boolean
                                  value to determine if the indexing job details are
                                  available.
"knowledge_base_uuid": "str",  # Optional. Knowledge
                                  base id.
                                "phase":
                                  "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value
                                  is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                                  "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                                  "BATCH_JOB_PHASE_RUNNING",
                                  "BATCH_JOB_PHASE_SUCCEEDED",
                                  "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR",
                                  and "BATCH_JOB_PHASE_CANCELLED".
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
                                "status":
                                  "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
                                  value is "INDEX_JOB_STATUS_UNKNOWN". Known values
                                  are: "INDEX_JOB_STATUS_UNKNOWN",
                                  "INDEX_JOB_STATUS_PARTIAL",
                                  "INDEX_JOB_STATUS_IN_PROGRESS",
                                  "INDEX_JOB_STATUS_COMPLETED",
                                  "INDEX_JOB_STATUS_FAILED",
                                  "INDEX_JOB_STATUS_NO_CHANGES",
                                  "INDEX_JOB_STATUS_PENDING", and
                                  "INDEX_JOB_STATUS_CANCELLED".
                                "tokens": 0,  #
                                  Optional. Number of tokens [This field is
                                  deprecated].
                                "total_datasources":
                                  0,  # Optional. Number of datasources being indexed.
                                "total_tokens":
                                  "str",  # Optional. Total Tokens Consumed By the
                                  Indexing Job.
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "uuid": "str"  #
                                  Optional. Unique id.
                            },
                            "name": "str",  # Optional.
                              Name of knowledge base.
                            "project_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "region": "str",  # Optional.
                              Region code.
                            "reranking_config": {
                                "enabled": bool,  #
                                  Optional. Whether reranking is enabled for retrieval.
                                "model": "str"  #
                                  Optional. Reranker model internal name.
                            },
                            "tags": [
                                "str"  # Optional.
                                  Tags to organize related resources.
                            ],
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "user_id": "str",  #
                              Optional. Id of user that created the knowledge base.
                            "uuid": "str"  # Optional.
                              Unique id for knowledge base.
                        }
                    ],
                    "long_description": "str",  # Optional. The
                      long description of the agent template.
                    "max_tokens": 0,  # Optional. The max_tokens
                      setting for the agent template.
                    "model": {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    },
                    "name": "str",  # Optional. Name of the agent
                      template.
                    "short_description": "str",  # Optional. The
                      short description of the agent template.
                    "summary": "str",  # Optional. The summary of
                      the agent template.
                    "tags": [
                        "str"  # Optional. List of tags
                          associated with the agent template.
                    ],
                    "temperature": 0.0,  # Optional. The
                      temperature setting for the agent template.
                    "template_type":
                      "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional. Default value is
                      "AGENT_TEMPLATE_TYPE_STANDARD". * AGENT_TEMPLATE_TYPE_STANDARD:
                      The standard agent template    * AGENT_TEMPLATE_TYPE_ONE_CLICK:
                      The one click agent template. Known values are:
                      "AGENT_TEMPLATE_TYPE_STANDARD" and
                      "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                    "top_p": 0.0,  # Optional. The top_p setting
                      for the agent template.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's last updated date.
                    "uuid": "str"  # Optional. Unique id.
                },
                "thinking_token_budget": 0,  # Optional. The thinking
                  token budget for Anthropic extended thinking (0 = disabled).
                "top_p": 0.0,  # Optional. Agents.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your agent under
                  this url.
                "user_id": "str",  # Optional. Id of user that
                  created the agent.
                "uuid": "str",  # Optional. Unique agent id.
                "version_hash": "str",  # Optional. The latest
                  version of the agent.
                "vpc_egress_ips": [
                    "str"  # Optional. VPC Egress IPs.
                ],
                "vpc_uuid": "str",  # Optional. Agents.
                "workspace": ...
            }
        ],
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. The id of user who created this
          workspace.
        "created_by_email": "str",  # Optional. The email of the user who
          created this workspace.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "description": "str",  # Optional. Description of the workspace.
        "evaluation_test_cases": [
            {
                "archived_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_by_user_email": "str",  # Optional.
                  Evaluations.
                "created_by_user_id": "str",  # Optional.
                  Evaluations.
                "dataset": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Time created at.
                    "dataset_name": "str",  # Optional. Name of
                      the dataset.
                    "dataset_type":
                      "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value is
                      "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                      "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK",
                      "EVALUATION_DATASET_TYPE_NON_ADK", and
                      "EVALUATION_DATASET_TYPE_MODEL".
                    "dataset_uuid": "str",  # Optional. UUID of
                      the dataset.
                    "file_size": "str",  # Optional. The size of
                      the dataset uploaded file in bytes.
                    "has_ground_truth": bool,  # Optional. Does
                      the dataset have a ground truth column?.
                    "row_count": 0  # Optional. Number of rows in
                      the dataset.
                },
                "dataset_name": "str",  # Optional. Evaluations.
                "dataset_uuid": "str",  # Optional. Evaluations.
                "description": "str",  # Optional. Evaluations.
                "latest_version_number_of_runs": 0,  # Optional.
                  Evaluations.
                "metrics": [
                    {
                        "category":
                          "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                          "METRIC_CATEGORY_UNSPECIFIED", "METRIC_CATEGORY_CORRECTNESS",
                          "METRIC_CATEGORY_USER_OUTCOMES",
                          "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                          "METRIC_CATEGORY_CONTEXT_QUALITY", and
                          "METRIC_CATEGORY_MODEL_FIT".
                        "description": "str",  # Optional.
                          Evaluations.
                        "evaluation_scope":
                          "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default value is
                          "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether
                          a metric belongs to agent evaluation or model evaluation. For
                          backwards compatibility, UNSPECIFIED defaults to agent
                          metrics only in list operations. Known values are:
                          "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                          "EVALUATION_SCOPE_MODEL".
                        "inverted": bool,  # Optional. If
                          true, the metric is inverted, meaning that a lower value is
                          better.
                        "is_metric_goal": bool,  # Optional.
                          Evaluations.
                        "metric_name": "str",  # Optional.
                          Evaluations.
                        "metric_rank": 0,  # Optional.
                          Evaluations.
                        "metric_type":
                          "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                          "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
                          "METRIC_TYPE_MODEL_SAFETY".
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "metric_value_type":
                          "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value
                          is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                          "METRIC_VALUE_TYPE_STRING", and
                          "METRIC_VALUE_TYPE_PERCENTAGE".
                        "range_max": 0.0,  # Optional. The
                          maximum value for the metric.
                        "range_min": 0.0  # Optional. The
                          minimum value for the metric.
                    }
                ],
                "name": "str",  # Optional. Evaluations.
                "star_metric": {
                    "metric_uuid": "str",  # Optional.
                      Evaluations.
                    "name": "str",  # Optional. Evaluations.
                    "success_threshold": 0.0,  # Optional. The
                      success threshold for the star metric. This is a value that the
                      metric must reach to be considered successful.
                    "success_threshold_pct": 0  # Optional. The
                      success threshold for the star metric. This is a percentage value
                      between 0 and 100.
                },
                "test_case_uuid": "str",  # Optional. Evaluations.
                "total_runs": 0,  # Optional. Evaluations.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "updated_by_user_email": "str",  # Optional.
                  Evaluations.
                "updated_by_user_id": "str",  # Optional.
                  Evaluations.
                "version": 0  # Optional. Evaluations.
            }
        ],
        "name": "str",  # Optional. Name of the workspace.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Update date.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_anthropic_api_key(api_key_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_anthropic_api_key(api_key_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Anthropic API Key.

To update an Anthropic API key, send a PUT request to /v2/gen-ai/anthropic/keys/{api_key_uuid}.

Parameters:
  • api_key_uuid (str) – API key ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "api_key": "str",  # Optional. Anthropic API key.
    "api_key_uuid": "str",  # Optional. API key ID.
    "name": "str"  # Optional. Name of the key.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_attached_agent(parent_agent_uuid: str, child_agent_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_attached_agent(parent_agent_uuid: str, child_agent_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Agent Route for an Agent.

To update an agent route for an agent, send a PUT request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}.

Parameters:
  • parent_agent_uuid (str) – A unique identifier for the parent agent. Required.

  • child_agent_uuid (str) – Routed agent id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "child_agent_uuid": "str",  # Optional. Routed agent id.
    "if_case": "str",  # Optional. Describes the case in which the child agent
      should be used.
    "parent_agent_uuid": "str",  # Optional. A unique identifier for the parent
      agent.
    "route_name": "str",  # Optional. Route name.
    "uuid": "str"  # Optional. Unique id of linkage.
}

# response body for status code(s): 200
response == {
    "child_agent_uuid": "str",  # Optional. Routed agent id.
    "parent_agent_uuid": "str",  # Optional. A unique identifier for the parent
      agent.
    "rollback": bool,  # Optional.
    "uuid": "str"  # Optional. Unique id of linkage.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_custom_model_metadata(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_custom_model_metadata(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Custom Model Metadata.

To update custom model metadata, send a PATCH request to /v2/gen-ai/custom_models/{uuid}/metadata.

Parameters:
  • uuid (str) – UUID of the custom model to update. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "description": "str",  # Optional.
    "name": "str",  # Optional.
    "tags": {
        "tags": [
            "str"  # Optional. List of tag strings.
        ]
    },
    "uuid": "str"  # Optional. UUID of the custom model to update.
}

# response body for status code(s): 200
response == {
    "model": {
        "active_deployments": [
            {
                "created_at": "str",  # Optional. RFC 3339 timestamp
                  indicating when the dedicated inference deployment was created.
                "endpoints": {
                    "private_endpoint_fqdn": "str",  # Optional.
                      Private FQDN for the deployment.
                    "public_endpoint_fqdn": "str"  # Optional.
                      Public FQDN for the deployment.
                },
                "id": "str",  # Optional. Unique identifier (UUID) of
                  the dedicated inference deployment.
                "name": "str",  # Optional. Human-readable name of
                  the dedicated inference deployment.
                "region_slug": "str",  # Optional. Slug of the region
                  where the dedicated inference deployment is running (e.g. "atl1").
                "state": "str",  # Optional. Current lifecycle state
                  of the dedicated inference deployment (e.g. "ACTIVE",
                  "PROVISIONING").
                "updated_at": "str"  # Optional. RFC 3339 timestamp
                  indicating when the dedicated inference deployment was last updated.
            }
        ],
        "architecture": "str",  # Optional. Model architecture type
          (free-form string from config.json).
        "config_json": {},  # Optional. Raw config.json contents from the
          model repository.
        "context_length": 0,  # Optional. Maximum context length supported by
          the model.
        "cost_estimate_per_month": 0,  # Optional. Estimated monthly cost in
          dollars for hosting.
        "created_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          model was created.
        "description": "str",  # Optional. Description of the custom model.
        "file_count": 0,  # Optional. Number of files in the model.
        "input_modalities": [
            "str"  # Optional. Input modalities supported (e.g., text,
              image).
        ],
        "license": "str",  # Optional. License under which the model is
          distributed.
        "name": "str",  # Optional. Name of the custom model.
        "output_modalities": [
            "str"  # Optional. Output modalities supported (e.g., text,
              image).
        ],
        "parameters": "str",  # Optional. Number of parameters in the model.
        "source_ref": {
            "access_type": "ACCESS_TYPE_UNSPECIFIED",  # Optional.
              Default value is "ACCESS_TYPE_UNSPECIFIED". Access level required for the
              model repository. Known values are: "ACCESS_TYPE_UNSPECIFIED",
              "ACCESS_TYPE_PUBLIC", "ACCESS_TYPE_PRIVATE", and "ACCESS_TYPE_GATED".
            "bucket": "str",  # Optional. Spaces bucket name.
            "commit_sha": "str",  # Optional. Git commit SHA of the model
              version.
            "hf_token": "str",  # Optional. User-provided HuggingFace
              token for gated/private models (not persisted in source_ref).
            "prefix": "str",  # Optional. Object prefix path in the
              bucket.
            "region": "str",  # Optional. Spaces bucket region.
            "repo_id": "str"  # Optional. Huggingface repository
              identifier.
        },
        "source_type": "SOURCE_TYPE_UNSPECIFIED",  # Optional. Default value
          is "SOURCE_TYPE_UNSPECIFIED". Source from which the model was imported. Known
          values are: "SOURCE_TYPE_UNSPECIFIED", "SOURCE_TYPE_HUGGINGFACE",
          "SOURCE_TYPE_SPACES_BUCKET", "SOURCE_TYPE_SDK_UPLOAD", and
          "SOURCE_TYPE_FINE_TUNING".
        "status": "STATUS_UNSPECIFIED",  # Optional. Default value is
          "STATUS_UNSPECIFIED". Import and deployment status of the custom model. Known
          values are: "STATUS_UNSPECIFIED", "STATUS_IMPORTING", "STATUS_READY",
          "STATUS_FAILED", and "STATUS_DELETED".
        "storage_region": "str",  # Optional. Region of the Spaces bucket
          where model files are stored.
        "tags": {
            "tags": [
                "str"  # Optional. List of tag strings.
            ]
        },
        "team_id": "str",  # Optional. Team that owns the model.
        "total_size_bytes": "str",  # Optional. Total size of model files in
          bytes.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Timestamp when the
          model was last updated.
        "uuid": "str"  # Optional. Unique identifier for the custom model.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_evaluation_test_case(test_case_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_evaluation_test_case(test_case_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an Evaluation Test Case.

To update an evaluation test-case send a PUT request to /v2/gen-ai/evaluation_test_cases/{test_case_uuid}.

Parameters:
  • test_case_uuid (str) – Test-case UUID to update. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "dataset_uuid": "str",  # Optional. Dataset against which the test"u2011case
      is executed.
    "description": "str",  # Optional. Description of the test case.
    "metrics": {
        "metric_uuids": [
            "str"  # Optional.
        ]
    },
    "name": "str",  # Optional. Name of the test case.
    "star_metric": {
        "metric_uuid": "str",  # Optional.
        "name": "str",  # Optional.
        "success_threshold": 0.0,  # Optional. The success threshold for the
          star metric. This is a value that the metric must reach to be considered
          successful.
        "success_threshold_pct": 0  # Optional. The success threshold for the
          star metric. This is a percentage value between 0 and 100.
    },
    "test_case_uuid": "str"  # Optional. Test-case UUID to update.
}

# response body for status code(s): 200
response == {
    "test_case_uuid": "str",  # Optional.
    "version": 0  # Optional. The new verson of the test case.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_knowledge_base(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_knowledge_base(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Knowledge Base.

To update a knowledge base, send a PUT request to /v2/gen-ai/knowledge_bases/{uuid}.

Parameters:
  • uuid (str) – Knowledge base id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "database_id": "str",  # Optional. The id of the DigitalOcean database this
      knowledge base will use, optional.
    "name": "str",  # Optional. Knowledge base name.
    "project_id": "str",  # Optional. The id of the DigitalOcean project this
      knowledge base will belong to.
    "reranking_config": {
        "enabled": bool,  # Optional. Whether reranking is enabled for
          retrieval.
        "model": "str"  # Optional. Reranker model internal name.
    },
    "tags": [
        "str"  # Optional. Tags to organize your knowledge base.
    ],
    "uuid": "str"  # Optional. Knowledge base id.
}

# response body for status code(s): 200
response == {
    "knowledge_base": {
        "added_to_agent_at": "2020-02-20 00:00:00",  # Optional. Time when
          the knowledge base was added to the agent.
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "database_id": "str",  # Optional. Knowledgebase Description.
        "embedding_model_uuid": "str",  # Optional. Knowledgebase
          Description.
        "is_public": bool,  # Optional. Whether the knowledge base is public
          or not.
        "last_indexing_job": {
            "completed_datasources": 0,  # Optional. Number of
              datasources indexed completed.
            "created_at": "2020-02-20 00:00:00",  # Optional. Creation
              date / time.
            "data_source_jobs": [
                {
                    "completed_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source completed indexing.
                    "data_source_uuid": "str",  # Optional. Uuid
                      of the indexed data source.
                    "error_details": "str",  # Optional. A
                      detailed error description.
                    "error_msg": "str",  # Optional. A string
                      code provinding a hint which part of the system experienced an
                      error.
                    "failed_item_count": "str",  # Optional.
                      Total count of files that have failed.
                    "indexed_file_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "indexed_item_count": "str",  # Optional.
                      Total count of files that have been indexed.
                    "removed_item_count": "str",  # Optional.
                      Total count of files that have been removed.
                    "skipped_item_count": "str",  # Optional.
                      Total count of files that have been skipped.
                    "started_at": "2020-02-20 00:00:00",  #
                      Optional. Timestamp when data source started indexing.
                    "status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                      Optional. Default value is "DATA_SOURCE_STATUS_UNKNOWN". Known
                      values are: "DATA_SOURCE_STATUS_UNKNOWN",
                      "DATA_SOURCE_STATUS_IN_PROGRESS", "DATA_SOURCE_STATUS_UPDATED",
                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                      "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED",
                      and "DATA_SOURCE_STATUS_CANCELLED".
                    "total_bytes": "str",  # Optional. Total size
                      of files in data source in bytes.
                    "total_bytes_indexed": "str",  # Optional.
                      Total size of files in data source in bytes that have been
                      indexed.
                    "total_file_count": "str"  # Optional. Total
                      file count in the data source.
                }
            ],
            "data_source_uuids": [
                "str"  # Optional. IndexingJob description.
            ],
            "finished_at": "2020-02-20 00:00:00",  # Optional.
              IndexingJob description.
            "is_report_available": bool,  # Optional. Boolean value to
              determine if the indexing job details are available.
            "knowledge_base_uuid": "str",  # Optional. Knowledge base id.
            "phase": "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default
              value is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
              "BATCH_JOB_PHASE_CANCELLED".
            "started_at": "2020-02-20 00:00:00",  # Optional. IndexingJob
              description.
            "status": "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
              value is "INDEX_JOB_STATUS_UNKNOWN". Known values are:
              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
              "INDEX_JOB_STATUS_IN_PROGRESS", "INDEX_JOB_STATUS_COMPLETED",
              "INDEX_JOB_STATUS_FAILED", "INDEX_JOB_STATUS_NO_CHANGES",
              "INDEX_JOB_STATUS_PENDING", and "INDEX_JOB_STATUS_CANCELLED".
            "tokens": 0,  # Optional. Number of tokens [This field is
              deprecated].
            "total_datasources": 0,  # Optional. Number of datasources
              being indexed.
            "total_tokens": "str",  # Optional. Total Tokens Consumed By
              the Indexing Job.
            "updated_at": "2020-02-20 00:00:00",  # Optional. Last
              modified.
            "uuid": "str"  # Optional. Unique id.
        },
        "name": "str",  # Optional. Name of knowledge base.
        "project_id": "str",  # Optional. Knowledgebase Description.
        "region": "str",  # Optional. Region code.
        "reranking_config": {
            "enabled": bool,  # Optional. Whether reranking is enabled
              for retrieval.
            "model": "str"  # Optional. Reranker model internal name.
        },
        "tags": [
            "str"  # Optional. Tags to organize related resources.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "user_id": "str",  # Optional. Id of user that created the knowledge
          base.
        "uuid": "str"  # Optional. Unique id for knowledge base.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_knowledge_base_data_source(knowledge_base_uuid: str, data_source_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_knowledge_base_data_source(knowledge_base_uuid: str, data_source_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Data Source options.

To update a data source (e.g. chunking options), send a PUT request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}.

Parameters:
  • knowledge_base_uuid (str) – Knowledge Base ID (Path Parameter). Required.

  • data_source_uuid (str) – Data Source ID (Path Parameter). Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",  # Optional. Default
      value is "CHUNKING_ALGORITHM_UNKNOWN". Known values are:
      "CHUNKING_ALGORITHM_UNKNOWN", "CHUNKING_ALGORITHM_SECTION_BASED",
      "CHUNKING_ALGORITHM_HIERARCHICAL", "CHUNKING_ALGORITHM_SEMANTIC", and
      "CHUNKING_ALGORITHM_FIXED_LENGTH".
    "chunking_options": {
        "child_chunk_size": 0,  # Optional.
        "max_chunk_size": 0,  # Optional. Common options.
        "parent_chunk_size": 0,  # Optional. Hierarchical options.
        "semantic_threshold": 0.0  # Optional. Semantic options.
    },
    "data_source_uuid": "str",  # Optional. Data Source ID (Path Parameter).
    "knowledge_base_uuid": "str"  # Optional. Knowledge Base ID (Path Parameter).
}

# response body for status code(s): 200
response == {
    "knowledge_base_data_source": {
        "aws_data_source": {
            "bucket_name": "str",  # Optional. Spaces bucket name.
            "item_path": "str",  # Optional. AWS S3 Data Source for
              Display.
            "region": "str"  # Optional. Region of bucket.
        },
        "bucket_name": "str",  # Optional. Name of storage bucket -
          Deprecated, moved to data_source_details.
        "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",  # Optional.
          Default value is "CHUNKING_ALGORITHM_UNKNOWN". Known values are:
          "CHUNKING_ALGORITHM_UNKNOWN", "CHUNKING_ALGORITHM_SECTION_BASED",
          "CHUNKING_ALGORITHM_HIERARCHICAL", "CHUNKING_ALGORITHM_SEMANTIC", and
          "CHUNKING_ALGORITHM_FIXED_LENGTH".
        "chunking_options": {
            "child_chunk_size": 0,  # Optional. Data Source configuration
              for Knowledge Bases.
            "max_chunk_size": 0,  # Optional. Common options.
            "parent_chunk_size": 0,  # Optional. Hierarchical options.
            "semantic_threshold": 0.0  # Optional. Semantic options.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "dropbox_data_source": {
            "folder": "str"  # Optional. Dropbox Data Source for Display.
        },
        "file_upload_data_source": {
            "original_file_name": "str",  # Optional. The original file
              name.
            "size_in_bytes": "str",  # Optional. The size of the file in
              bytes.
            "stored_object_key": "str"  # Optional. The object key the
              file was stored as.
        },
        "google_drive_data_source": {
            "folder_id": "str",  # Optional. Google Drive Data Source for
              Display.
            "folder_name": "str"  # Optional. Name of the selected folder
              if available.
        },
        "item_path": "str",  # Optional. Path of folder or object in bucket -
          Deprecated, moved to data_source_details.
        "last_datasource_indexing_job": {
            "completed_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when data source completed indexing.
            "data_source_uuid": "str",  # Optional. Uuid of the indexed
              data source.
            "error_details": "str",  # Optional. A detailed error
              description.
            "error_msg": "str",  # Optional. A string code provinding a
              hint which part of the system experienced an error.
            "failed_item_count": "str",  # Optional. Total count of files
              that have failed.
            "indexed_file_count": "str",  # Optional. Total count of
              files that have been indexed.
            "indexed_item_count": "str",  # Optional. Total count of
              files that have been indexed.
            "removed_item_count": "str",  # Optional. Total count of
              files that have been removed.
            "skipped_item_count": "str",  # Optional. Total count of
              files that have been skipped.
            "started_at": "2020-02-20 00:00:00",  # Optional. Timestamp
              when data source started indexing.
            "status": "DATA_SOURCE_STATUS_UNKNOWN",  # Optional. Default
              value is "DATA_SOURCE_STATUS_UNKNOWN". Known values are:
              "DATA_SOURCE_STATUS_UNKNOWN", "DATA_SOURCE_STATUS_IN_PROGRESS",
              "DATA_SOURCE_STATUS_UPDATED", "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
              "DATA_SOURCE_STATUS_NOT_UPDATED", "DATA_SOURCE_STATUS_FAILED", and
              "DATA_SOURCE_STATUS_CANCELLED".
            "total_bytes": "str",  # Optional. Total size of files in
              data source in bytes.
            "total_bytes_indexed": "str",  # Optional. Total size of
              files in data source in bytes that have been indexed.
            "total_file_count": "str"  # Optional. Total file count in
              the data source.
        },
        "region": "str",  # Optional. Region code - Deprecated, moved to
          data_source_details.
        "spaces_data_source": {
            "bucket_name": "str",  # Optional. Spaces bucket name.
            "item_path": "str",  # Optional. Spaces Bucket Data Source.
            "region": "str"  # Optional. Region of bucket.
        },
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str",  # Optional. Unique id of knowledge base.
        "web_crawler_data_source": {
            "base_url": "str",  # Optional. The base url to crawl.
            "crawling_option": "UNKNOWN",  # Optional. Default value is
              "UNKNOWN". Options for specifying how URLs found on pages should be
              handled.   * UNKNOWN: Default unknown value * SCOPED: Only include the
              base URL. * PATH: Crawl the base URL and linked pages within the URL
              path. * DOMAIN: Crawl the base URL and linked pages within the same
              domain. * SUBDOMAINS: Crawl the base URL and linked pages for any
              subdomain. * SITEMAP: Crawl URLs discovered in the sitemap. Known values
              are: "UNKNOWN", "SCOPED", "PATH", "DOMAIN", "SUBDOMAINS", and "SITEMAP".
            "embed_media": bool,  # Optional. Whether to ingest and index
              media (images, etc.) on web pages.
            "exclude_tags": [
                "str"  # Optional. Declaring which tags to exclude in
                  web pages while webcrawling.
            ]
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_model_api_key(api_key_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_model_api_key(api_key_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update API Key for a Model.

To update a model API key, send a PUT request to /v2/gen-ai/models/api_keys/{api_key_uuid}.

Parameters:
  • api_key_uuid (str) – API key ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "api_key_uuid": "str",  # Optional. API key ID.
    "name": "str"  # Optional. Name.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. Created by.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "name": "str",  # Optional. Name.
        "secret_key": "str",  # Optional. Model API Key Info.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_model_router(uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_model_router(uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Model Router.

To update a model router, send a PUT request to /v2/gen-ai/models/routers/{uuid}.

Parameters:
  • uuid (str) – Model router id. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "description": "str",  # Optional. Model router description.
    "fallback_models": [
        {}  # Optional.
    ],
    "name": "str",  # Optional. Model router name.
    "policies": [
        {
            "custom_task": {
                "description": "str",  # Optional. Short task
                  description.
                "name": "str"  # Optional. Task name.
            },
            "models": [
                "str"  # Optional. Models assigned to the task.
            ],
            "selection_policy": {
                "prefer": "str"  # Optional. One of: none, cheapest,
                  fastest.
            },
            "task_slug": "str"  # Optional. Task slug.
        }
    ],
    "regions": [
        "str"  # Optional. Target regions for the router.
    ],
    "uuid": "str"  # Optional. Model router id.
}

# response body for status code(s): 200
response == {
    "model_router": {
        "config": {
            "fallback_models": [
                "str"  # Optional. Router-level fallback models.
            ],
            "policies": [
                {
                    "custom_task": {
                        "description": "str",  # Optional.
                          Short task description.
                        "name": "str"  # Optional. Task name.
                    },
                    "models": [
                        "str"  # Optional. Models assigned to
                          the task.
                    ],
                    "selection_policy": {
                        "prefer": "str"  # Optional. One of:
                          none, cheapest, fastest.
                    },
                    "task_slug": "str"  # Optional. Task slug.
                }
            ]
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date /
          time.
        "description": "str",  # Optional. Description.
        "name": "str",  # Optional. Name of the model router.
        "regions": [
            "str"  # Optional. Target regions for the router.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. Last modified.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_openai_api_key(api_key_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_openai_api_key(api_key_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update OpenAI API Key.

To update an OpenAI API key, send a PUT request to /v2/gen-ai/openai/keys/{api_key_uuid}.

Parameters:
  • api_key_uuid (str) – API key ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "api_key": "str",  # Optional. OpenAI API key.
    "api_key_uuid": "str",  # Optional. API key ID.
    "name": "str"  # Optional. Name of the key.
}

# response body for status code(s): 200
response == {
    "api_key_info": {
        "created_at": "2020-02-20 00:00:00",  # Optional. Key creation date.
        "created_by": "str",  # Optional. Created by user id from DO.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Key deleted date.
        "models": [
            {
                "agreement": {
                    "description": "str",  # Optional. Agreement
                      Description.
                    "name": "str",  # Optional. Agreement
                      Description.
                    "url": "str",  # Optional. Agreement
                      Description.
                    "uuid": "str"  # Optional. Agreement
                      Description.
                },
                "benchmark_score": {},  # Optional. Benchmark scores
                  for this model, stored as arbitrary JSON.
                "capabilities": [
                    "str"  # Optional. High-level capabilities
                      (e.g. tool_calling, vision, streaming).
                ],
                "context_window": "str",  # Optional. Context window
                  size in tokens.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "endpoints": [
                    {
                        "capabilities": [
                            "str"  # Optional.
                              Capabilities supported by this endpoint (e.g. input_text,
                              output_text, input_image).
                        ],
                        "endpoint": "str"  # Optional. The
                          endpoint path (e.g. /chat/responses).
                    }
                ],
                "inference_name": "str",  # Optional. Internally used
                  name.
                "inference_version": "str",  # Optional. Internally
                  used version.
                "is_foundational": bool,  # Optional. True if it is a
                  foundational model provided by do.
                "kb_default_chunk_size": 0,  # Optional. Default
                  chunking size limit to show in UI.
                "kb_max_chunk_size": 0,  # Optional. Maximum chunk
                  size limit of model.
                "kb_min_chunk_size": 0,  # Optional. Minimum chunking
                  size token limits if model supports KNOWLEDGEBASE usecase.
                "lifecycle_status": "str",  # Optional. Lifecycle
                  status of the model (internal, public-preview, active, deprecated,
                  end_of_life).
                "metadata": {},  # Optional. Additional meta data.
                "modalities": {
                    "input": [
                        "str"  # Optional. Input/output
                          modalities.
                    ],
                    "output": [
                        "str"  # Optional. Input/output
                          modalities.
                    ]
                },
                "name": "str",  # Optional. Name of the model.
                "parameter_count": 0.0,  # Optional. Parameter count
                  in billions.
                "parent_uuid": "str",  # Optional. Unique id of the
                  model, this model is based on.
                "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                  Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                  values are: "MODEL_PROVIDER_DIGITALOCEAN",
                  "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                "reasoning_efforts": [
                    "str"  # Optional. Available reasoning
                      efforts for this model.
                ],
                "settings": [
                    {
                        "default_string": "str",  # Optional.
                          String default value (for type="dropdown", e.g. "medium").
                        "default_value": 0.0,  # Optional.
                          Numeric default value (for type="number").
                        "max": 0.0,  # Optional. Maximum
                          allowed value (for type="number").
                        "min": 0.0,  # Optional. Minimum
                          allowed value (for type="number").
                        "name": "str",  # Optional. Setting
                          key name (e.g. "max_tokens", "temperature", "resolution").
                        "options": [
                            "str"  # Optional. Allowed
                              values for dropdown selections (for type="dropdown").
                        ],
                        "step": 0.0,  # Optional. Step
                          increment for numeric settings (for type="number").
                        "type": "str"  # Optional. Setting
                          value type: "number" or "dropdown".
                    }
                ],
                "thinking": bool,  # Optional. Whether this model
                  supports extended thinking (Anthropic models).
                "type": "str",  # Optional. Model type (chat,
                  embedding, image, reasoning, coding).
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "upload_complete": bool,  # Optional. Model has been
                  fully uploaded.
                "url": "str",  # Optional. Download url.
                "usecases": [
                    "str"  # Optional. Usecases of the model.
                ],
                "uuid": "str",  # Optional. Unique id.
                "version": {
                    "major": 0,  # Optional. Major version
                      number.
                    "minor": 0,  # Optional. Minor version
                      number.
                    "patch": 0  # Optional. Patch version number.
                }
            }
        ],
        "name": "str",  # Optional. Name.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Key last updated
          date.
        "uuid": "str"  # Optional. Uuid.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_workspace(workspace_uuid: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_workspace(workspace_uuid: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Workspace.

To update a workspace, send a PUT request to /v2/gen-ai/workspaces/{workspace_uuid}. The response body is a JSON object containing the workspace.

Parameters:
  • workspace_uuid (str) – Workspace UUID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "description": "str",  # Optional. The new description of the workspace.
    "name": "str",  # Optional. The new name of the workspace.
    "workspace_uuid": "str"  # Optional. Workspace UUID.
}

# response body for status code(s): 200
response == {
    "workspace": {
        "agents": [
            {
                "anthropic_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "api_key_infos": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date.
                        "created_by": "str",  # Optional.
                          Created by.
                        "deleted_at": "2020-02-20 00:00:00",
                          # Optional. Deleted date.
                        "name": "str",  # Optional. Name.
                        "secret_key": "str",  # Optional. Api
                          key infos.
                        "uuid": "str"  # Optional. Uuid.
                    }
                ],
                "api_keys": [
                    {
                        "api_key": "str"  # Optional. Api
                          key.
                    }
                ],
                "chatbot": {
                    "allowed_domains": [
                        "str"  # Optional. A Chatbot.
                    ],
                    "button_background_color": "str",  #
                      Optional. A Chatbot.
                    "logo": "str",  # Optional. A Chatbot.
                    "name": "str",  # Optional. Name of chatbot.
                    "primary_color": "str",  # Optional. A
                      Chatbot.
                    "secondary_color": "str",  # Optional. A
                      Chatbot.
                    "starting_message": "str"  # Optional. A
                      Chatbot.
                },
                "chatbot_identifiers": [
                    {
                        "agent_chatbot_identifier": "str"  #
                          Optional. Agent chatbot identifier.
                    }
                ],
                "child_agents": [
                    ...
                ],
                "conversation_logs_enabled": bool,  # Optional.
                  Whether conversation logs are enabled for the agent.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Creation date / time.
                "deployment": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "name": "str",  # Optional. Name.
                    "status": "STATUS_UNKNOWN",  # Optional.
                      Default value is "STATUS_UNKNOWN". Known values are:
                      "STATUS_UNKNOWN", "STATUS_WAITING_FOR_DEPLOYMENT",
                      "STATUS_DEPLOYING", "STATUS_RUNNING", "STATUS_FAILED",
                      "STATUS_WAITING_FOR_UNDEPLOYMENT", "STATUS_UNDEPLOYING",
                      "STATUS_UNDEPLOYMENT_FAILED", "STATUS_DELETED", and
                      "STATUS_BUILDING".
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "url": "str",  # Optional. Access your
                      deployed agent here.
                    "uuid": "str",  # Optional. Unique id.
                    "visibility": "VISIBILITY_UNKNOWN"  #
                      Optional. Default value is "VISIBILITY_UNKNOWN". *
                      VISIBILITY_UNKNOWN: The status of the deployment is unknown    *
                      VISIBILITY_DISABLED: The deployment is disabled and will no
                      longer service requests   * VISIBILITY_PLAYGROUND: Deprecated: No
                      longer a valid state   * VISIBILITY_PUBLIC: The deployment is
                      public and will service requests from the public internet   *
                      VISIBILITY_PRIVATE: The deployment is private and will only
                      service requests from other agents, or through API keys. Known
                      values are: "VISIBILITY_UNKNOWN", "VISIBILITY_DISABLED",
                      "VISIBILITY_PLAYGROUND", "VISIBILITY_PUBLIC", and
                      "VISIBILITY_PRIVATE".
                },
                "description": "str",  # Optional. Description of
                  agent.
                "functions": [
                    {
                        "api_key": "str",  # Optional. Api
                          key.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "created_by": "str",  # Optional.
                          Created by user id from DO.
                        "description": "str",  # Optional.
                          Agent description.
                        "faas_name": "str",  # Optional.
                          Agents.
                        "faas_namespace": "str",  # Optional.
                          Agents.
                        "input_schema": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. Name.
                        "output_schema": {},  # Optional. Any
                          object.
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "url": "str",  # Optional. Download
                          your agent here.
                        "uuid": "str"  # Optional. Unique id.
                    }
                ],
                "guardrails": [
                    {
                        "agent_uuid": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "default_response": "str",  #
                          Optional. The guardrails the agent is attached to.
                        "description": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "guardrail_uuid": "str",  # Optional.
                          The guardrails the agent is attached to.
                        "is_attached": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "is_default": bool,  # Optional. The
                          guardrails the agent is attached to.
                        "metadata": {},  # Optional. Any
                          object.
                        "name": "str",  # Optional. The
                          guardrails the agent is attached to.
                        "priority": 0,  # Optional. The
                          guardrails the agent is attached to.
                        "type": "GUARDRAIL_TYPE_UNKNOWN",  #
                          Optional. Default value is "GUARDRAIL_TYPE_UNKNOWN". Known
                          values are: "GUARDRAIL_TYPE_UNKNOWN",
                          "GUARDRAIL_TYPE_JAILBREAK", "GUARDRAIL_TYPE_SENSITIVE_DATA",
                          and "GUARDRAIL_TYPE_CONTENT_MODERATION".
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. The guardrails the agent is attached to.
                        "uuid": "str"  # Optional. The
                          guardrails the agent is attached to.
                    }
                ],
                "if_case": "str",  # Optional. Agents.
                "instruction": "str",  # Optional. Agent instruction.
                  Instructions help your agent to perform its job effectively. See
                  `Write Effective Agent Instructions
                  <https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#agent-instructions>`_
                  for best practices.
                "k": 0,  # Optional. Agents.
                "knowledge_bases": [
                    {
                        "added_to_agent_at": "2020-02-20
                          00:00:00",  # Optional. Time when the knowledge base was
                          added to the agent.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "database_id": "str",  # Optional.
                          Knowledge bases.
                        "embedding_model_uuid": "str",  #
                          Optional. Knowledge bases.
                        "is_public": bool,  # Optional.
                          Whether the knowledge base is public or not.
                        "last_indexing_job": {
                            "completed_datasources": 0,
                              # Optional. Number of datasources indexed completed.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "data_source_jobs": [
                                {
"completed_at": "2020-02-20 00:00:00",  #
                                      Optional. Timestamp when data source completed
                                      indexing.
"data_source_uuid": "str",  # Optional. Uuid of
                                      the indexed data source.
"error_details": "str",  # Optional. A detailed
                                      error description.
                                    "error_msg":
                                      "str",  # Optional. A string code provinding a
                                      hint which part of the system experienced an
                                      error.
"failed_item_count": "str",  # Optional. Total
                                      count of files that have failed.
"indexed_file_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"indexed_item_count": "str",  # Optional. Total
                                      count of files that have been indexed.
"removed_item_count": "str",  # Optional. Total
                                      count of files that have been removed.
"skipped_item_count": "str",  # Optional. Total
                                      count of files that have been skipped.
                                    "started_at":
                                      "2020-02-20 00:00:00",  # Optional. Timestamp
                                      when data source started indexing.
                                    "status":
                                      "DATA_SOURCE_STATUS_UNKNOWN",  # Optional.
                                      Default value is "DATA_SOURCE_STATUS_UNKNOWN".
                                      Known values are: "DATA_SOURCE_STATUS_UNKNOWN",
                                      "DATA_SOURCE_STATUS_IN_PROGRESS",
                                      "DATA_SOURCE_STATUS_UPDATED",
                                      "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                      "DATA_SOURCE_STATUS_NOT_UPDATED",
                                      "DATA_SOURCE_STATUS_FAILED", and
                                      "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size of
                                      files in data source in bytes.
"total_bytes_indexed": "str",  # Optional. Total
                                      size of files in data source in bytes that have
                                      been indexed.
"total_file_count": "str"  # Optional. Total file
                                      count in the data source.
                                }
                            ],
                            "data_source_uuids": [
                                "str"  # Optional.
                                  IndexingJob description.
                            ],
                            "finished_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "is_report_available": bool,
                              # Optional. Boolean value to determine if the indexing
                              job details are available.
                            "knowledge_base_uuid": "str",
                              # Optional. Knowledge base id.
                            "phase":
                              "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value is
                              "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                              "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                              "BATCH_JOB_PHASE_RUNNING", "BATCH_JOB_PHASE_SUCCEEDED",
                              "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR", and
                              "BATCH_JOB_PHASE_CANCELLED".
                            "started_at": "2020-02-20
                              00:00:00",  # Optional. IndexingJob description.
                            "status":
                              "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default value is
                              "INDEX_JOB_STATUS_UNKNOWN". Known values are:
                              "INDEX_JOB_STATUS_UNKNOWN", "INDEX_JOB_STATUS_PARTIAL",
                              "INDEX_JOB_STATUS_IN_PROGRESS",
                              "INDEX_JOB_STATUS_COMPLETED", "INDEX_JOB_STATUS_FAILED",
                              "INDEX_JOB_STATUS_NO_CHANGES",
                              "INDEX_JOB_STATUS_PENDING", and
                              "INDEX_JOB_STATUS_CANCELLED".
                            "tokens": 0,  # Optional.
                              Number of tokens [This field is deprecated].
                            "total_datasources": 0,  #
                              Optional. Number of datasources being indexed.
                            "total_tokens": "str",  #
                              Optional. Total Tokens Consumed By the Indexing Job.
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "uuid": "str"  # Optional.
                              Unique id.
                        },
                        "name": "str",  # Optional. Name of
                          knowledge base.
                        "project_id": "str",  # Optional.
                          Knowledge bases.
                        "region": "str",  # Optional. Region
                          code.
                        "reranking_config": {
                            "enabled": bool,  # Optional.
                              Whether reranking is enabled for retrieval.
                            "model": "str"  # Optional.
                              Reranker model internal name.
                        },
                        "tags": [
                            "str"  # Optional. Tags to
                              organize related resources.
                        ],
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "user_id": "str",  # Optional. Id of
                          user that created the knowledge base.
                        "uuid": "str"  # Optional. Unique id
                          for knowledge base.
                    }
                ],
                "logging_config": {
                    "galileo_project_id": "str",  # Optional.
                      Galileo project identifier.
                    "galileo_project_name": "str",  # Optional.
                      Name of the Galileo project.
                    "insights_enabled": bool,  # Optional.
                      Whether insights are enabled.
                    "insights_enabled_at": "2020-02-20 00:00:00",
                      # Optional. Timestamp when insights were enabled.
                    "log_stream_id": "str",  # Optional.
                      Identifier for the log stream.
                    "log_stream_name": "str"  # Optional. Name of
                      the log stream.
                },
                "max_tokens": 0,  # Optional. Agents.
                "mcp_servers": [
                    {
                        "allowed_tools": [
                            "str"  # Optional. Optional
                              list of allowed tool names to expose from this server.
                        ],
                        "authorization": "str",  # Optional.
                          Optional authorization header value for the MCP server.
                        "headers": {
                            "str": "str"  # Optional.
                              Optional additional headers to send to the MCP server.
                        },
                        "server_label": "str",  # Optional. A
                          label identifying this MCP server.
                        "server_url": "str"  # Optional. The
                          URL of the MCP server.
                    }
                ],
                "model": {
                    "agreement": {
                        "description": "str",  # Optional.
                          Agreement Description.
                        "name": "str",  # Optional. Agreement
                          Description.
                        "url": "str",  # Optional. Agreement
                          Description.
                        "uuid": "str"  # Optional. Agreement
                          Description.
                    },
                    "benchmark_score": {},  # Optional. Benchmark
                      scores for this model, stored as arbitrary JSON.
                    "capabilities": [
                        "str"  # Optional. High-level
                          capabilities (e.g. tool_calling, vision, streaming).
                    ],
                    "context_window": "str",  # Optional. Context
                      window size in tokens.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "endpoints": [
                        {
                            "capabilities": [
                                "str"  # Optional.
                                  Capabilities supported by this endpoint (e.g.
                                  input_text, output_text, input_image).
                            ],
                            "endpoint": "str"  #
                              Optional. The endpoint path (e.g. /chat/responses).
                        }
                    ],
                    "inference_name": "str",  # Optional.
                      Internally used name.
                    "inference_version": "str",  # Optional.
                      Internally used version.
                    "is_foundational": bool,  # Optional. True if
                      it is a foundational model provided by do.
                    "kb_default_chunk_size": 0,  # Optional.
                      Default chunking size limit to show in UI.
                    "kb_max_chunk_size": 0,  # Optional. Maximum
                      chunk size limit of model.
                    "kb_min_chunk_size": 0,  # Optional. Minimum
                      chunking size token limits if model supports KNOWLEDGEBASE
                      usecase.
                    "lifecycle_status": "str",  # Optional.
                      Lifecycle status of the model (internal, public-preview, active,
                      deprecated, end_of_life).
                    "metadata": {},  # Optional. Additional meta
                      data.
                    "modalities": {
                        "input": [
                            "str"  # Optional.
                              Input/output modalities.
                        ],
                        "output": [
                            "str"  # Optional.
                              Input/output modalities.
                        ]
                    },
                    "name": "str",  # Optional. Name of the
                      model.
                    "parameter_count": 0.0,  # Optional.
                      Parameter count in billions.
                    "parent_uuid": "str",  # Optional. Unique id
                      of the model, this model is based on.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "reasoning_efforts": [
                        "str"  # Optional. Available
                          reasoning efforts for this model.
                    ],
                    "settings": [
                        {
                            "default_string": "str",  #
                              Optional. String default value (for type="dropdown", e.g.
                              "medium").
                            "default_value": 0.0,  #
                              Optional. Numeric default value (for type="number").
                            "max": 0.0,  # Optional.
                              Maximum allowed value (for type="number").
                            "min": 0.0,  # Optional.
                              Minimum allowed value (for type="number").
                            "name": "str",  # Optional.
                              Setting key name (e.g. "max_tokens", "temperature",
                              "resolution").
                            "options": [
                                "str"  # Optional.
                                  Allowed values for dropdown selections (for
                                  type="dropdown").
                            ],
                            "step": 0.0,  # Optional.
                              Step increment for numeric settings (for type="number").
                            "type": "str"  # Optional.
                              Setting value type: "number" or "dropdown".
                        }
                    ],
                    "thinking": bool,  # Optional. Whether this
                      model supports extended thinking (Anthropic models).
                    "type": "str",  # Optional. Model type (chat,
                      embedding, image, reasoning, coding).
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "upload_complete": bool,  # Optional. Model
                      has been fully uploaded.
                    "url": "str",  # Optional. Download url.
                    "usecases": [
                        "str"  # Optional. Usecases of the
                          model.
                    ],
                    "uuid": "str",  # Optional. Unique id.
                    "version": {
                        "major": 0,  # Optional. Major
                          version number.
                        "minor": 0,  # Optional. Minor
                          version number.
                        "patch": 0  # Optional. Patch version
                          number.
                    }
                },
                "model_provider_key": {
                    "api_key_uuid": "str",  # Optional. API key
                      ID.
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name of the key.
                    "provider": "MODEL_PROVIDER_DIGITALOCEAN",  #
                      Optional. Default value is "MODEL_PROVIDER_DIGITALOCEAN". Known
                      values are: "MODEL_PROVIDER_DIGITALOCEAN",
                      "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                    "updated_at": "2020-02-20 00:00:00"  #
                      Optional. Key last updated date.
                },
                "model_router": {
                    "config": {
                        "fallback_models": [
                            "str"  # Optional.
                              Router-level fallback models.
                        ],
                        "policies": [
                            {
                                "custom_task": {
"description": "str",  # Optional. Short task
                                      description.
                                    "name": "str"
                                      # Optional. Task name.
                                },
                                "models": [
                                    "str"  #
                                      Optional. Models assigned to the task.
                                ],
                                "selection_policy": {
                                    "prefer":
                                      "str"  # Optional. One of: none, cheapest,
                                      fastest.
                                },
                                "task_slug": "str"  #
                                  Optional. Task slug.
                            }
                        ]
                    },
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Creation date / time.
                    "description": "str",  # Optional.
                      Description.
                    "name": "str",  # Optional. Name of the model
                      router.
                    "regions": [
                        "str"  # Optional. Target regions for
                          the router.
                    ],
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Last modified.
                    "uuid": "str"  # Optional. Unique id.
                },
                "name": "str",  # Optional. Agent name.
                "openai_api_key": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Key creation date.
                    "created_by": "str",  # Optional. Created by
                      user id from DO.
                    "deleted_at": "2020-02-20 00:00:00",  #
                      Optional. Key deleted date.
                    "models": [
                        {
                            "agreement": {
                                "description": "str",
                                  # Optional. Agreement Description.
                                "name": "str",  #
                                  Optional. Agreement Description.
                                "url": "str",  #
                                  Optional. Agreement Description.
                                "uuid": "str"  #
                                  Optional. Agreement Description.
                            },
                            "benchmark_score": {},  #
                              Optional. Benchmark scores for this model, stored as
                              arbitrary JSON.
                            "capabilities": [
                                "str"  # Optional.
                                  High-level capabilities (e.g. tool_calling, vision,
                                  streaming).
                            ],
                            "context_window": "str",  #
                              Optional. Context window size in tokens.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "endpoints": [
                                {
"capabilities": [
                                        "str"
                                          # Optional. Capabilities supported by this
                                          endpoint (e.g. input_text, output_text,
                                          input_image).
                                    ],
                                    "endpoint":
                                      "str"  # Optional. The endpoint path (e.g.
                                      /chat/responses).
                                }
                            ],
                            "inference_name": "str",  #
                              Optional. Internally used name.
                            "inference_version": "str",
                              # Optional. Internally used version.
                            "is_foundational": bool,  #
                              Optional. True if it is a foundational model provided by
                              do.
                            "kb_default_chunk_size": 0,
                              # Optional. Default chunking size limit to show in UI.
                            "kb_max_chunk_size": 0,  #
                              Optional. Maximum chunk size limit of model.
                            "kb_min_chunk_size": 0,  #
                              Optional. Minimum chunking size token limits if model
                              supports KNOWLEDGEBASE usecase.
                            "lifecycle_status": "str",  #
                              Optional. Lifecycle status of the model (internal,
                              public-preview, active, deprecated, end_of_life).
                            "metadata": {},  # Optional.
                              Additional meta data.
                            "modalities": {
                                "input": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ],
                                "output": [
                                    "str"  #
                                      Optional. Input/output modalities.
                                ]
                            },
                            "name": "str",  # Optional.
                              Name of the model.
                            "parameter_count": 0.0,  #
                              Optional. Parameter count in billions.
                            "parent_uuid": "str",  #
                              Optional. Unique id of the model, this model is based on.
                            "provider":
                              "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value
                              is "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                              "MODEL_PROVIDER_DIGITALOCEAN",
                              "MODEL_PROVIDER_ANTHROPIC", and "MODEL_PROVIDER_OPENAI".
                            "reasoning_efforts": [
                                "str"  # Optional.
                                  Available reasoning efforts for this model.
                            ],
                            "settings": [
                                {
"default_string": "str",  # Optional. String
                                      default value (for type="dropdown", e.g.
                                      "medium").
"default_value": 0.0,  # Optional. Numeric
                                      default value (for type="number").
                                    "max": 0.0,
                                      # Optional. Maximum allowed value (for
                                      type="number").
                                    "min": 0.0,
                                      # Optional. Minimum allowed value (for
                                      type="number").
                                    "name":
                                      "str",  # Optional. Setting key name (e.g.
                                      "max_tokens", "temperature", "resolution").
                                    "options": [
                                        "str"
                                          # Optional. Allowed values for dropdown
                                          selections (for type="dropdown").
                                    ],
                                    "step": 0.0,
                                      # Optional. Step increment for numeric settings
                                      (for type="number").
                                    "type": "str"
                                      # Optional. Setting value type: "number" or
                                      "dropdown".
                                }
                            ],
                            "thinking": bool,  #
                              Optional. Whether this model supports extended thinking
                              (Anthropic models).
                            "type": "str",  # Optional.
                              Model type (chat, embedding, image, reasoning, coding).
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "upload_complete": bool,  #
                              Optional. Model has been fully uploaded.
                            "url": "str",  # Optional.
                              Download url.
                            "usecases": [
                                "str"  # Optional.
                                  Usecases of the model.
                            ],
                            "uuid": "str",  # Optional.
                              Unique id.
                            "version": {
                                "major": 0,  #
                                  Optional. Major version number.
                                "minor": 0,  #
                                  Optional. Minor version number.
                                "patch": 0  #
                                  Optional. Patch version number.
                            }
                        }
                    ],
                    "name": "str",  # Optional. Name.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. Key last updated date.
                    "uuid": "str"  # Optional. Uuid.
                },
                "parent_agents": [
                    ...
                ],
                "project_id": "str",  # Optional. Agents.
                "provide_citations": bool,  # Optional. Whether the
                  agent should provide in-response citations.
                "reasoning_effort": "str",  # Optional. The reasoning
                  effort for the agent.
                "region": "str",  # Optional. Region code.
                "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",  #
                  Optional. Default value is "RETRIEVAL_METHOD_UNKNOWN". *
                  RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown    *
                  RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite   *
                  RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back   *
                  RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries   *
                  RETRIEVAL_METHOD_NONE: The retrieval method is none. Known values
                  are: "RETRIEVAL_METHOD_UNKNOWN", "RETRIEVAL_METHOD_REWRITE",
                  "RETRIEVAL_METHOD_STEP_BACK", "RETRIEVAL_METHOD_SUB_QUERIES", and
                  "RETRIEVAL_METHOD_NONE".
                "route_created_at": "2020-02-20 00:00:00",  #
                  Optional. Creation of route date / time.
                "route_created_by": "str",  # Optional. Agents.
                "route_name": "str",  # Optional. Route name.
                "route_uuid": "str",  # Optional. Agents.
                "tags": [
                    "str"  # Optional. Agent tag to organize
                      related resources.
                ],
                "temperature": 0.0,  # Optional. Agents.
                "template": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's creation date.
                    "description": "str",  # Optional. Deprecated
                      - Use summary instead.
                    "guardrails": [
                        {
                            "priority": 0,  # Optional.
                              Priority of the guardrail.
                            "uuid": "str"  # Optional.
                              Uuid of the guardrail.
                        }
                    ],
                    "instruction": "str",  # Optional.
                      Instructions for the agent template.
                    "k": 0,  # Optional. The 'k' value for the
                      agent template.
                    "knowledge_bases": [
                        {
                            "added_to_agent_at":
                              "2020-02-20 00:00:00",  # Optional. Time when the
                              knowledge base was added to the agent.
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. Creation date / time.
                            "database_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "embedding_model_uuid":
                              "str",  # Optional. List of knowledge bases associated
                              with the agent template.
                            "is_public": bool,  #
                              Optional. Whether the knowledge base is public or not.
                            "last_indexing_job": {
"completed_datasources": 0,  # Optional. Number of
                                  datasources indexed completed.
                                "created_at":
                                  "2020-02-20 00:00:00",  # Optional. Creation date /
                                  time.
                                "data_source_jobs": [
                                    {
"completed_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source
                                          completed indexing.
"data_source_uuid": "str",  # Optional. Uuid
                                          of the indexed data source.
"error_details": "str",  # Optional. A
                                          detailed error description.
"error_msg": "str",  # Optional. A string
                                          code provinding a hint which part of the
                                          system experienced an error.
"failed_item_count": "str",  # Optional.
                                          Total count of files that have failed.
"indexed_file_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"indexed_item_count": "str",  # Optional.
                                          Total count of files that have been indexed.
"removed_item_count": "str",  # Optional.
                                          Total count of files that have been removed.
"skipped_item_count": "str",  # Optional.
                                          Total count of files that have been skipped.
"started_at": "2020-02-20 00:00:00",  #
                                          Optional. Timestamp when data source started
                                          indexing.
"status": "DATA_SOURCE_STATUS_UNKNOWN",  #
                                          Optional. Default value is
                                          "DATA_SOURCE_STATUS_UNKNOWN". Known values
                                          are: "DATA_SOURCE_STATUS_UNKNOWN",
                                          "DATA_SOURCE_STATUS_IN_PROGRESS",
                                          "DATA_SOURCE_STATUS_UPDATED",
                                          "DATA_SOURCE_STATUS_PARTIALLY_UPDATED",
                                          "DATA_SOURCE_STATUS_NOT_UPDATED",
                                          "DATA_SOURCE_STATUS_FAILED", and
                                          "DATA_SOURCE_STATUS_CANCELLED".
"total_bytes": "str",  # Optional. Total size
                                          of files in data source in bytes.
"total_bytes_indexed": "str",  # Optional.
                                          Total size of files in data source in bytes
                                          that have been indexed.
"total_file_count": "str"  # Optional. Total
                                          file count in the data source.
                                    }
                                ],
                                "data_source_uuids":
                                  [
                                    "str"  #
                                      Optional. IndexingJob description.
                                ],
                                "finished_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
"is_report_available": bool,  # Optional. Boolean
                                  value to determine if the indexing job details are
                                  available.
"knowledge_base_uuid": "str",  # Optional. Knowledge
                                  base id.
                                "phase":
                                  "BATCH_JOB_PHASE_UNKNOWN",  # Optional. Default value
                                  is "BATCH_JOB_PHASE_UNKNOWN". Known values are:
                                  "BATCH_JOB_PHASE_UNKNOWN", "BATCH_JOB_PHASE_PENDING",
                                  "BATCH_JOB_PHASE_RUNNING",
                                  "BATCH_JOB_PHASE_SUCCEEDED",
                                  "BATCH_JOB_PHASE_FAILED", "BATCH_JOB_PHASE_ERROR",
                                  and "BATCH_JOB_PHASE_CANCELLED".
                                "started_at":
                                  "2020-02-20 00:00:00",  # Optional. IndexingJob
                                  description.
                                "status":
                                  "INDEX_JOB_STATUS_UNKNOWN",  # Optional. Default
                                  value is "INDEX_JOB_STATUS_UNKNOWN". Known values
                                  are: "INDEX_JOB_STATUS_UNKNOWN",
                                  "INDEX_JOB_STATUS_PARTIAL",
                                  "INDEX_JOB_STATUS_IN_PROGRESS",
                                  "INDEX_JOB_STATUS_COMPLETED",
                                  "INDEX_JOB_STATUS_FAILED",
                                  "INDEX_JOB_STATUS_NO_CHANGES",
                                  "INDEX_JOB_STATUS_PENDING", and
                                  "INDEX_JOB_STATUS_CANCELLED".
                                "tokens": 0,  #
                                  Optional. Number of tokens [This field is
                                  deprecated].
                                "total_datasources":
                                  0,  # Optional. Number of datasources being indexed.
                                "total_tokens":
                                  "str",  # Optional. Total Tokens Consumed By the
                                  Indexing Job.
                                "updated_at":
                                  "2020-02-20 00:00:00",  # Optional. Last modified.
                                "uuid": "str"  #
                                  Optional. Unique id.
                            },
                            "name": "str",  # Optional.
                              Name of knowledge base.
                            "project_id": "str",  #
                              Optional. List of knowledge bases associated with the
                              agent template.
                            "region": "str",  # Optional.
                              Region code.
                            "reranking_config": {
                                "enabled": bool,  #
                                  Optional. Whether reranking is enabled for retrieval.
                                "model": "str"  #
                                  Optional. Reranker model internal name.
                            },
                            "tags": [
                                "str"  # Optional.
                                  Tags to organize related resources.
                            ],
                            "updated_at": "2020-02-20
                              00:00:00",  # Optional. Last modified.
                            "user_id": "str",  #
                              Optional. Id of user that created the knowledge base.
                            "uuid": "str"  # Optional.
                              Unique id for knowledge base.
                        }
                    ],
                    "long_description": "str",  # Optional. The
                      long description of the agent template.
                    "max_tokens": 0,  # Optional. The max_tokens
                      setting for the agent template.
                    "model": {
                        "agreement": {
                            "description": "str",  #
                              Optional. Agreement Description.
                            "name": "str",  # Optional.
                              Agreement Description.
                            "url": "str",  # Optional.
                              Agreement Description.
                            "uuid": "str"  # Optional.
                              Agreement Description.
                        },
                        "benchmark_score": {},  # Optional.
                          Benchmark scores for this model, stored as arbitrary JSON.
                        "capabilities": [
                            "str"  # Optional. High-level
                              capabilities (e.g. tool_calling, vision, streaming).
                        ],
                        "context_window": "str",  # Optional.
                          Context window size in tokens.
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. Creation date / time.
                        "endpoints": [
                            {
                                "capabilities": [
                                    "str"  #
                                      Optional. Capabilities supported by this endpoint
                                      (e.g. input_text, output_text, input_image).
                                ],
                                "endpoint": "str"  #
                                  Optional. The endpoint path (e.g. /chat/responses).
                            }
                        ],
                        "inference_name": "str",  # Optional.
                          Internally used name.
                        "inference_version": "str",  #
                          Optional. Internally used version.
                        "is_foundational": bool,  # Optional.
                          True if it is a foundational model provided by do.
                        "kb_default_chunk_size": 0,  #
                          Optional. Default chunking size limit to show in UI.
                        "kb_max_chunk_size": 0,  # Optional.
                          Maximum chunk size limit of model.
                        "kb_min_chunk_size": 0,  # Optional.
                          Minimum chunking size token limits if model supports
                          KNOWLEDGEBASE usecase.
                        "lifecycle_status": "str",  #
                          Optional. Lifecycle status of the model (internal,
                          public-preview, active, deprecated, end_of_life).
                        "metadata": {},  # Optional.
                          Additional meta data.
                        "modalities": {
                            "input": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ],
                            "output": [
                                "str"  # Optional.
                                  Input/output modalities.
                            ]
                        },
                        "name": "str",  # Optional. Name of
                          the model.
                        "parameter_count": 0.0,  # Optional.
                          Parameter count in billions.
                        "parent_uuid": "str",  # Optional.
                          Unique id of the model, this model is based on.
                        "provider":
                          "MODEL_PROVIDER_DIGITALOCEAN",  # Optional. Default value is
                          "MODEL_PROVIDER_DIGITALOCEAN". Known values are:
                          "MODEL_PROVIDER_DIGITALOCEAN", "MODEL_PROVIDER_ANTHROPIC",
                          and "MODEL_PROVIDER_OPENAI".
                        "reasoning_efforts": [
                            "str"  # Optional. Available
                              reasoning efforts for this model.
                        ],
                        "settings": [
                            {
                                "default_string":
                                  "str",  # Optional. String default value (for
                                  type="dropdown", e.g. "medium").
                                "default_value": 0.0,
                                  # Optional. Numeric default value (for
                                  type="number").
                                "max": 0.0,  #
                                  Optional. Maximum allowed value (for type="number").
                                "min": 0.0,  #
                                  Optional. Minimum allowed value (for type="number").
                                "name": "str",  #
                                  Optional. Setting key name (e.g. "max_tokens",
                                  "temperature", "resolution").
                                "options": [
                                    "str"  #
                                      Optional. Allowed values for dropdown selections
                                      (for type="dropdown").
                                ],
                                "step": 0.0,  #
                                  Optional. Step increment for numeric settings (for
                                  type="number").
                                "type": "str"  #
                                  Optional. Setting value type: "number" or "dropdown".
                            }
                        ],
                        "thinking": bool,  # Optional.
                          Whether this model supports extended thinking (Anthropic
                          models).
                        "type": "str",  # Optional. Model
                          type (chat, embedding, image, reasoning, coding).
                        "updated_at": "2020-02-20 00:00:00",
                          # Optional. Last modified.
                        "upload_complete": bool,  # Optional.
                          Model has been fully uploaded.
                        "url": "str",  # Optional. Download
                          url.
                        "usecases": [
                            "str"  # Optional. Usecases
                              of the model.
                        ],
                        "uuid": "str",  # Optional. Unique
                          id.
                        "version": {
                            "major": 0,  # Optional.
                              Major version number.
                            "minor": 0,  # Optional.
                              Minor version number.
                            "patch": 0  # Optional. Patch
                              version number.
                        }
                    },
                    "name": "str",  # Optional. Name of the agent
                      template.
                    "short_description": "str",  # Optional. The
                      short description of the agent template.
                    "summary": "str",  # Optional. The summary of
                      the agent template.
                    "tags": [
                        "str"  # Optional. List of tags
                          associated with the agent template.
                    ],
                    "temperature": 0.0,  # Optional. The
                      temperature setting for the agent template.
                    "template_type":
                      "AGENT_TEMPLATE_TYPE_STANDARD",  # Optional. Default value is
                      "AGENT_TEMPLATE_TYPE_STANDARD". * AGENT_TEMPLATE_TYPE_STANDARD:
                      The standard agent template    * AGENT_TEMPLATE_TYPE_ONE_CLICK:
                      The one click agent template. Known values are:
                      "AGENT_TEMPLATE_TYPE_STANDARD" and
                      "AGENT_TEMPLATE_TYPE_ONE_CLICK".
                    "top_p": 0.0,  # Optional. The top_p setting
                      for the agent template.
                    "updated_at": "2020-02-20 00:00:00",  #
                      Optional. The agent template's last updated date.
                    "uuid": "str"  # Optional. Unique id.
                },
                "thinking_token_budget": 0,  # Optional. The thinking
                  token budget for Anthropic extended thinking (0 = disabled).
                "top_p": 0.0,  # Optional. Agents.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Last modified.
                "url": "str",  # Optional. Access your agent under
                  this url.
                "user_id": "str",  # Optional. Id of user that
                  created the agent.
                "uuid": "str",  # Optional. Unique agent id.
                "version_hash": "str",  # Optional. The latest
                  version of the agent.
                "vpc_egress_ips": [
                    "str"  # Optional. VPC Egress IPs.
                ],
                "vpc_uuid": "str",  # Optional. Agents.
                "workspace": ...
            }
        ],
        "created_at": "2020-02-20 00:00:00",  # Optional. Creation date.
        "created_by": "str",  # Optional. The id of user who created this
          workspace.
        "created_by_email": "str",  # Optional. The email of the user who
          created this workspace.
        "deleted_at": "2020-02-20 00:00:00",  # Optional. Deleted date.
        "description": "str",  # Optional. Description of the workspace.
        "evaluation_test_cases": [
            {
                "archived_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "created_by_user_email": "str",  # Optional.
                  Evaluations.
                "created_by_user_id": "str",  # Optional.
                  Evaluations.
                "dataset": {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. Time created at.
                    "dataset_name": "str",  # Optional. Name of
                      the dataset.
                    "dataset_type":
                      "EVALUATION_DATASET_TYPE_UNKNOWN",  # Optional. Default value is
                      "EVALUATION_DATASET_TYPE_UNKNOWN". Known values are:
                      "EVALUATION_DATASET_TYPE_UNKNOWN", "EVALUATION_DATASET_TYPE_ADK",
                      "EVALUATION_DATASET_TYPE_NON_ADK", and
                      "EVALUATION_DATASET_TYPE_MODEL".
                    "dataset_uuid": "str",  # Optional. UUID of
                      the dataset.
                    "file_size": "str",  # Optional. The size of
                      the dataset uploaded file in bytes.
                    "has_ground_truth": bool,  # Optional. Does
                      the dataset have a ground truth column?.
                    "row_count": 0  # Optional. Number of rows in
                      the dataset.
                },
                "dataset_name": "str",  # Optional. Evaluations.
                "dataset_uuid": "str",  # Optional. Evaluations.
                "description": "str",  # Optional. Evaluations.
                "latest_version_number_of_runs": 0,  # Optional.
                  Evaluations.
                "metrics": [
                    {
                        "category":
                          "METRIC_CATEGORY_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_CATEGORY_UNSPECIFIED". Known values are:
                          "METRIC_CATEGORY_UNSPECIFIED", "METRIC_CATEGORY_CORRECTNESS",
                          "METRIC_CATEGORY_USER_OUTCOMES",
                          "METRIC_CATEGORY_SAFETY_AND_SECURITY",
                          "METRIC_CATEGORY_CONTEXT_QUALITY", and
                          "METRIC_CATEGORY_MODEL_FIT".
                        "description": "str",  # Optional.
                          Evaluations.
                        "evaluation_scope":
                          "EVALUATION_SCOPE_UNSPECIFIED",  # Optional. Default value is
                          "EVALUATION_SCOPE_UNSPECIFIED". Scope that determines whether
                          a metric belongs to agent evaluation or model evaluation. For
                          backwards compatibility, UNSPECIFIED defaults to agent
                          metrics only in list operations. Known values are:
                          "EVALUATION_SCOPE_UNSPECIFIED", "EVALUATION_SCOPE_AGENT", and
                          "EVALUATION_SCOPE_MODEL".
                        "inverted": bool,  # Optional. If
                          true, the metric is inverted, meaning that a lower value is
                          better.
                        "is_metric_goal": bool,  # Optional.
                          Evaluations.
                        "metric_name": "str",  # Optional.
                          Evaluations.
                        "metric_rank": 0,  # Optional.
                          Evaluations.
                        "metric_type":
                          "METRIC_TYPE_UNSPECIFIED",  # Optional. Default value is
                          "METRIC_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_TYPE_UNSPECIFIED", "METRIC_TYPE_GENERAL_QUALITY",
                          "METRIC_TYPE_RAG_AND_TOOL", "METRIC_TYPE_MODEL_QUALITY", and
                          "METRIC_TYPE_MODEL_SAFETY".
                        "metric_uuid": "str",  # Optional.
                          Evaluations.
                        "metric_value_type":
                          "METRIC_VALUE_TYPE_UNSPECIFIED",  # Optional. Default value
                          is "METRIC_VALUE_TYPE_UNSPECIFIED". Known values are:
                          "METRIC_VALUE_TYPE_UNSPECIFIED", "METRIC_VALUE_TYPE_NUMBER",
                          "METRIC_VALUE_TYPE_STRING", and
                          "METRIC_VALUE_TYPE_PERCENTAGE".
                        "range_max": 0.0,  # Optional. The
                          maximum value for the metric.
                        "range_min": 0.0  # Optional. The
                          minimum value for the metric.
                    }
                ],
                "name": "str",  # Optional. Evaluations.
                "star_metric": {
                    "metric_uuid": "str",  # Optional.
                      Evaluations.
                    "name": "str",  # Optional. Evaluations.
                    "success_threshold": 0.0,  # Optional. The
                      success threshold for the star metric. This is a value that the
                      metric must reach to be considered successful.
                    "success_threshold_pct": 0  # Optional. The
                      success threshold for the star metric. This is a percentage value
                      between 0 and 100.
                },
                "test_case_uuid": "str",  # Optional. Evaluations.
                "total_runs": 0,  # Optional. Evaluations.
                "updated_at": "2020-02-20 00:00:00",  # Optional.
                  Evaluations.
                "updated_by_user_email": "str",  # Optional.
                  Evaluations.
                "updated_by_user_id": "str",  # Optional.
                  Evaluations.
                "version": 0  # Optional. Evaluations.
            }
        ],
        "name": "str",  # Optional. Name of the workspace.
        "updated_at": "2020-02-20 00:00:00",  # Optional. Update date.
        "uuid": "str"  # Optional. Unique id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ImageActionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s image_actions attribute.

get(image_id: int, action_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Action.

To retrieve the status of an image action, send a GET request to /v2/images/$IMAGE_ID/actions/$IMAGE_ACTION_ID.

Parameters:
  • image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

  • action_id (int) – A unique numeric ID that can be used to identify and reference an action. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "completed_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the action was
      completed.
    "id": 0,  # Optional. A unique numeric ID that can be used to identify and
      reference an action.
    "region": {
        "available": bool,  # This is a boolean value that represents whether
          new Droplets can be created in this region. Required.
        "features": [
            "str"  # This attribute is set to an array which contains
              features available in this region. Required.
        ],
        "name": "str",  # The display name of the region.  This will be a
          full name that is used in the control panel and other interfaces. Required.
        "sizes": [
            "str"  # This attribute is set to an array which contains the
              identifying slugs for the sizes available in this region. sizes:read is
              required to view. Required.
        ],
        "slug": "str"  # A human-readable string that is used as a unique
          identifier for each region. Required.
    },
    "region_slug": "str",  # Optional. A human-readable string that is used as a
      unique identifier for each region.
    "resource_id": 0,  # Optional. A unique identifier for the resource that the
      action is associated with.
    "resource_type": "str",  # Optional. The type of resource that the action is
      associated with.
    "started_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the action was
      initiated.
    "status": "in-progress",  # Optional. Default value is "in-progress". The
      current status of the action. This can be "in-progress", "completed", or
      "errored". Known values are: "in-progress", "completed", and "errored".
    "type": "str"  # Optional. This is the type of action that the object
      represents. For example, this could be "transfer" to represent the state of an
      image transfer action.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(image_id: int, **kwargs: Any) MutableMapping[str, Any]

List All Actions for an Image.

To retrieve all actions that have been executed on an image, send a GET request to /v2/images/$IMAGE_ID/actions.

Parameters:

image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "actions": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was completed.
            "id": 0,  # Optional. A unique numeric ID that can be used to
              identify and reference an action.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": "str",  # Optional. A human-readable string
              that is used as a unique identifier for each region.
            "resource_id": 0,  # Optional. A unique identifier for the
              resource that the action is associated with.
            "resource_type": "str",  # Optional. The type of resource
              that the action is associated with.
            "started_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was initiated.
            "status": "in-progress",  # Optional. Default value is
              "in-progress". The current status of the action. This can be
              "in-progress", "completed", or "errored". Known values are:
              "in-progress", "completed", and "errored".
            "type": "str"  # Optional. This is the type of action that
              the object represents. For example, this could be "transfer" to represent
              the state of an image transfer action.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post(image_id: int, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
post(image_id: int, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate an Image Action.

The following actions are available on an Image.

Convert an Image to a Snapshot

To convert an image, for example, a backup to a snapshot, send a POST request to /v2/images/$IMAGE_ID/actions. Set the type attribute to convert.

Transfer an Image

To transfer an image to another region, send a POST request to /v2/images/$IMAGE_ID/actions. Set the type attribute to transfer and set region attribute to the slug identifier of the region you wish to transfer to.

param image_id:

A unique number that can be used to identify and reference a specific image. Required.

type image_id:

int

param body:

Is either a JSON type or a IO[bytes] type. Default value is None.

type body:

JSON or IO[bytes]

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "completed_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the action was
      completed.
    "id": 0,  # Optional. A unique numeric ID that can be used to identify and
      reference an action.
    "region": {
        "available": bool,  # This is a boolean value that represents whether
          new Droplets can be created in this region. Required.
        "features": [
            "str"  # This attribute is set to an array which contains
              features available in this region. Required.
        ],
        "name": "str",  # The display name of the region.  This will be a
          full name that is used in the control panel and other interfaces. Required.
        "sizes": [
            "str"  # This attribute is set to an array which contains the
              identifying slugs for the sizes available in this region. sizes:read is
              required to view. Required.
        ],
        "slug": "str"  # A human-readable string that is used as a unique
          identifier for each region. Required.
    },
    "region_slug": "str",  # Optional. A human-readable string that is used as a
      unique identifier for each region.
    "resource_id": 0,  # Optional. A unique identifier for the resource that the
      action is associated with.
    "resource_type": "str",  # Optional. The type of resource that the action is
      associated with.
    "started_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the action was
      initiated.
    "status": "in-progress",  # Optional. Default value is "in-progress". The
      current status of the action. This can be "in-progress", "completed", or
      "errored". Known values are: "in-progress", "completed", and "errored".
    "type": "str"  # Optional. This is the type of action that the object
      represents. For example, this could be "transfer" to represent the state of an
      image transfer action.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ImagesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s images attribute.

create_custom(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_custom(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Custom Image.

To create a new custom image, send a POST request to /v2/images. The body must contain a url attribute pointing to a Linux virtual machine image to be imported into DigitalOcean. The image must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after

being decompressed.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "region": "str",  # The slug identifier for the region where the resource
      will initially be  available. Required. Known values are: "ams1", "ams2", "ams3",
      "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1",
      "tor1", and "syd1".
    "url": "str",  # A URL from which the custom Linux virtual machine image may
      be retrieved.  The image it points to must be in the raw, qcow2, vhdx, vdi, or
      vmdk format.  It may be compressed using gzip or bzip2 and must be smaller than
      100 GB after being decompressed. Required.
    "description": "str",  # Optional. An optional free-form text field to
      describe an image.
    "distribution": "str",  # Optional. The name of a custom image's
      distribution. Currently, the valid values are  ``Arch Linux``"" , ``CentOS``"" ,
      ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora Atomic``"" ,  ``FreeBSD``""
      , ``Gentoo``"" , ``openSUSE``"" , ``RancherOS``"" , ``Rocky Linux``"" ,
      ``Ubuntu``"" , and ``Unknown``.  Any other value will be accepted but ignored,
      and ``Unknown`` will be used in its place. Known values are: "Arch Linux",
      "CentOS", "CoreOS", "Debian", "Fedora", "Fedora Atomic", "FreeBSD", "Gentoo",
      "openSUSE", "RancherOS", "Rocky Linux", "Ubuntu", and "Unknown".
    "name": "str",  # Optional. The display name that has been given to an image.
      This is what is shown in the control panel and is generally a descriptive title
      for the image in question.
    "tags": [
        "str"  # Optional. A flat array of tag names as strings to be applied
          to the resource. Tag names may be for either existing or new tags.
          :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
    ]
}

# response body for status code(s): 202
response == {
    "image": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the image was
          created.
        "description": "str",  # Optional. An optional free-form text field
          to describe an image.
        "distribution": "str",  # Optional. The name of a custom image's
          distribution. Currently, the valid values are  ``Arch Linux``"" ,
          ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora
          Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" , ``openSUSE``"" , ``RancherOS``""
          , ``Rocky Linux``"" , ``Ubuntu``"" , and ``Unknown``.  Any other value will
          be accepted but ignored, and ``Unknown`` will be used in its place. Known
          values are: "Arch Linux", "CentOS", "CoreOS", "Debian", "Fedora", "Fedora
          Atomic", "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Rocky Linux",
          "Ubuntu", and "Unknown".
        "error_message": "str",  # Optional. A string containing information
          about errors that may occur when importing  a custom image.
        "id": 0,  # Optional. A unique number that can be used to identify
          and reference a specific image.
        "min_disk_size": 0,  # Optional. The minimum disk size in GB required
          for a Droplet to use this image.
        "name": "str",  # Optional. The display name that has been given to
          an image.  This is what is shown in the control panel and is generally a
          descriptive title for the image in question.
        "public": bool,  # Optional. This is a boolean value that indicates
          whether the image in question is public or not. An image that is public is
          available to all accounts. A non-public image is only accessible from your
          account.
        "regions": [
            "str"  # Optional. This attribute is an array of the regions
              that the image is available in. The regions are represented by their
              identifying slug values.
        ],
        "size_gigabytes": 0.0,  # Optional. The size of the image in
          gigabytes.
        "slug": "str",  # Optional. A uniquely identifying string that is
          associated with each of the DigitalOcean-provided public images. These can be
          used to reference a public image as an alternative to the numeric id.
        "status": "str",  # Optional. A status string indicating the state of
          a custom image. This may be ``NEW``"" ,  ``available``"" , ``pending``"" ,
          ``deleted``"" , or ``retired``. Known values are: "NEW", "available",
          "pending", "deleted", and "retired".
        "tags": [
            "str"  # Optional. A flat array of tag names as strings to be
              applied to the resource. Tag names may be for either existing or new
              tags. :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
        ],
        "type": "str"  # Optional. Describes the kind of image. It may be one
          of ``base``"" , ``snapshot``"" , ``backup``"" , ``custom``"" , or ``admin``.
          Respectively, this specifies whether an image is a DigitalOcean base OS
          image, user-generated Droplet snapshot, automatically created Droplet backup,
          user-provided virtual machine image, or an image used for DigitalOcean
          managed resources (e.g. DOKS worker nodes). Known values are: "base",
          "snapshot", "backup", "custom", and "admin".
    }
}
delete(image_id: int, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an Image.

To delete a snapshot or custom image, send a DELETE request to /v2/images/$IMAGE_ID.

Parameters:

image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(image_id: MutableMapping[str, Any], **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Image.

To retrieve information about an image, send a GET request to /v2/images/$IDENTIFIER.

Parameters:

image_id (JSON) –

A unique number (id) or string (slug) used to identify and reference a specific image.

Public images can be identified by image id or slug.

Private images must be identified by image id. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "image": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the image was
          created.
        "description": "str",  # Optional. An optional free-form text field
          to describe an image.
        "distribution": "str",  # Optional. The name of a custom image's
          distribution. Currently, the valid values are  ``Arch Linux``"" ,
          ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora
          Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" , ``openSUSE``"" , ``RancherOS``""
          , ``Rocky Linux``"" , ``Ubuntu``"" , and ``Unknown``.  Any other value will
          be accepted but ignored, and ``Unknown`` will be used in its place. Known
          values are: "Arch Linux", "CentOS", "CoreOS", "Debian", "Fedora", "Fedora
          Atomic", "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Rocky Linux",
          "Ubuntu", and "Unknown".
        "error_message": "str",  # Optional. A string containing information
          about errors that may occur when importing  a custom image.
        "id": 0,  # Optional. A unique number that can be used to identify
          and reference a specific image.
        "min_disk_size": 0,  # Optional. The minimum disk size in GB required
          for a Droplet to use this image.
        "name": "str",  # Optional. The display name that has been given to
          an image.  This is what is shown in the control panel and is generally a
          descriptive title for the image in question.
        "public": bool,  # Optional. This is a boolean value that indicates
          whether the image in question is public or not. An image that is public is
          available to all accounts. A non-public image is only accessible from your
          account.
        "regions": [
            "str"  # Optional. This attribute is an array of the regions
              that the image is available in. The regions are represented by their
              identifying slug values.
        ],
        "size_gigabytes": 0.0,  # Optional. The size of the image in
          gigabytes.
        "slug": "str",  # Optional. A uniquely identifying string that is
          associated with each of the DigitalOcean-provided public images. These can be
          used to reference a public image as an alternative to the numeric id.
        "status": "str",  # Optional. A status string indicating the state of
          a custom image. This may be ``NEW``"" ,  ``available``"" , ``pending``"" ,
          ``deleted``"" , or ``retired``. Known values are: "NEW", "available",
          "pending", "deleted", and "retired".
        "tags": [
            "str"  # Optional. A flat array of tag names as strings to be
              applied to the resource. Tag names may be for either existing or new
              tags. :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
        ],
        "type": "str"  # Optional. Describes the kind of image. It may be one
          of ``base``"" , ``snapshot``"" , ``backup``"" , ``custom``"" , or ``admin``.
          Respectively, this specifies whether an image is a DigitalOcean base OS
          image, user-generated Droplet snapshot, automatically created Droplet backup,
          user-provided virtual machine image, or an image used for DigitalOcean
          managed resources (e.g. DOKS worker nodes). Known values are: "base",
          "snapshot", "backup", "custom", and "admin".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, type: Optional[str] = None, private: Optional[bool] = None, tag_name: Optional[str] = None, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Images.

To list all of the images available on your account, send a GET request to /v2/images.

Filtering Results


It’s possible to request filtered results by including certain query parameters.

Image Type

Either 1-Click Application or OS Distribution images can be filtered by using the type query parameter.

Important: The type query parameter does not directly relate to the type attribute.

To retrieve only **distribution** images, include the type query parameter set to distribution, /v2/images?type=distribution.

To retrieve only **application** images, include the type query parameter set to application, /v2/images?type=application.

User Images

To retrieve only the private images of a user, include the private query parameter set to true, /v2/images?private=true.

Tags

To list all images assigned to a specific tag, include the tag_name query parameter set to the name of the tag in your GET request. For example, /v2/images?tag_name=$TAG_NAME.

keyword type:

Filters results based on image type which can be either application or distribution. Known values are: “application” and “distribution”. Default value is None.

paramtype type:

str

keyword private:

Used to filter only user images. Default value is None.

paramtype private:

bool

keyword tag_name:

Used to filter images by a specific tag. Default value is None.

paramtype tag_name:

str

keyword per_page:

Number of items returned per page. Default value is 20.

paramtype per_page:

int

keyword page:

Which ‘page’ of paginated results to return. Default value is 1.

paramtype page:

int

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# response body for status code(s): 200
response == {
    "images": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the image was created.
            "description": "str",  # Optional. An optional free-form text
              field to describe an image.
            "distribution": "str",  # Optional. The name of a custom
              image's distribution. Currently, the valid values are  ``Arch Linux``"" ,
              ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora
              Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" , ``openSUSE``"" ,
              ``RancherOS``"" , ``Rocky Linux``"" , ``Ubuntu``"" , and ``Unknown``.
              Any other value will be accepted but ignored, and ``Unknown`` will be
              used in its place. Known values are: "Arch Linux", "CentOS", "CoreOS",
              "Debian", "Fedora", "Fedora Atomic", "FreeBSD", "Gentoo", "openSUSE",
              "RancherOS", "Rocky Linux", "Ubuntu", and "Unknown".
            "error_message": "str",  # Optional. A string containing
              information about errors that may occur when importing  a custom image.
            "id": 0,  # Optional. A unique number that can be used to
              identify and reference a specific image.
            "min_disk_size": 0,  # Optional. The minimum disk size in GB
              required for a Droplet to use this image.
            "name": "str",  # Optional. The display name that has been
              given to an image.  This is what is shown in the control panel and is
              generally a descriptive title for the image in question.
            "public": bool,  # Optional. This is a boolean value that
              indicates whether the image in question is public or not. An image that
              is public is available to all accounts. A non-public image is only
              accessible from your account.
            "regions": [
                "str"  # Optional. This attribute is an array of the
                  regions that the image is available in. The regions are represented
                  by their identifying slug values.
            ],
            "size_gigabytes": 0.0,  # Optional. The size of the image in
              gigabytes.
            "slug": "str",  # Optional. A uniquely identifying string
              that is associated with each of the DigitalOcean-provided public images.
              These can be used to reference a public image as an alternative to the
              numeric id.
            "status": "str",  # Optional. A status string indicating the
              state of a custom image. This may be ``NEW``"" ,  ``available``"" ,
              ``pending``"" , ``deleted``"" , or ``retired``. Known values are: "NEW",
              "available", "pending", "deleted", and "retired".
            "tags": [
                "str"  # Optional. A flat array of tag names as
                  strings to be applied to the resource. Tag names may be for either
                  existing or new tags. :code:`<br>`:code:`<br>`Requires ``tag:create``
                  scope.
            ],
            "type": "str"  # Optional. Describes the kind of image. It
              may be one of ``base``"" , ``snapshot``"" , ``backup``"" , ``custom``"" ,
              or ``admin``. Respectively, this specifies whether an image is a
              DigitalOcean base OS image, user-generated Droplet snapshot,
              automatically created Droplet backup, user-provided virtual machine
              image, or an image used for DigitalOcean managed resources (e.g. DOKS
              worker nodes). Known values are: "base", "snapshot", "backup", "custom",
              and "admin".
        }
    ],
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    }
}
post_account_transfer_accept(image_id: int, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
post_account_transfer_accept(image_id: int, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Accept an Image Account Transfer.

To accept an account transfer for an image, send a POST request to /v2/images/$IMAGE_ID/account_transfer/accept.

Parameters:
  • image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "recipient_uuid": "str"  # The UUID of the team that the image will be
      transferred to. Required.
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post_account_transfer_cancel(image_id: int, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
post_account_transfer_cancel(image_id: int, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Cancel an Image Account Transfer.

To cancel an account transfer for an image, send a POST request to /v2/images/$IMAGE_ID/account_transfer/cancel.

Only the sender of an image account transfer can cancel the transfer. If the transfer is canceled, the image will remain in the sender’s account and will not be transferred to the recipient.

Parameters:
  • image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "transfer_id": 0  # A unique number that used to identify and reference an
      image account transfer. Required.
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post_account_transfer_create(image_id: int, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
post_account_transfer_create(image_id: int, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate an Image Account Transfer.

To initiate an account transfer for an image, send a POST request to /v2/images/$IMAGE_ID/account_transfer.

Only snapshot images may be transferred by this endpoint to another account.

An image account transfer always has exactly one recipient, specified in the request body. The recipient can be one of the following:

  • A DigitalOcean account, denoted by recipient_email in the request body. The recipient will receive an email with instructions to accept the transfer. Once the recipient accepts the transfer, the image will be moved to their account.

  • A DigitalOcean team, denoted by recipient_uuid in the request body. If the user has sufficient permissions in the recipient team, the transfer will be automatically accepted and the image will be moved to the recipient team’s account. Otherwise, the transfer will be pending until a user with sufficient permissions in the recipient team accepts the transfer.

Parameters:
  • image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "transfer_id": 0  # Optional. A unique number that used to identify and
      reference an image account transfer.
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post_account_transfer_decline(image_id: int, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
post_account_transfer_decline(image_id: int, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Decline an Image Account Transfer.

To decline an account transfer for an image, send a POST request to /v2/images/$IMAGE_ID/account_transfer/decline.

Only the recipient of an image account transfer can decline the transfer. If the transfer is declined, the image will remain in the sender’s account and will not be transferred to the recipient.

Parameters:
  • image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "transfer_id": 0  # A unique number that used to identify and reference an
      image account transfer. Required.
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(image_id: int, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(image_id: int, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an Image.

To update an image, send a PUT request to /v2/images/$IMAGE_ID. Set the name attribute to the new value you would like to use. For custom images, the description and distribution attributes may also be updated.

Parameters:
  • image_id (int) – A unique number that can be used to identify and reference a specific image. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "description": "str",  # Optional. An optional free-form text field to
      describe an image.
    "distribution": "str",  # Optional. The name of a custom image's
      distribution. Currently, the valid values are  ``Arch Linux``"" , ``CentOS``"" ,
      ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora Atomic``"" ,  ``FreeBSD``""
      , ``Gentoo``"" , ``openSUSE``"" , ``RancherOS``"" , ``Rocky Linux``"" ,
      ``Ubuntu``"" , and ``Unknown``.  Any other value will be accepted but ignored,
      and ``Unknown`` will be used in its place. Known values are: "Arch Linux",
      "CentOS", "CoreOS", "Debian", "Fedora", "Fedora Atomic", "FreeBSD", "Gentoo",
      "openSUSE", "RancherOS", "Rocky Linux", "Ubuntu", and "Unknown".
    "name": "str"  # Optional. The display name that has been given to an image.
      This is what is shown in the control panel and is generally a descriptive title
      for the image in question.
}

# response body for status code(s): 200
response == {
    "image": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the image was
          created.
        "description": "str",  # Optional. An optional free-form text field
          to describe an image.
        "distribution": "str",  # Optional. The name of a custom image's
          distribution. Currently, the valid values are  ``Arch Linux``"" ,
          ``CentOS``"" , ``CoreOS``"" , ``Debian``"" , ``Fedora``"" , ``Fedora
          Atomic``"" ,  ``FreeBSD``"" , ``Gentoo``"" , ``openSUSE``"" , ``RancherOS``""
          , ``Rocky Linux``"" , ``Ubuntu``"" , and ``Unknown``.  Any other value will
          be accepted but ignored, and ``Unknown`` will be used in its place. Known
          values are: "Arch Linux", "CentOS", "CoreOS", "Debian", "Fedora", "Fedora
          Atomic", "FreeBSD", "Gentoo", "openSUSE", "RancherOS", "Rocky Linux",
          "Ubuntu", and "Unknown".
        "error_message": "str",  # Optional. A string containing information
          about errors that may occur when importing  a custom image.
        "id": 0,  # Optional. A unique number that can be used to identify
          and reference a specific image.
        "min_disk_size": 0,  # Optional. The minimum disk size in GB required
          for a Droplet to use this image.
        "name": "str",  # Optional. The display name that has been given to
          an image.  This is what is shown in the control panel and is generally a
          descriptive title for the image in question.
        "public": bool,  # Optional. This is a boolean value that indicates
          whether the image in question is public or not. An image that is public is
          available to all accounts. A non-public image is only accessible from your
          account.
        "regions": [
            "str"  # Optional. This attribute is an array of the regions
              that the image is available in. The regions are represented by their
              identifying slug values.
        ],
        "size_gigabytes": 0.0,  # Optional. The size of the image in
          gigabytes.
        "slug": "str",  # Optional. A uniquely identifying string that is
          associated with each of the DigitalOcean-provided public images. These can be
          used to reference a public image as an alternative to the numeric id.
        "status": "str",  # Optional. A status string indicating the state of
          a custom image. This may be ``NEW``"" ,  ``available``"" , ``pending``"" ,
          ``deleted``"" , or ``retired``. Known values are: "NEW", "available",
          "pending", "deleted", and "retired".
        "tags": [
            "str"  # Optional. A flat array of tag names as strings to be
              applied to the resource. Tag names may be for either existing or new
              tags. :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
        ],
        "type": "str"  # Optional. Describes the kind of image. It may be one
          of ``base``"" , ``snapshot``"" , ``backup``"" , ``custom``"" , or ``admin``.
          Respectively, this specifies whether an image is a DigitalOcean base OS
          image, user-generated Droplet snapshot, automatically created Droplet backup,
          user-provided virtual machine image, or an image used for DigitalOcean
          managed resources (e.g. DOKS worker nodes). Known values are: "base",
          "snapshot", "backup", "custom", and "admin".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.InferenceOperations(*args, **kwargs)

Bases: StreamingMixin, InferenceOperations

InferenceOperations with fully automatic streaming support.

Every generated method that takes a body parameter is wrapped so that body["stream"] == True triggers SSE streaming automatically. No per-endpoint overrides are needed.

create_async_invoke(body, **kwargs)

Generate Image, Audio, or Text-to-Speech Using fal Models.

Generate Image, Audio, or Text-to-Speech Using fal Models. This endpoint starts an asynchronous job and returns a request_id. The job status is QUEUED initially. Use the request_id to poll for the result.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "input": {
        "enable_safety_checker": bool,  # Optional. Whether to enable the
          safety checker for generated content.
        "guidance_scale": 0.0,  # Optional. Controls how closely the image
          generation model follows the prompt. Higher values produce output more
          closely matching the prompt.
        "num_images": 0,  # Optional. The number of images to generate.
        "num_inference_steps": 0,  # Optional. The number of inference steps
          to use during image generation. More steps generally produce higher quality
          output but take longer.
        "output_format": "str",  # Optional. The desired output format or
          aspect ratio for image generation.
        "prompt": "str",  # Optional. The text prompt describing the desired
          output. Used for image generation and audio generation models.
        "seconds_total": 0,  # Optional. The total duration in seconds for
          generated audio. Used for audio generation models.
        "text": "str"  # Optional. The text content to convert to speech.
          Used for text-to-speech models.
    },
    "model_id": "str",  # The ID of the model to invoke asynchronously. Required.
    "tags": [
        {
            "key": "str",  # The tag key. Required.
            "value": "str"  # The tag value. Required.
        }
    ]
}

# response body for status code(s): 200, 202
response == {
    "created_at": "2020-02-20 00:00:00",  # The timestamp when the request was
      created. Required.
    "model_id": "str",  # The model ID that was invoked. Required.
    "request_id": "str",  # A unique identifier for the async invocation request.
      Use this ID to check the status and retrieve the result. Required.
    "status": "str",  # The current status of the async invocation. Required.
      Known values are: "QUEUED", "IN_PROGRESS", "COMPLETED", and "FAILED".
    "completed_at": "2020-02-20 00:00:00",  # Optional. The timestamp when the
      job completed. Null until finished.
    "error": "str",  # Optional. Error message if the job failed. Null on
      success.
    "output": {
        "str": {}  # Optional. The output of the invocation. Null while the
          job is queued or in progress. Contains the result once completed.
    },
    "started_at": "2020-02-20 00:00:00"  # Optional. The timestamp when the job
      started processing. Null while queued.
}
class pydo.operations.InvoicesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s invoices attribute.

get_by_uuid(invoice_uuid: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Invoice by UUID.

To retrieve the invoice items for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID.

Parameters:
  • invoice_uuid (str) – UUID of the invoice. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "invoice_items": [
        {
            "amount": "str",  # Optional. Billed amount of this invoice
              item. Billed in USD.
            "description": "str",  # Optional. Description of the invoice
              item.
            "duration": "str",  # Optional. Duration of time this invoice
              item was used and subsequently billed.
            "duration_unit": "str",  # Optional. Unit of time for
              duration.
            "end_time": "str",  # Optional. Time the invoice item stopped
              being billed for usage.
            "group_description": "str",  # Optional. Description of the
              invoice item when it is a grouped set of usage, such  as DOKS or
              databases.
            "product": "str",  # Optional. Name of the product being
              billed in the invoice item.
            "project_name": "str",  # Optional. Name of the DigitalOcean
              Project this resource belongs to.
            "resource_id": "str",  # Optional. ID of the resource billing
              in the invoice item if available.
            "resource_uuid": "str",  # Optional. UUID of the resource
              billing in the invoice item if available.
            "start_time": "str"  # Optional. Time the invoice item began
              to be billed for usage.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_csv_by_uuid(invoice_uuid: str, **kwargs: Any) Union[str, MutableMapping[str, Any]]

Retrieve an Invoice CSV by UUID.

To retrieve a CSV for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/csv.

Parameters:

invoice_uuid (str) – UUID of the invoice. Required.

Returns:

str or JSON object

Return type:

str or JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_pdf_by_uuid(invoice_uuid: str, **kwargs: Any) Union[Iterator[bytes], MutableMapping[str, Any]]

Retrieve an Invoice PDF by UUID.

To retrieve a PDF for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/pdf.

Parameters:

invoice_uuid (str) – UUID of the invoice. Required.

Returns:

Iterator[bytes] or JSON object

Return type:

Iterator[bytes] or JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_summary_by_uuid(invoice_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Invoice Summary by UUID.

To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary.

Parameters:

invoice_uuid (str) – UUID of the invoice. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "amount": "str",  # Optional. Total amount of the invoice, in USD.  This will
      reflect month-to-date usage in the invoice preview.
    "billing_period": "str",  # Optional. Billing period of usage for which the
      invoice is issued, in ``YYYY-MM``  format.
    "credits_and_adjustments": {
        "amount": "str",  # Optional. Total amount charged in USD.
        "name": "str"  # Optional. Name of the charge.
    },
    "invoice_id": "str",  # Optional. ID of the invoice.
    "invoice_uuid": "str",  # Optional. UUID of the invoice.
    "overages": {
        "amount": "str",  # Optional. Total amount charged in USD.
        "name": "str"  # Optional. Name of the charge.
    },
    "product_charges": {
        "amount": "str",  # Optional. Total amount charged.
        "items": [
            {
                "amount": "str",  # Optional. Amount of the charge.
                "count": "str",  # Optional. Number of times the
                  charge was applied.
                "name": "str"  # Optional. Description of the charge.
            }
        ],
        "name": "str"  # Optional. Description of usage charges.
    },
    "taxes": {
        "amount": "str",  # Optional. Total amount charged in USD.
        "name": "str"  # Optional. Name of the charge.
    },
    "user_billing_address": {
        "address_line1": "str",  # Optional. Street address line 1.
        "address_line2": "str",  # Optional. Street address line 2.
        "city": "str",  # Optional. City.
        "country_iso2_code": "str",  # Optional. Country (ISO2) code.
        "created_at": "str",  # Optional. Timestamp billing address was
          created.
        "postal_code": "str",  # Optional. Postal code.
        "region": "str",  # Optional. Region.
        "updated_at": "str"  # Optional. Timestamp billing address was
          updated.
    },
    "user_company": "str",  # Optional. Company of the DigitalOcean customer
      being invoiced, if set.
    "user_email": "str",  # Optional. Email of the DigitalOcean customer being
      invoiced.
    "user_name": "str"  # Optional. Name of the DigitalOcean customer being
      invoiced.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Invoices.

To retrieve a list of all invoices, send a GET request to /v2/customers/my/invoices.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "invoice_preview": {
        "amount": "str",  # Optional. Total amount of the invoice, in USD.
          This will reflect month-to-date usage in the invoice preview.
        "invoice_id": "str",  # Optional. ID of the invoice. Listed on the
          face of the invoice PDF as the "Invoice number".
        "invoice_period": "str",  # Optional. Billing period of usage for
          which the invoice is issued, in ``YYYY-MM``  format.
        "invoice_uuid": "str",  # Optional. The UUID of the invoice. The
          canonical reference for the invoice.
        "updated_at": "str"  # Optional. Time the invoice was last updated.
          This is only included with the invoice preview.
    },
    "invoices": [
        {
            "amount": "str",  # Optional. Total amount of the invoice, in
              USD.  This will reflect month-to-date usage in the invoice preview.
            "invoice_id": "str",  # Optional. ID of the invoice. Listed
              on the face of the invoice PDF as the "Invoice number".
            "invoice_period": "str",  # Optional. Billing period of usage
              for which the invoice is issued, in ``YYYY-MM``  format.
            "invoice_uuid": "str",  # Optional. The UUID of the invoice.
              The canonical reference for the invoice.
            "updated_at": "str"  # Optional. Time the invoice was last
              updated.  This is only included with the invoice preview.
        }
    ],
    "links": {
        "pages": {}
    }
}
class pydo.operations.KubernetesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s kubernetes attribute.

add_node_pool(cluster_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
add_node_pool(cluster_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Add a Node Pool to a Kubernetes Cluster.

To add an additional node pool to a Kubernetes clusters, send a POST request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools with the following attributes.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "auto_scale": bool,  # Optional. A boolean value indicating whether
      auto-scaling is enabled for this node pool.
    "count": 0,  # Optional. The number of Droplet instances in the node pool.
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a specific node pool.
    "labels": {},  # Optional. An object of key/value mappings specifying labels
      to apply to all nodes in a pool. Labels will automatically be applied to all
      existing nodes and any subsequent nodes added to the pool. Note that when a label
      is removed, it is not deleted from the nodes in the pool.
    "max_nodes": 0,  # Optional. The maximum number of nodes that this node pool
      can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is set to
      ``false``.
    "min_nodes": 0,  # Optional. The minimum number of nodes that this node pool
      can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is set to
      ``false``.
    "name": "str",  # Optional. A human-readable name for the node pool.
    "nodes": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the node was created.
            "droplet_id": "str",  # Optional. The ID of the Droplet used
              for the worker node.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the node.
            "name": "str",  # Optional. An automatically generated,
              human-readable name for the node.
            "status": {
                "state": "str"  # Optional. A string indicating the
                  current status of the node. Known values are: "provisioning",
                  "running", "draining", and "deleting".
            },
            "updated_at": "2020-02-20 00:00:00"  # Optional. A time value
              given in ISO8601 combined date and time format that represents when the
              node was last updated.
        }
    ],
    "size": "str",  # Optional. The slug identifier for the type of Droplet used
      as workers in the node pool.
    "tags": [
        "str"  # Optional. An array containing the tags applied to the node
          pool. All node pools are automatically tagged ``k8s``"" , ``k8s-worker``"" ,
          and ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires ``tag:read``
          scope.
    ],
    "taints": [
        {
            "effect": "str",  # Optional. How the node reacts to pods
              that it won't tolerate. Available effect values are ``NoSchedule``"" ,
              ``PreferNoSchedule``"" , and ``NoExecute``. Known values are:
              "NoSchedule", "PreferNoSchedule", and "NoExecute".
            "key": "str",  # Optional. An arbitrary string. The ``key``
              and ``value`` fields of the ``taint`` object form a key-value pair. For
              example, if the value of the ``key`` field is "special" and the value of
              the ``value`` field is "gpu", the key value pair would be
              ``special=gpu``.
            "value": "str"  # Optional. An arbitrary string. The ``key``
              and ``value`` fields of the ``taint`` object form a key-value pair. For
              example, if the value of the ``key`` field is "special" and the value of
              the ``value`` field is "gpu", the key value pair would be
              ``special=gpu``.
        }
    ]
}

# response body for status code(s): 201
response == {
    "node_pool": {
        "auto_scale": bool,  # Optional. A boolean value indicating whether
          auto-scaling is enabled for this node pool.
        "count": 0,  # Optional. The number of Droplet instances in the node
          pool.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a specific node pool.
        "labels": {},  # Optional. An object of key/value mappings specifying
          labels to apply to all nodes in a pool. Labels will automatically be applied
          to all existing nodes and any subsequent nodes added to the pool. Note that
          when a label is removed, it is not deleted from the nodes in the pool.
        "max_nodes": 0,  # Optional. The maximum number of nodes that this
          node pool can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is
          set to ``false``.
        "min_nodes": 0,  # Optional. The minimum number of nodes that this
          node pool can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is
          set to ``false``.
        "name": "str",  # Optional. A human-readable name for the node pool.
        "nodes": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the node was created.
                "droplet_id": "str",  # Optional. The ID of the
                  Droplet used for the worker node.
                "id": "str",  # Optional. A unique ID that can be
                  used to identify and reference the node.
                "name": "str",  # Optional. An automatically
                  generated, human-readable name for the node.
                "status": {
                    "state": "str"  # Optional. A string
                      indicating the current status of the node. Known values are:
                      "provisioning", "running", "draining", and "deleting".
                },
                "updated_at": "2020-02-20 00:00:00"  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the node was last updated.
            }
        ],
        "size": "str",  # Optional. The slug identifier for the type of
          Droplet used as workers in the node pool.
        "tags": [
            "str"  # Optional. An array containing the tags applied to
              the node pool. All node pools are automatically tagged ``k8s``"" ,
              ``k8s-worker``"" , and ``k8s:$K8S_CLUSTER_ID``.
              :code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
        ],
        "taints": [
            {
                "effect": "str",  # Optional. How the node reacts to
                  pods that it won't tolerate. Available effect values are
                  ``NoSchedule``"" , ``PreferNoSchedule``"" , and ``NoExecute``. Known
                  values are: "NoSchedule", "PreferNoSchedule", and "NoExecute".
                "key": "str",  # Optional. An arbitrary string. The
                  ``key`` and ``value`` fields of the ``taint`` object form a key-value
                  pair. For example, if the value of the ``key`` field is "special" and
                  the value of the ``value`` field is "gpu", the key value pair would
                  be ``special=gpu``.
                "value": "str"  # Optional. An arbitrary string. The
                  ``key`` and ``value`` fields of the ``taint`` object form a key-value
                  pair. For example, if the value of the ``key`` field is "special" and
                  the value of the ``value`` field is "gpu", the key value pair would
                  be ``special=gpu``.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
add_registries(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) None
add_registries(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) None

Add Container Registries to Kubernetes Clusters.

To integrate the container registries with Kubernetes clusters, send a POST request to /v2/kubernetes/registries.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

None

Return type:

None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "cluster_uuids": [
        "str"  # Optional. An array containing the UUIDs of Kubernetes
          clusters.
    ],
    "registries": [
        "str"  # Optional. An array containing the registry names.
    ]
}
add_registry(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) None
add_registry(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) None

Add Container Registry to Kubernetes Clusters.

To integrate the container registry with Kubernetes clusters, send a POST request to /v2/kubernetes/registry.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

None

Return type:

None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "cluster_uuids": [
        "str"  # Optional. An array containing the UUIDs of Kubernetes
          clusters.
    ]
}
create_cluster(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_cluster(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Kubernetes Cluster.

To create a new Kubernetes cluster, send a POST request to /v2/kubernetes/clusters. The request must contain at least one node pool with at least one worker.

The request may contain a maintenance window policy describing a time period when disruptive maintenance tasks may be carried out. Omitting the policy implies that a window will be chosen automatically. See here for details.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # A human-readable name for a Kubernetes cluster. Required.
    "node_pools": [
        {
            "auto_scale": bool,  # Optional. A boolean value indicating
              whether auto-scaling is enabled for this node pool.
            "count": 0,  # Optional. The number of Droplet instances in
              the node pool.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a specific node pool.
            "labels": {},  # Optional. An object of key/value mappings
              specifying labels to apply to all nodes in a pool. Labels will
              automatically be applied to all existing nodes and any subsequent nodes
              added to the pool. Note that when a label is removed, it is not deleted
              from the nodes in the pool.
            "max_nodes": 0,  # Optional. The maximum number of nodes that
              this node pool can be auto-scaled to. The value will be ``0`` if
              ``auto_scale`` is set to ``false``.
            "min_nodes": 0,  # Optional. The minimum number of nodes that
              this node pool can be auto-scaled to. The value will be ``0`` if
              ``auto_scale`` is set to ``false``.
            "name": "str",  # Optional. A human-readable name for the
              node pool.
            "nodes": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. A time value given in ISO8601 combined date and time
                      format that represents when the node was created.
                    "droplet_id": "str",  # Optional. The ID of
                      the Droplet used for the worker node.
                    "id": "str",  # Optional. A unique ID that
                      can be used to identify and reference the node.
                    "name": "str",  # Optional. An automatically
                      generated, human-readable name for the node.
                    "status": {
                        "state": "str"  # Optional. A string
                          indicating the current status of the node. Known values are:
                          "provisioning", "running", "draining", and "deleting".
                    },
                    "updated_at": "2020-02-20 00:00:00"  #
                      Optional. A time value given in ISO8601 combined date and time
                      format that represents when the node was last updated.
                }
            ],
            "size": "str",  # Optional. The slug identifier for the type
              of Droplet used as workers in the node pool.
            "tags": [
                "str"  # Optional. An array containing the tags
                  applied to the node pool. All node pools are automatically tagged
                  ``k8s``"" , ``k8s-worker``"" , and ``k8s:$K8S_CLUSTER_ID``.
                  :code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
            ],
            "taints": [
                {
                    "effect": "str",  # Optional. How the node
                      reacts to pods that it won't tolerate. Available effect values
                      are ``NoSchedule``"" , ``PreferNoSchedule``"" , and
                      ``NoExecute``. Known values are: "NoSchedule",
                      "PreferNoSchedule", and "NoExecute".
                    "key": "str",  # Optional. An arbitrary
                      string. The ``key`` and ``value`` fields of the ``taint`` object
                      form a key-value pair. For example, if the value of the ``key``
                      field is "special" and the value of the ``value`` field is "gpu",
                      the key value pair would be ``special=gpu``.
                    "value": "str"  # Optional. An arbitrary
                      string. The ``key`` and ``value`` fields of the ``taint`` object
                      form a key-value pair. For example, if the value of the ``key``
                      field is "special" and the value of the ``value`` field is "gpu",
                      the key value pair would be ``special=gpu``.
                }
            ]
        }
    ],
    "region": "str",  # The slug identifier for the region where the Kubernetes
      cluster is located. Required.
    "version": "str",  # The slug identifier for the version of Kubernetes used
      for the cluster. If set to a minor version (e.g. "1.14"), the latest version
      within it will be used (e.g. "1.14.6-do.1"); if set to "latest", the latest
      published version will be used. See the ``/v2/kubernetes/options`` endpoint to
      find all currently available versions. Required.
    "amd_gpu_device_metrics_exporter_plugin": {
        "enabled": bool  # Optional. Indicates whether the AMD Device Metrics
          Exporter is enabled.
    },
    "amd_gpu_device_plugin": {
        "enabled": bool  # Optional. Indicates whether the AMD GPU Device
          Plugin is enabled.
    },
    "auto_upgrade": False,  # Optional. Default value is False. A boolean value
      indicating whether the cluster will be automatically upgraded to new patch
      releases during its maintenance window.
    "cluster_autoscaler_configuration": {
        "expanders": [
            "str"  # Optional. Customizes expanders used by
              cluster-autoscaler. The autoscaler will apply each expander from the
              provided list to narrow down the selection of node types created to scale
              up, until either a single node type is left, or the list of expanders is
              exhausted. If this flag is unset, autoscaler will use its default
              expander ``random``. Passing an empty list ("" *not* ``null``"" ) will
              unset any previous expander customizations.  Available expanders:   *
              ``random``"" : Randomly selects a node group to scale. * `priority`:
              Selects the node group with the highest priority as per [user-provided
              configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)
              * ``least_waste``"" : Selects the node group that will result in the
              least amount of idle resources.
        ],
        "scale_down_unneeded_time": "str",  # Optional. Used to customize how
          long a node is unneeded before being scaled down.
        "scale_down_utilization_threshold": 0.0  # Optional. Used to
          customize when cluster autoscaler scales down non-empty nodes by setting the
          node utilization threshold.
    },
    "cluster_subnet": "str",  # Optional. The range of IP addresses for the
      overlay network of the Kubernetes cluster in CIDR notation.
    "control_plane_firewall": {
        "allowed_addresses": [
            "str"  # Optional. An array of public addresses (IPv4 or
              CIDR) allowed to access the control plane.
        ],
        "enabled": bool  # Optional. Indicates whether the control plane
          firewall is enabled.
    },
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the Kubernetes cluster
      was created.
    "endpoint": "str",  # Optional. The base URL of the API server on the
      Kubernetes master node.
    "ha": bool,  # Optional. A boolean value indicating whether the control plane
      is run in a highly available configuration in the cluster. Highly available
      control planes incur less downtime. The property cannot be disabled. When omitted
      on create, the default is version-dependent; for DOKS 1.36.0 and later, the
      default is true; for earlier versions, the default is false.
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a Kubernetes cluster.
    "ipv4": "str",  # Optional. The public IPv4 address of the Kubernetes master
      node. This will not be set if high availability is configured on the cluster
      (v1.21+).
    "maintenance_policy": {
        "day": "str",  # Optional. The day of the maintenance window policy.
          May be one of ``monday`` through ``sunday``"" , or ``any`` to indicate an
          arbitrary week day. Known values are: "any", "monday", "tuesday",
          "wednesday", "thursday", "friday", "saturday", and "sunday".
        "duration": "str",  # Optional. The duration of the maintenance
          window policy in human-readable format.
        "start_time": "str"  # Optional. The start time in UTC of the
          maintenance window policy in 24-hour clock format / HH:MM notation (e.g.,
          ``15:00``"" ).
    },
    "nvidia_gpu_device_plugin": {
        "enabled": bool  # Optional. Indicates whether the Nvidia GPU Device
          Plugin is enabled.
    },
    "rdma_shared_dev_plugin": {
        "enabled": bool  # Optional. Indicates whether the RDMA shared device
          plugin is enabled.
    },
    "registry_enabled": bool,  # Optional. A read-only boolean value indicating
      if a container registry is integrated with the cluster.
    "routing_agent": {
        "enabled": bool  # Optional. Indicates whether the routing-agent
          component is enabled.
    },
    "service_subnet": "str",  # Optional. The range of assignable IP addresses
      for services running in the Kubernetes cluster in CIDR notation.
    "sso": {
        "client_id": "str",  # Optional. The OIDC client ID registered with
          the identity provider. Required when ``enabled`` is ``true``.
        "enabled": False,  # Optional. Default value is False. Indicates
          whether SSO authentication is enabled for the cluster.
        "issuer_url": "str",  # Optional. The OIDC issuer URL for the
          identity provider. Required when ``enabled`` is ``true``.
        "required": False  # Optional. Default value is False. Indicates
          whether any non-SSO forms of authentication are disallowed. Can only be set
          to ``true`` when ``enabled`` is ``true``.
    },
    "status": {
        "message": "str",  # Optional. An optional message providing
          additional information about the current cluster state.
        "state": "str"  # Optional. A string indicating the current status of
          the cluster. Known values are: "running", "provisioning", "degraded",
          "error", "deleted", "upgrading", and "deleting".
    },
    "surge_upgrade": False,  # Optional. Default value is False. A boolean value
      indicating whether surge upgrade is enabled/disabled for the cluster. Surge
      upgrade makes cluster upgrades fast and reliable by bringing up new nodes before
      destroying the outdated nodes.
    "tags": [
        "str"  # Optional. An array of tags to apply to the Kubernetes
          cluster. All clusters are automatically tagged ``k8s`` and
          ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires ``tag:read`` and
          ``tag:create`` scope, as well as ``tag:delete`` if existing tags are getting
          removed.
    ],
    "updated_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the Kubernetes cluster
      was last updated.
    "vpc_uuid": "str"  # Optional. A string specifying the UUID of the VPC to
      which the Kubernetes cluster is assigned.:code:`<br>`:code:`<br>`Requires
      ``vpc:read`` scope.
}

# response body for status code(s): 201
response == {
    "kubernetes_cluster": {
        "name": "str",  # A human-readable name for a Kubernetes cluster.
          Required.
        "node_pools": [
            {
                "auto_scale": bool,  # Optional. A boolean value
                  indicating whether auto-scaling is enabled for this node pool.
                "count": 0,  # Optional. The number of Droplet
                  instances in the node pool.
                "id": "str",  # Optional. A unique ID that can be
                  used to identify and reference a specific node pool.
                "labels": {},  # Optional. An object of key/value
                  mappings specifying labels to apply to all nodes in a pool. Labels
                  will automatically be applied to all existing nodes and any
                  subsequent nodes added to the pool. Note that when a label is
                  removed, it is not deleted from the nodes in the pool.
                "max_nodes": 0,  # Optional. The maximum number of
                  nodes that this node pool can be auto-scaled to. The value will be
                  ``0`` if ``auto_scale`` is set to ``false``.
                "min_nodes": 0,  # Optional. The minimum number of
                  nodes that this node pool can be auto-scaled to. The value will be
                  ``0`` if ``auto_scale`` is set to ``false``.
                "name": "str",  # Optional. A human-readable name for
                  the node pool.
                "nodes": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. A time value given in ISO8601 combined date and
                          time format that represents when the node was created.
                        "droplet_id": "str",  # Optional. The
                          ID of the Droplet used for the worker node.
                        "id": "str",  # Optional. A unique ID
                          that can be used to identify and reference the node.
                        "name": "str",  # Optional. An
                          automatically generated, human-readable name for the node.
                        "status": {
                            "state": "str"  # Optional. A
                              string indicating the current status of the node. Known
                              values are: "provisioning", "running", "draining", and
                              "deleting".
                        },
                        "updated_at": "2020-02-20 00:00:00"
                          # Optional. A time value given in ISO8601 combined date and
                          time format that represents when the node was last updated.
                    }
                ],
                "size": "str",  # Optional. The slug identifier for
                  the type of Droplet used as workers in the node pool.
                "tags": [
                    "str"  # Optional. An array containing the
                      tags applied to the node pool. All node pools are automatically
                      tagged ``k8s``"" , ``k8s-worker``"" , and
                      ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires
                      ``tag:read`` scope.
                ],
                "taints": [
                    {
                        "effect": "str",  # Optional. How the
                          node reacts to pods that it won't tolerate. Available effect
                          values are ``NoSchedule``"" , ``PreferNoSchedule``"" , and
                          ``NoExecute``. Known values are: "NoSchedule",
                          "PreferNoSchedule", and "NoExecute".
                        "key": "str",  # Optional. An
                          arbitrary string. The ``key`` and ``value`` fields of the
                          ``taint`` object form a key-value pair. For example, if the
                          value of the ``key`` field is "special" and the value of the
                          ``value`` field is "gpu", the key value pair would be
                          ``special=gpu``.
                        "value": "str"  # Optional. An
                          arbitrary string. The ``key`` and ``value`` fields of the
                          ``taint`` object form a key-value pair. For example, if the
                          value of the ``key`` field is "special" and the value of the
                          ``value`` field is "gpu", the key value pair would be
                          ``special=gpu``.
                    }
                ]
            }
        ],
        "region": "str",  # The slug identifier for the region where the
          Kubernetes cluster is located. Required.
        "version": "str",  # The slug identifier for the version of
          Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"), the
          latest version within it will be used (e.g. "1.14.6-do.1"); if set to
          "latest", the latest published version will be used. See the
          ``/v2/kubernetes/options`` endpoint to find all currently available versions.
          Required.
        "amd_gpu_device_metrics_exporter_plugin": {
            "enabled": bool  # Optional. Indicates whether the AMD Device
              Metrics Exporter is enabled.
        },
        "amd_gpu_device_plugin": {
            "enabled": bool  # Optional. Indicates whether the AMD GPU
              Device Plugin is enabled.
        },
        "auto_upgrade": False,  # Optional. Default value is False. A boolean
          value indicating whether the cluster will be automatically upgraded to new
          patch releases during its maintenance window.
        "cluster_autoscaler_configuration": {
            "expanders": [
                "str"  # Optional. Customizes expanders used by
                  cluster-autoscaler. The autoscaler will apply each expander from the
                  provided list to narrow down the selection of node types created to
                  scale up, until either a single node type is left, or the list of
                  expanders is exhausted. If this flag is unset, autoscaler will use
                  its default expander ``random``. Passing an empty list ("" *not*
                  ``null``"" ) will unset any previous expander customizations.
                  Available expanders:   * ``random``"" : Randomly selects a node group
                  to scale. * `priority`: Selects the node group with the highest
                  priority as per [user-provided
                  configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)
                  * ``least_waste``"" : Selects the node group that will result in the
                  least amount of idle resources.
            ],
            "scale_down_unneeded_time": "str",  # Optional. Used to
              customize how long a node is unneeded before being scaled down.
            "scale_down_utilization_threshold": 0.0  # Optional. Used to
              customize when cluster autoscaler scales down non-empty nodes by setting
              the node utilization threshold.
        },
        "cluster_subnet": "str",  # Optional. The range of IP addresses for
          the overlay network of the Kubernetes cluster in CIDR notation.
        "control_plane_firewall": {
            "allowed_addresses": [
                "str"  # Optional. An array of public addresses (IPv4
                  or CIDR) allowed to access the control plane.
            ],
            "enabled": bool  # Optional. Indicates whether the control
              plane firewall is enabled.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the Kubernetes
          cluster was created.
        "endpoint": "str",  # Optional. The base URL of the API server on the
          Kubernetes master node.
        "ha": bool,  # Optional. A boolean value indicating whether the
          control plane is run in a highly available configuration in the cluster.
          Highly available control planes incur less downtime. The property cannot be
          disabled. When omitted on create, the default is version-dependent; for DOKS
          1.36.0 and later, the default is true; for earlier versions, the default is
          false.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a Kubernetes cluster.
        "ipv4": "str",  # Optional. The public IPv4 address of the Kubernetes
          master node. This will not be set if high availability is configured on the
          cluster (v1.21+).
        "maintenance_policy": {
            "day": "str",  # Optional. The day of the maintenance window
              policy. May be one of ``monday`` through ``sunday``"" , or ``any`` to
              indicate an arbitrary week day. Known values are: "any", "monday",
              "tuesday", "wednesday", "thursday", "friday", "saturday", and "sunday".
            "duration": "str",  # Optional. The duration of the
              maintenance window policy in human-readable format.
            "start_time": "str"  # Optional. The start time in UTC of the
              maintenance window policy in 24-hour clock format / HH:MM notation (e.g.,
              ``15:00``"" ).
        },
        "nvidia_gpu_device_plugin": {
            "enabled": bool  # Optional. Indicates whether the Nvidia GPU
              Device Plugin is enabled.
        },
        "rdma_shared_dev_plugin": {
            "enabled": bool  # Optional. Indicates whether the RDMA
              shared device plugin is enabled.
        },
        "registry_enabled": bool,  # Optional. A read-only boolean value
          indicating if a container registry is integrated with the cluster.
        "routing_agent": {
            "enabled": bool  # Optional. Indicates whether the
              routing-agent component is enabled.
        },
        "service_subnet": "str",  # Optional. The range of assignable IP
          addresses for services running in the Kubernetes cluster in CIDR notation.
        "sso": {
            "client_id": "str",  # Optional. The OIDC client ID
              registered with the identity provider. Required when ``enabled`` is
              ``true``.
            "enabled": False,  # Optional. Default value is False.
              Indicates whether SSO authentication is enabled for the cluster.
            "issuer_url": "str",  # Optional. The OIDC issuer URL for the
              identity provider. Required when ``enabled`` is ``true``.
            "required": False  # Optional. Default value is False.
              Indicates whether any non-SSO forms of authentication are disallowed. Can
              only be set to ``true`` when ``enabled`` is ``true``.
        },
        "status": {
            "message": "str",  # Optional. An optional message providing
              additional information about the current cluster state.
            "state": "str"  # Optional. A string indicating the current
              status of the cluster. Known values are: "running", "provisioning",
              "degraded", "error", "deleted", "upgrading", and "deleting".
        },
        "surge_upgrade": False,  # Optional. Default value is False. A
          boolean value indicating whether surge upgrade is enabled/disabled for the
          cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing
          up new nodes before destroying the outdated nodes.
        "tags": [
            "str"  # Optional. An array of tags to apply to the
              Kubernetes cluster. All clusters are automatically tagged ``k8s`` and
              ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires ``tag:read``
              and ``tag:create`` scope, as well as ``tag:delete`` if existing tags are
              getting removed.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the Kubernetes
          cluster was last updated.
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the Kubernetes cluster is
          assigned.:code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
    }
}
delete_cluster(cluster_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Kubernetes Cluster.

To delete a Kubernetes cluster and all services deployed to it, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID.

A 204 status code with no body will be returned in response to a successful request.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_node(cluster_id: str, node_pool_id: str, node_id: str, *, skip_drain: int = 0, replace: int = 0, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Node in a Kubernetes Cluster.

To delete a single node in a pool, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID.

Appending the skip_drain=1 query parameter to the request causes node draining to be skipped. Omitting the query parameter or setting its value to 0 carries out draining prior to deletion.

Appending the replace=1 query parameter to the request causes the node to be replaced by a new one after deletion. Omitting the query parameter or setting its value to 0 deletes without replacement.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • node_pool_id (str) – A unique ID that can be used to reference a Kubernetes node pool. Required.

  • node_id (str) – A unique ID that can be used to reference a node in a Kubernetes node pool. Required.

  • skip_drain (int) – Specifies whether or not to drain workloads from a node before it is deleted. Setting it to 1 causes node draining to be skipped. Omitting the query parameter or setting its value to 0 carries out draining prior to deletion. Default value is 0.

  • replace (int) – Specifies whether or not to replace a node after it has been deleted. Setting it to 1 causes the node to be replaced by a new one after deletion. Omitting the query parameter or setting its value to 0 deletes without replacement. Default value is 0.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_node_pool(cluster_id: str, node_pool_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Node Pool in a Kubernetes Cluster.

To delete a node pool, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID.

A 204 status code with no body will be returned in response to a successful request. Nodes in the pool will subsequently be drained and deleted.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • node_pool_id (str) – A unique ID that can be used to reference a Kubernetes node pool. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_associated_resources_dangerous(cluster_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Cluster and All of its Associated Resources (Dangerous).

To delete a Kubernetes cluster with all of its associated resources, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/dangerous. A 204 status code with no body will be returned in response to a successful request.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
destroy_associated_resources_selective(cluster_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
destroy_associated_resources_selective(cluster_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Selectively Delete a Cluster and its Associated Resources.

To delete a Kubernetes cluster along with a subset of its associated resources, send a DELETE request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources/selective.

The JSON body of the request should include load_balancers, volumes, or volume_snapshots keys each set to an array of IDs for the associated resources to be destroyed.

The IDs can be found by querying the cluster’s associated resources endpoint. Any associated resource not included in the request will remain and continue to accrue changes on your account.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "load_balancers": [
        "str"  # Optional. A list of IDs for associated load balancers to
          destroy along with the cluster.
    ],
    "volume_snapshots": [
        "str"  # Optional. A list of IDs for associated volume snapshots to
          destroy along with the cluster.
    ],
    "volumes": [
        "str"  # Optional. A list of IDs for associated volumes to destroy
          along with the cluster.
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_available_upgrades(cluster_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Available Upgrades for an Existing Kubernetes Cluster.

To determine whether a cluster can be upgraded, and the versions to which it can be upgraded, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "available_upgrade_versions": [
        {
            "kubernetes_version": "str",  # Optional. The upstream
              version string for the version of Kubernetes provided by a given slug.
            "slug": "str",  # Optional. The slug identifier for an
              available version of Kubernetes for use when creating or updating a
              cluster. The string contains both the upstream version of Kubernetes as
              well as the DigitalOcean revision.
            "supported_features": [
                "str"  # Optional. The features available with the
                  version of Kubernetes provided by a given slug.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_cluster(cluster_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Kubernetes Cluster.

To show information about an existing Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "kubernetes_cluster": {
        "name": "str",  # A human-readable name for a Kubernetes cluster.
          Required.
        "node_pools": [
            {
                "auto_scale": bool,  # Optional. A boolean value
                  indicating whether auto-scaling is enabled for this node pool.
                "count": 0,  # Optional. The number of Droplet
                  instances in the node pool.
                "id": "str",  # Optional. A unique ID that can be
                  used to identify and reference a specific node pool.
                "labels": {},  # Optional. An object of key/value
                  mappings specifying labels to apply to all nodes in a pool. Labels
                  will automatically be applied to all existing nodes and any
                  subsequent nodes added to the pool. Note that when a label is
                  removed, it is not deleted from the nodes in the pool.
                "max_nodes": 0,  # Optional. The maximum number of
                  nodes that this node pool can be auto-scaled to. The value will be
                  ``0`` if ``auto_scale`` is set to ``false``.
                "min_nodes": 0,  # Optional. The minimum number of
                  nodes that this node pool can be auto-scaled to. The value will be
                  ``0`` if ``auto_scale`` is set to ``false``.
                "name": "str",  # Optional. A human-readable name for
                  the node pool.
                "nodes": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. A time value given in ISO8601 combined date and
                          time format that represents when the node was created.
                        "droplet_id": "str",  # Optional. The
                          ID of the Droplet used for the worker node.
                        "id": "str",  # Optional. A unique ID
                          that can be used to identify and reference the node.
                        "name": "str",  # Optional. An
                          automatically generated, human-readable name for the node.
                        "status": {
                            "state": "str"  # Optional. A
                              string indicating the current status of the node. Known
                              values are: "provisioning", "running", "draining", and
                              "deleting".
                        },
                        "updated_at": "2020-02-20 00:00:00"
                          # Optional. A time value given in ISO8601 combined date and
                          time format that represents when the node was last updated.
                    }
                ],
                "size": "str",  # Optional. The slug identifier for
                  the type of Droplet used as workers in the node pool.
                "tags": [
                    "str"  # Optional. An array containing the
                      tags applied to the node pool. All node pools are automatically
                      tagged ``k8s``"" , ``k8s-worker``"" , and
                      ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires
                      ``tag:read`` scope.
                ],
                "taints": [
                    {
                        "effect": "str",  # Optional. How the
                          node reacts to pods that it won't tolerate. Available effect
                          values are ``NoSchedule``"" , ``PreferNoSchedule``"" , and
                          ``NoExecute``. Known values are: "NoSchedule",
                          "PreferNoSchedule", and "NoExecute".
                        "key": "str",  # Optional. An
                          arbitrary string. The ``key`` and ``value`` fields of the
                          ``taint`` object form a key-value pair. For example, if the
                          value of the ``key`` field is "special" and the value of the
                          ``value`` field is "gpu", the key value pair would be
                          ``special=gpu``.
                        "value": "str"  # Optional. An
                          arbitrary string. The ``key`` and ``value`` fields of the
                          ``taint`` object form a key-value pair. For example, if the
                          value of the ``key`` field is "special" and the value of the
                          ``value`` field is "gpu", the key value pair would be
                          ``special=gpu``.
                    }
                ]
            }
        ],
        "region": "str",  # The slug identifier for the region where the
          Kubernetes cluster is located. Required.
        "version": "str",  # The slug identifier for the version of
          Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"), the
          latest version within it will be used (e.g. "1.14.6-do.1"); if set to
          "latest", the latest published version will be used. See the
          ``/v2/kubernetes/options`` endpoint to find all currently available versions.
          Required.
        "amd_gpu_device_metrics_exporter_plugin": {
            "enabled": bool  # Optional. Indicates whether the AMD Device
              Metrics Exporter is enabled.
        },
        "amd_gpu_device_plugin": {
            "enabled": bool  # Optional. Indicates whether the AMD GPU
              Device Plugin is enabled.
        },
        "auto_upgrade": False,  # Optional. Default value is False. A boolean
          value indicating whether the cluster will be automatically upgraded to new
          patch releases during its maintenance window.
        "cluster_autoscaler_configuration": {
            "expanders": [
                "str"  # Optional. Customizes expanders used by
                  cluster-autoscaler. The autoscaler will apply each expander from the
                  provided list to narrow down the selection of node types created to
                  scale up, until either a single node type is left, or the list of
                  expanders is exhausted. If this flag is unset, autoscaler will use
                  its default expander ``random``. Passing an empty list ("" *not*
                  ``null``"" ) will unset any previous expander customizations.
                  Available expanders:   * ``random``"" : Randomly selects a node group
                  to scale. * `priority`: Selects the node group with the highest
                  priority as per [user-provided
                  configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)
                  * ``least_waste``"" : Selects the node group that will result in the
                  least amount of idle resources.
            ],
            "scale_down_unneeded_time": "str",  # Optional. Used to
              customize how long a node is unneeded before being scaled down.
            "scale_down_utilization_threshold": 0.0  # Optional. Used to
              customize when cluster autoscaler scales down non-empty nodes by setting
              the node utilization threshold.
        },
        "cluster_subnet": "str",  # Optional. The range of IP addresses for
          the overlay network of the Kubernetes cluster in CIDR notation.
        "control_plane_firewall": {
            "allowed_addresses": [
                "str"  # Optional. An array of public addresses (IPv4
                  or CIDR) allowed to access the control plane.
            ],
            "enabled": bool  # Optional. Indicates whether the control
              plane firewall is enabled.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the Kubernetes
          cluster was created.
        "endpoint": "str",  # Optional. The base URL of the API server on the
          Kubernetes master node.
        "ha": False,  # Optional. Default value is False. A boolean value
          indicating whether the control plane is run in a highly available
          configuration in the cluster. Highly available control planes incur less
          downtime. The property cannot be disabled. When omitted on create, the
          default is version-dependent; for DOKS 1.36.0 and later, the default is true;
          for earlier versions, the default is false.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a Kubernetes cluster.
        "ipv4": "str",  # Optional. The public IPv4 address of the Kubernetes
          master node. This will not be set if high availability is configured on the
          cluster (v1.21+).
        "maintenance_policy": {
            "day": "str",  # Optional. The day of the maintenance window
              policy. May be one of ``monday`` through ``sunday``"" , or ``any`` to
              indicate an arbitrary week day. Known values are: "any", "monday",
              "tuesday", "wednesday", "thursday", "friday", "saturday", and "sunday".
            "duration": "str",  # Optional. The duration of the
              maintenance window policy in human-readable format.
            "start_time": "str"  # Optional. The start time in UTC of the
              maintenance window policy in 24-hour clock format / HH:MM notation (e.g.,
              ``15:00``"" ).
        },
        "nvidia_gpu_device_plugin": {
            "enabled": bool  # Optional. Indicates whether the Nvidia GPU
              Device Plugin is enabled.
        },
        "rdma_shared_dev_plugin": {
            "enabled": bool  # Optional. Indicates whether the RDMA
              shared device plugin is enabled.
        },
        "registries": [
            "str"  # Optional. An array of integrated DOCR registries.
        ],
        "registry_enabled": bool,  # Optional. A read-only boolean value
          indicating if a container registry is integrated with the cluster.
        "routing_agent": {
            "enabled": bool  # Optional. Indicates whether the
              routing-agent component is enabled.
        },
        "service_subnet": "str",  # Optional. The range of assignable IP
          addresses for services running in the Kubernetes cluster in CIDR notation.
        "sso": {
            "client_id": "str",  # Optional. The OIDC client ID
              registered with the identity provider. Required when ``enabled`` is
              ``true``.
            "enabled": False,  # Optional. Default value is False.
              Indicates whether SSO authentication is enabled for the cluster.
            "issuer_url": "str",  # Optional. The OIDC issuer URL for the
              identity provider. Required when ``enabled`` is ``true``.
            "required": False  # Optional. Default value is False.
              Indicates whether any non-SSO forms of authentication are disallowed. Can
              only be set to ``true`` when ``enabled`` is ``true``.
        },
        "status": {
            "message": "str",  # Optional. An optional message providing
              additional information about the current cluster state.
            "state": "str"  # Optional. A string indicating the current
              status of the cluster. Known values are: "running", "provisioning",
              "degraded", "error", "deleted", "upgrading", and "deleting".
        },
        "surge_upgrade": False,  # Optional. Default value is False. A
          boolean value indicating whether surge upgrade is enabled/disabled for the
          cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing
          up new nodes before destroying the outdated nodes.
        "tags": [
            "str"  # Optional. An array of tags applied to the Kubernetes
              cluster. All clusters are automatically tagged ``k8s`` and
              ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires ``tag:read``
              scope.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the Kubernetes
          cluster was last updated.
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the Kubernetes cluster is
          assigned.:code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_cluster_lint_results(cluster_id: str, *, run_id: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Fetch Clusterlint Diagnostics for a Kubernetes Cluster.

To request clusterlint diagnostics for your cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint. If the run_id query parameter is provided, then the diagnostics for the specific run is fetched. By default, the latest results are shown.

To find out how to address clusterlint feedback, please refer to the clusterlint check documentation.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • run_id (str) – Specifies the clusterlint run whose results will be retrieved. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "completed_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the schedule
      clusterlint run request was completed.
    "diagnostics": [
        {
            "check_name": "str",  # Optional. The clusterlint check that
              resulted in the diagnostic.
            "message": "str",  # Optional. Feedback about the object for
              users to fix.
            "object": {
                "kind": "str",  # Optional. The kind of Kubernetes
                  API object.
                "name": "str",  # Optional. Name of the object.
                "namespace": "str"  # Optional. The namespace the
                  object resides in the cluster.
            },
            "severity": "str"  # Optional. Can be one of error, warning
              or suggestion.
        }
    ],
    "requested_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the schedule
      clusterlint run request was made.
    "run_id": "str"  # Optional. Id of the clusterlint run that can be used later
      to fetch the diagnostics.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_cluster_user(cluster_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve User Information for a Kubernetes Cluster.

To show information the user associated with a Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/user.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "kubernetes_cluster_user": {
        "groups": [
            "str"  # Optional. A list of in-cluster groups that the user
              belongs to.
        ],
        "username": "str"  # Optional. The username for the cluster admin
          user.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_credentials(cluster_id: str, *, expiry_seconds: int = 0, **kwargs: Any) MutableMapping[str, Any]

Retrieve Credentials for a Kubernetes Cluster.

This endpoint returns a JSON object . It can be used to programmatically construct Kubernetes clients which cannot parse kubeconfig files.

The resulting JSON object contains token-based authentication for clusters supporting it, and certificate-based authentication otherwise. For a list of supported versions and more information, see “How to Connect to a DigitalOcean Kubernetes Cluster“.

To retrieve credentials for accessing a Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/credentials.

Clusters supporting token-based authentication may define an expiration by passing a duration in seconds as a query parameter to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/credentials?expiry_seconds=$DURATION_IN_SECONDS. If not set or 0, then the token will have a 7 day expiry. The query parameter has no impact in certificate-based authentication.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • expiry_seconds (int) – The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry. Default value is 0.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "certificate_authority_data": bytes("bytes", encoding="utf-8"),  # Optional.
      A base64 encoding of bytes representing the certificate authority data for
      accessing the cluster.
    "client_certificate_data": bytes("bytes", encoding="utf-8"),  # Optional. A
      base64 encoding of bytes representing the x509 client certificate data for access
      the cluster. This is only returned for clusters without support for token-based
      authentication.  Newly created Kubernetes clusters do not return credentials
      using certificate-based authentication. For additional information, `see here
      <https://docs.digitalocean.com/products/kubernetes/how-to/connect-to-cluster/#authenticate>`_.
    "client_key_data": bytes("bytes", encoding="utf-8"),  # Optional. A base64
      encoding of bytes representing the x509 client key data for access the cluster.
      This is only returned for clusters without support for token-based
      authentication.  Newly created Kubernetes clusters do not return credentials
      using certificate-based authentication. For additional information, `see here
      <https://docs.digitalocean.com/products/kubernetes/how-to/connect-to-cluster/#authenticate>`_.
    "expires_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the access token
      expires.
    "server": "str",  # Optional. The URL used to access the cluster API server.
    "token": "str"  # Optional. An access token used to authenticate with the
      cluster. This is only returned for clusters with support for token-based
      authentication.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_kubeconfig(cluster_id: str, *, expiry_seconds: int = 0, type: Optional[str] = None, **kwargs: Any) Optional[MutableMapping[str, Any]]

Retrieve the kubeconfig for a Kubernetes Cluster.

This endpoint returns a kubeconfig file in YAML format. It can be used to connect to and administer the cluster using the Kubernetes command line tool, kubectl, or other programs supporting kubeconfig files (e.g., client libraries).

The resulting kubeconfig file uses token-based authentication for clusters supporting it, and certificate-based authentication otherwise. For a list of supported versions and more information, see “How to Connect to a DigitalOcean Kubernetes Cluster“.

To retrieve a kubeconfig file for use with a Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig.

Clusters supporting token-based authentication may define an expiration by passing a duration in seconds as a query parameter to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/kubeconfig?expiry_seconds=$DURATION_IN_SECONDS. If not set or 0, then the token will have a 7 day expiry. The query parameter has no impact for other kubeconfig types.

Using an sso kubeconfig type requires doctl to be installed to handle the client side of the OAuth2 flow.

Kubernetes Roles granted to a user are derived from that user’s DigitalOcean role. Predefined roles (Owner, Member, Modifier etc.) have an automatic mapping to Kubernetes roles. Custom roles are not automatically mapped to any Kubernetes roles, and require additional configuration by a cluster administrator.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • expiry_seconds (int) – The duration in seconds that the returned Kubernetes credentials will be valid. If not set or 0, the credentials will have a 7 day expiry. Default value is 0.

  • type (str) – The type of credentials to return in the kubeconfig. When omitted, the default credential type for the cluster is used: sso for clusters with SSO enabled, token for clusters without SSO enabled. Known values are: “token” and “sso”. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_node_pool(cluster_id: str, node_pool_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve a Node Pool for a Kubernetes Cluster.

To show information about a specific node pool in a Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • node_pool_id (str) – A unique ID that can be used to reference a Kubernetes node pool. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "node_pool": {
        "auto_scale": bool,  # Optional. A boolean value indicating whether
          auto-scaling is enabled for this node pool.
        "count": 0,  # Optional. The number of Droplet instances in the node
          pool.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a specific node pool.
        "labels": {},  # Optional. An object of key/value mappings specifying
          labels to apply to all nodes in a pool. Labels will automatically be applied
          to all existing nodes and any subsequent nodes added to the pool. Note that
          when a label is removed, it is not deleted from the nodes in the pool.
        "max_nodes": 0,  # Optional. The maximum number of nodes that this
          node pool can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is
          set to ``false``.
        "min_nodes": 0,  # Optional. The minimum number of nodes that this
          node pool can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is
          set to ``false``.
        "name": "str",  # Optional. A human-readable name for the node pool.
        "nodes": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the node was created.
                "droplet_id": "str",  # Optional. The ID of the
                  Droplet used for the worker node.
                "id": "str",  # Optional. A unique ID that can be
                  used to identify and reference the node.
                "name": "str",  # Optional. An automatically
                  generated, human-readable name for the node.
                "status": {
                    "state": "str"  # Optional. A string
                      indicating the current status of the node. Known values are:
                      "provisioning", "running", "draining", and "deleting".
                },
                "updated_at": "2020-02-20 00:00:00"  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the node was last updated.
            }
        ],
        "size": "str",  # Optional. The slug identifier for the type of
          Droplet used as workers in the node pool.
        "tags": [
            "str"  # Optional. An array containing the tags applied to
              the node pool. All node pools are automatically tagged ``k8s``"" ,
              ``k8s-worker``"" , and ``k8s:$K8S_CLUSTER_ID``.
              :code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
        ],
        "taints": [
            {
                "effect": "str",  # Optional. How the node reacts to
                  pods that it won't tolerate. Available effect values are
                  ``NoSchedule``"" , ``PreferNoSchedule``"" , and ``NoExecute``. Known
                  values are: "NoSchedule", "PreferNoSchedule", and "NoExecute".
                "key": "str",  # Optional. An arbitrary string. The
                  ``key`` and ``value`` fields of the ``taint`` object form a key-value
                  pair. For example, if the value of the ``key`` field is "special" and
                  the value of the ``value`` field is "gpu", the key value pair would
                  be ``special=gpu``.
                "value": "str"  # Optional. An arbitrary string. The
                  ``key`` and ``value`` fields of the ``taint`` object form a key-value
                  pair. For example, if the value of the ``key`` field is "special" and
                  the value of the ``value`` field is "gpu", the key value pair would
                  be ``special=gpu``.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_status_messages(cluster_id: str, *, since: Optional[datetime] = None, **kwargs: Any) MutableMapping[str, Any]

Fetch Status Messages for a Kubernetes Cluster.

To retrieve status messages for a Kubernetes cluster, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/status_messages. Status messages inform users of any issues that come up during the cluster lifecycle.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • since (datetime) – A timestamp used to return status messages emitted since the specified time. The timestamp should be in ISO8601 format. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "messages": [
        {
            "message": "str",  # Optional. Status information about the
              cluster which impacts it's lifecycle.
            "timestamp": "2020-02-20 00:00:00"  # Optional. A timestamp
              in ISO8601 format that represents when the status message was emitted.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_associated_resources(cluster_id: str, **kwargs: Any) MutableMapping[str, Any]

List Associated Resources for Cluster Deletion.

To list the associated billable resources that can be destroyed along with a cluster, send a GET request to the /v2/kubernetes/clusters/$K8S_CLUSTER_ID/destroy_with_associated_resources endpoint.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "load_balancers": [
        {
            "id": "str",  # Optional. The ID of a resource associated
              with a Kubernetes cluster.
            "name": "str"  # Optional. The name of a resource associated
              with a Kubernetes cluster.
        }
    ],
    "volume_snapshots": [
        {
            "id": "str",  # Optional. The ID of a resource associated
              with a Kubernetes cluster.
            "name": "str"  # Optional. The name of a resource associated
              with a Kubernetes cluster.
        }
    ],
    "volumes": [
        {
            "id": "str",  # Optional. The ID of a resource associated
              with a Kubernetes cluster.
            "name": "str"  # Optional. The name of a resource associated
              with a Kubernetes cluster.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_clusters(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Kubernetes Clusters.

To list all of the Kubernetes clusters on your account, send a GET request to /v2/kubernetes/clusters.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "kubernetes_clusters": [
        {
            "name": "str",  # A human-readable name for a Kubernetes
              cluster. Required.
            "node_pools": [
                {
                    "auto_scale": bool,  # Optional. A boolean
                      value indicating whether auto-scaling is enabled for this node
                      pool.
                    "count": 0,  # Optional. The number of
                      Droplet instances in the node pool.
                    "id": "str",  # Optional. A unique ID that
                      can be used to identify and reference a specific node pool.
                    "labels": {},  # Optional. An object of
                      key/value mappings specifying labels to apply to all nodes in a
                      pool. Labels will automatically be applied to all existing nodes
                      and any subsequent nodes added to the pool. Note that when a
                      label is removed, it is not deleted from the nodes in the pool.
                    "max_nodes": 0,  # Optional. The maximum
                      number of nodes that this node pool can be auto-scaled to. The
                      value will be ``0`` if ``auto_scale`` is set to ``false``.
                    "min_nodes": 0,  # Optional. The minimum
                      number of nodes that this node pool can be auto-scaled to. The
                      value will be ``0`` if ``auto_scale`` is set to ``false``.
                    "name": "str",  # Optional. A human-readable
                      name for the node pool.
                    "nodes": [
                        {
                            "created_at": "2020-02-20
                              00:00:00",  # Optional. A time value given in ISO8601
                              combined date and time format that represents when the
                              node was created.
                            "droplet_id": "str",  #
                              Optional. The ID of the Droplet used for the worker node.
                            "id": "str",  # Optional. A
                              unique ID that can be used to identify and reference the
                              node.
                            "name": "str",  # Optional.
                              An automatically generated, human-readable name for the
                              node.
                            "status": {
                                "state": "str"  #
                                  Optional. A string indicating the current status of
                                  the node. Known values are: "provisioning",
                                  "running", "draining", and "deleting".
                            },
                            "updated_at": "2020-02-20
                              00:00:00"  # Optional. A time value given in ISO8601
                              combined date and time format that represents when the
                              node was last updated.
                        }
                    ],
                    "size": "str",  # Optional. The slug
                      identifier for the type of Droplet used as workers in the node
                      pool.
                    "tags": [
                        "str"  # Optional. An array
                          containing the tags applied to the node pool. All node pools
                          are automatically tagged ``k8s``"" , ``k8s-worker``"" , and
                          ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires
                          ``tag:read`` scope.
                    ],
                    "taints": [
                        {
                            "effect": "str",  # Optional.
                              How the node reacts to pods that it won't tolerate.
                              Available effect values are ``NoSchedule``"" ,
                              ``PreferNoSchedule``"" , and ``NoExecute``. Known values
                              are: "NoSchedule", "PreferNoSchedule", and "NoExecute".
                            "key": "str",  # Optional. An
                              arbitrary string. The ``key`` and ``value`` fields of the
                              ``taint`` object form a key-value pair. For example, if
                              the value of the ``key`` field is "special" and the value
                              of the ``value`` field is "gpu", the key value pair would
                              be ``special=gpu``.
                            "value": "str"  # Optional.
                              An arbitrary string. The ``key`` and ``value`` fields of
                              the ``taint`` object form a key-value pair. For example,
                              if the value of the ``key`` field is "special" and the
                              value of the ``value`` field is "gpu", the key value pair
                              would be ``special=gpu``.
                        }
                    ]
                }
            ],
            "region": "str",  # The slug identifier for the region where
              the Kubernetes cluster is located. Required.
            "version": "str",  # The slug identifier for the version of
              Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"),
              the latest version within it will be used (e.g. "1.14.6-do.1"); if set to
              "latest", the latest published version will be used. See the
              ``/v2/kubernetes/options`` endpoint to find all currently available
              versions. Required.
            "amd_gpu_device_metrics_exporter_plugin": {
                "enabled": bool  # Optional. Indicates whether the
                  AMD Device Metrics Exporter is enabled.
            },
            "amd_gpu_device_plugin": {
                "enabled": bool  # Optional. Indicates whether the
                  AMD GPU Device Plugin is enabled.
            },
            "auto_upgrade": False,  # Optional. Default value is False. A
              boolean value indicating whether the cluster will be automatically
              upgraded to new patch releases during its maintenance window.
            "cluster_autoscaler_configuration": {
                "expanders": [
                    "str"  # Optional. Customizes expanders used
                      by cluster-autoscaler. The autoscaler will apply each expander
                      from the provided list to narrow down the selection of node types
                      created to scale up, until either a single node type is left, or
                      the list of expanders is exhausted. If this flag is unset,
                      autoscaler will use its default expander ``random``. Passing an
                      empty list ("" *not* ``null``"" ) will unset any previous
                      expander customizations.  Available expanders:   * ``random``"" :
                      Randomly selects a node group to scale. * `priority`: Selects the
                      node group with the highest priority as per [user-provided
                      configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)
                      * ``least_waste``"" : Selects the node group that will result in
                      the least amount of idle resources.
                ],
                "scale_down_unneeded_time": "str",  # Optional. Used
                  to customize how long a node is unneeded before being scaled down.
                "scale_down_utilization_threshold": 0.0  # Optional.
                  Used to customize when cluster autoscaler scales down non-empty nodes
                  by setting the node utilization threshold.
            },
            "cluster_subnet": "str",  # Optional. The range of IP
              addresses for the overlay network of the Kubernetes cluster in CIDR
              notation.
            "control_plane_firewall": {
                "allowed_addresses": [
                    "str"  # Optional. An array of public
                      addresses (IPv4 or CIDR) allowed to access the control plane.
                ],
                "enabled": bool  # Optional. Indicates whether the
                  control plane firewall is enabled.
            },
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the Kubernetes cluster was created.
            "endpoint": "str",  # Optional. The base URL of the API
              server on the Kubernetes master node.
            "ha": False,  # Optional. Default value is False. A boolean
              value indicating whether the control plane is run in a highly available
              configuration in the cluster. Highly available control planes incur less
              downtime. The property cannot be disabled. When omitted on create, the
              default is version-dependent; for DOKS 1.36.0 and later, the default is
              true; for earlier versions, the default is false.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a Kubernetes cluster.
            "ipv4": "str",  # Optional. The public IPv4 address of the
              Kubernetes master node. This will not be set if high availability is
              configured on the cluster (v1.21+).
            "maintenance_policy": {
                "day": "str",  # Optional. The day of the maintenance
                  window policy. May be one of ``monday`` through ``sunday``"" , or
                  ``any`` to indicate an arbitrary week day. Known values are: "any",
                  "monday", "tuesday", "wednesday", "thursday", "friday", "saturday",
                  and "sunday".
                "duration": "str",  # Optional. The duration of the
                  maintenance window policy in human-readable format.
                "start_time": "str"  # Optional. The start time in
                  UTC of the maintenance window policy in 24-hour clock format / HH:MM
                  notation (e.g., ``15:00``"" ).
            },
            "nvidia_gpu_device_plugin": {
                "enabled": bool  # Optional. Indicates whether the
                  Nvidia GPU Device Plugin is enabled.
            },
            "rdma_shared_dev_plugin": {
                "enabled": bool  # Optional. Indicates whether the
                  RDMA shared device plugin is enabled.
            },
            "registries": [
                "str"  # Optional. An array of integrated DOCR
                  registries.
            ],
            "registry_enabled": bool,  # Optional. A read-only boolean
              value indicating if a container registry is integrated with the cluster.
            "routing_agent": {
                "enabled": bool  # Optional. Indicates whether the
                  routing-agent component is enabled.
            },
            "service_subnet": "str",  # Optional. The range of assignable
              IP addresses for services running in the Kubernetes cluster in CIDR
              notation.
            "sso": {
                "client_id": "str",  # Optional. The OIDC client ID
                  registered with the identity provider. Required when ``enabled`` is
                  ``true``.
                "enabled": False,  # Optional. Default value is
                  False. Indicates whether SSO authentication is enabled for the
                  cluster.
                "issuer_url": "str",  # Optional. The OIDC issuer URL
                  for the identity provider. Required when ``enabled`` is ``true``.
                "required": False  # Optional. Default value is
                  False. Indicates whether any non-SSO forms of authentication are
                  disallowed. Can only be set to ``true`` when ``enabled`` is ``true``.
            },
            "status": {
                "message": "str",  # Optional. An optional message
                  providing additional information about the current cluster state.
                "state": "str"  # Optional. A string indicating the
                  current status of the cluster. Known values are: "running",
                  "provisioning", "degraded", "error", "deleted", "upgrading", and
                  "deleting".
            },
            "surge_upgrade": False,  # Optional. Default value is False.
              A boolean value indicating whether surge upgrade is enabled/disabled for
              the cluster. Surge upgrade makes cluster upgrades fast and reliable by
              bringing up new nodes before destroying the outdated nodes.
            "tags": [
                "str"  # Optional. An array of tags applied to the
                  Kubernetes cluster. All clusters are automatically tagged ``k8s`` and
                  ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires
                  ``tag:read`` scope.
            ],
            "updated_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the Kubernetes cluster was last updated.
            "vpc_uuid": "str"  # Optional. A string specifying the UUID
              of the VPC to which the Kubernetes cluster is
              assigned.:code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
        }
    ],
    "links": {
        "pages": {}
    }
}
list_node_pools(cluster_id: str, **kwargs: Any) MutableMapping[str, Any]

List All Node Pools in a Kubernetes Clusters.

To list all of the node pools in a Kubernetes clusters, send a GET request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools.

Parameters:

cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "node_pools": [
        {
            "auto_scale": bool,  # Optional. A boolean value indicating
              whether auto-scaling is enabled for this node pool.
            "count": 0,  # Optional. The number of Droplet instances in
              the node pool.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a specific node pool.
            "labels": {},  # Optional. An object of key/value mappings
              specifying labels to apply to all nodes in a pool. Labels will
              automatically be applied to all existing nodes and any subsequent nodes
              added to the pool. Note that when a label is removed, it is not deleted
              from the nodes in the pool.
            "max_nodes": 0,  # Optional. The maximum number of nodes that
              this node pool can be auto-scaled to. The value will be ``0`` if
              ``auto_scale`` is set to ``false``.
            "min_nodes": 0,  # Optional. The minimum number of nodes that
              this node pool can be auto-scaled to. The value will be ``0`` if
              ``auto_scale`` is set to ``false``.
            "name": "str",  # Optional. A human-readable name for the
              node pool.
            "nodes": [
                {
                    "created_at": "2020-02-20 00:00:00",  #
                      Optional. A time value given in ISO8601 combined date and time
                      format that represents when the node was created.
                    "droplet_id": "str",  # Optional. The ID of
                      the Droplet used for the worker node.
                    "id": "str",  # Optional. A unique ID that
                      can be used to identify and reference the node.
                    "name": "str",  # Optional. An automatically
                      generated, human-readable name for the node.
                    "status": {
                        "state": "str"  # Optional. A string
                          indicating the current status of the node. Known values are:
                          "provisioning", "running", "draining", and "deleting".
                    },
                    "updated_at": "2020-02-20 00:00:00"  #
                      Optional. A time value given in ISO8601 combined date and time
                      format that represents when the node was last updated.
                }
            ],
            "size": "str",  # Optional. The slug identifier for the type
              of Droplet used as workers in the node pool.
            "tags": [
                "str"  # Optional. An array containing the tags
                  applied to the node pool. All node pools are automatically tagged
                  ``k8s``"" , ``k8s-worker``"" , and ``k8s:$K8S_CLUSTER_ID``.
                  :code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
            ],
            "taints": [
                {
                    "effect": "str",  # Optional. How the node
                      reacts to pods that it won't tolerate. Available effect values
                      are ``NoSchedule``"" , ``PreferNoSchedule``"" , and
                      ``NoExecute``. Known values are: "NoSchedule",
                      "PreferNoSchedule", and "NoExecute".
                    "key": "str",  # Optional. An arbitrary
                      string. The ``key`` and ``value`` fields of the ``taint`` object
                      form a key-value pair. For example, if the value of the ``key``
                      field is "special" and the value of the ``value`` field is "gpu",
                      the key value pair would be ``special=gpu``.
                    "value": "str"  # Optional. An arbitrary
                      string. The ``key`` and ``value`` fields of the ``taint`` object
                      form a key-value pair. For example, if the value of the ``key``
                      field is "special" and the value of the ``value`` field is "gpu",
                      the key value pair would be ``special=gpu``.
                }
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_options(**kwargs: Any) MutableMapping[str, Any]

List Available Regions, Node Sizes, and Versions of Kubernetes.

To list the versions of Kubernetes available for use, the regions that support Kubernetes, and the available node sizes, send a GET request to /v2/kubernetes/options.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "options": {
        "regions": [
            {
                "name": "str",  # Optional. A DigitalOcean region
                  where Kubernetes is available.
                "slug": "str"  # Optional. The identifier for a
                  region for use when creating a new cluster.
            }
        ],
        "sizes": [
            {
                "name": "str",  # Optional. A Droplet size available
                  for use in a Kubernetes node pool.
                "slug": "str"  # Optional. The identifier for a size
                  for use when creating a new cluster.
            }
        ],
        "versions": [
            {
                "kubernetes_version": "str",  # Optional. The
                  upstream version string for the version of Kubernetes provided by a
                  given slug.
                "slug": "str",  # Optional. The slug identifier for
                  an available version of Kubernetes for use when creating or updating
                  a cluster. The string contains both the upstream version of
                  Kubernetes as well as the DigitalOcean revision.
                "supported_features": [
                    "str"  # Optional. The features available
                      with the version of Kubernetes provided by a given slug.
                ]
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
recycle_node_pool(cluster_id: str, node_pool_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
recycle_node_pool(cluster_id: str, node_pool_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Recycle a Kubernetes Node Pool.

The endpoint has been deprecated. Please use the DELETE /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID/nodes/$NODE_ID method instead.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • node_pool_id (str) – A unique ID that can be used to reference a Kubernetes node pool. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "nodes": [
        "str"  # Optional.
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
remove_registries(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) None
remove_registries(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) None

Remove Container Registries from Kubernetes Clusters.

To remove the container registries from Kubernetes clusters, send a DELETE request to /v2/kubernetes/registries.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

None

Return type:

None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "cluster_uuids": [
        "str"  # Optional. An array containing the UUIDs of Kubernetes
          clusters.
    ],
    "registries": [
        "str"  # Optional. An array containing the registry names.
    ]
}
remove_registry(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) None
remove_registry(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) None

Remove Container Registry from Kubernetes Clusters.

To remove the container registry from Kubernetes clusters, send a DELETE request to /v2/kubernetes/registry.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

None

Return type:

None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "cluster_uuids": [
        "str"  # Optional. An array containing the UUIDs of Kubernetes
          clusters.
    ]
}
run_cluster_lint(cluster_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
run_cluster_lint(cluster_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Run Clusterlint Checks on a Kubernetes Cluster.

Clusterlint helps operators conform to Kubernetes best practices around resources, security and reliability to avoid common problems while operating or upgrading the clusters.

To request a clusterlint run on your cluster, send a POST request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/clusterlint. This will run all checks present in the doks group by default, if a request body is not specified. Optionally specify the below attributes.

For information about the available checks, please refer to the clusterlint check documentation.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "exclude_checks": [
        "str"  # Optional. An array of checks that will be run when
          clusterlint executes checks.
    ],
    "exclude_groups": [
        "str"  # Optional. An array of check groups that will be omitted when
          clusterlint executes checks.
    ],
    "include_checks": [
        "str"  # Optional. An array of checks that will be run when
          clusterlint executes checks.
    ],
    "include_groups": [
        "str"  # Optional. An array of check groups that will be run when
          clusterlint executes checks.
    ]
}

# response body for status code(s): 202
response == {
    "run_id": "str"  # Optional. ID of the clusterlint run that can be used later
      to fetch the diagnostics.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_cluster(cluster_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_cluster(cluster_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Kubernetes Cluster.

To update a Kubernetes cluster, send a PUT request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID and specify one or more of the attributes below.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # A human-readable name for a Kubernetes cluster. Required.
    "amd_gpu_device_metrics_exporter_plugin": {
        "enabled": bool  # Optional. Indicates whether the AMD Device Metrics
          Exporter is enabled.
    },
    "amd_gpu_device_plugin": {
        "enabled": bool  # Optional. Indicates whether the AMD GPU Device
          Plugin is enabled.
    },
    "auto_upgrade": False,  # Optional. Default value is False. A boolean value
      indicating whether the cluster will be automatically upgraded to new patch
      releases during its maintenance window.
    "cluster_autoscaler_configuration": {
        "expanders": [
            "str"  # Optional. Customizes expanders used by
              cluster-autoscaler. The autoscaler will apply each expander from the
              provided list to narrow down the selection of node types created to scale
              up, until either a single node type is left, or the list of expanders is
              exhausted. If this flag is unset, autoscaler will use its default
              expander ``random``. Passing an empty list ("" *not* ``null``"" ) will
              unset any previous expander customizations.  Available expanders:   *
              ``random``"" : Randomly selects a node group to scale. * `priority`:
              Selects the node group with the highest priority as per [user-provided
              configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)
              * ``least_waste``"" : Selects the node group that will result in the
              least amount of idle resources.
        ],
        "scale_down_unneeded_time": "str",  # Optional. Used to customize how
          long a node is unneeded before being scaled down.
        "scale_down_utilization_threshold": 0.0  # Optional. Used to
          customize when cluster autoscaler scales down non-empty nodes by setting the
          node utilization threshold.
    },
    "control_plane_firewall": {
        "allowed_addresses": [
            "str"  # Optional. An array of public addresses (IPv4 or
              CIDR) allowed to access the control plane.
        ],
        "enabled": bool  # Optional. Indicates whether the control plane
          firewall is enabled.
    },
    "ha": bool,  # Optional. A boolean value indicating whether the control plane
      is run in a highly available configuration in the cluster. Highly available
      control planes incur less downtime. The property cannot be disabled. When omitted
      on create, the default is version-dependent; for DOKS 1.36.0 and later, the
      default is true; for earlier versions, the default is false.
    "maintenance_policy": {
        "day": "str",  # Optional. The day of the maintenance window policy.
          May be one of ``monday`` through ``sunday``"" , or ``any`` to indicate an
          arbitrary week day. Known values are: "any", "monday", "tuesday",
          "wednesday", "thursday", "friday", "saturday", and "sunday".
        "duration": "str",  # Optional. The duration of the maintenance
          window policy in human-readable format.
        "start_time": "str"  # Optional. The start time in UTC of the
          maintenance window policy in 24-hour clock format / HH:MM notation (e.g.,
          ``15:00``"" ).
    },
    "nvidia_gpu_device_plugin": {
        "enabled": bool  # Optional. Indicates whether the Nvidia GPU Device
          Plugin is enabled.
    },
    "rdma_shared_dev_plugin": {
        "enabled": bool  # Optional. Indicates whether the RDMA shared device
          plugin is enabled.
    },
    "routing_agent": {
        "enabled": bool  # Optional. Indicates whether the routing-agent
          component is enabled.
    },
    "sso": {
        "client_id": "str",  # Optional. The OIDC client ID registered with
          the identity provider. Required when ``enabled`` is ``true``.
        "enabled": False,  # Optional. Default value is False. Indicates
          whether SSO authentication is enabled for the cluster.
        "issuer_url": "str",  # Optional. The OIDC issuer URL for the
          identity provider. Required when ``enabled`` is ``true``.
        "required": False  # Optional. Default value is False. Indicates
          whether any non-SSO forms of authentication are disallowed. Can only be set
          to ``true`` when ``enabled`` is ``true``.
    },
    "surge_upgrade": False,  # Optional. Default value is False. A boolean value
      indicating whether surge upgrade is enabled/disabled for the cluster. Surge
      upgrade makes cluster upgrades fast and reliable by bringing up new nodes before
      destroying the outdated nodes.
    "tags": [
        "str"  # Optional. An array of tags applied to the Kubernetes
          cluster. All clusters are automatically tagged ``k8s`` and
          ``k8s:$K8S_CLUSTER_ID``.
    ]
}

# response body for status code(s): 202
response == {
    "kubernetes_cluster": {
        "name": "str",  # A human-readable name for a Kubernetes cluster.
          Required.
        "node_pools": [
            {
                "auto_scale": bool,  # Optional. A boolean value
                  indicating whether auto-scaling is enabled for this node pool.
                "count": 0,  # Optional. The number of Droplet
                  instances in the node pool.
                "id": "str",  # Optional. A unique ID that can be
                  used to identify and reference a specific node pool.
                "labels": {},  # Optional. An object of key/value
                  mappings specifying labels to apply to all nodes in a pool. Labels
                  will automatically be applied to all existing nodes and any
                  subsequent nodes added to the pool. Note that when a label is
                  removed, it is not deleted from the nodes in the pool.
                "max_nodes": 0,  # Optional. The maximum number of
                  nodes that this node pool can be auto-scaled to. The value will be
                  ``0`` if ``auto_scale`` is set to ``false``.
                "min_nodes": 0,  # Optional. The minimum number of
                  nodes that this node pool can be auto-scaled to. The value will be
                  ``0`` if ``auto_scale`` is set to ``false``.
                "name": "str",  # Optional. A human-readable name for
                  the node pool.
                "nodes": [
                    {
                        "created_at": "2020-02-20 00:00:00",
                          # Optional. A time value given in ISO8601 combined date and
                          time format that represents when the node was created.
                        "droplet_id": "str",  # Optional. The
                          ID of the Droplet used for the worker node.
                        "id": "str",  # Optional. A unique ID
                          that can be used to identify and reference the node.
                        "name": "str",  # Optional. An
                          automatically generated, human-readable name for the node.
                        "status": {
                            "state": "str"  # Optional. A
                              string indicating the current status of the node. Known
                              values are: "provisioning", "running", "draining", and
                              "deleting".
                        },
                        "updated_at": "2020-02-20 00:00:00"
                          # Optional. A time value given in ISO8601 combined date and
                          time format that represents when the node was last updated.
                    }
                ],
                "size": "str",  # Optional. The slug identifier for
                  the type of Droplet used as workers in the node pool.
                "tags": [
                    "str"  # Optional. An array containing the
                      tags applied to the node pool. All node pools are automatically
                      tagged ``k8s``"" , ``k8s-worker``"" , and
                      ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires
                      ``tag:read`` scope.
                ],
                "taints": [
                    {
                        "effect": "str",  # Optional. How the
                          node reacts to pods that it won't tolerate. Available effect
                          values are ``NoSchedule``"" , ``PreferNoSchedule``"" , and
                          ``NoExecute``. Known values are: "NoSchedule",
                          "PreferNoSchedule", and "NoExecute".
                        "key": "str",  # Optional. An
                          arbitrary string. The ``key`` and ``value`` fields of the
                          ``taint`` object form a key-value pair. For example, if the
                          value of the ``key`` field is "special" and the value of the
                          ``value`` field is "gpu", the key value pair would be
                          ``special=gpu``.
                        "value": "str"  # Optional. An
                          arbitrary string. The ``key`` and ``value`` fields of the
                          ``taint`` object form a key-value pair. For example, if the
                          value of the ``key`` field is "special" and the value of the
                          ``value`` field is "gpu", the key value pair would be
                          ``special=gpu``.
                    }
                ]
            }
        ],
        "region": "str",  # The slug identifier for the region where the
          Kubernetes cluster is located. Required.
        "version": "str",  # The slug identifier for the version of
          Kubernetes used for the cluster. If set to a minor version (e.g. "1.14"), the
          latest version within it will be used (e.g. "1.14.6-do.1"); if set to
          "latest", the latest published version will be used. See the
          ``/v2/kubernetes/options`` endpoint to find all currently available versions.
          Required.
        "amd_gpu_device_metrics_exporter_plugin": {
            "enabled": bool  # Optional. Indicates whether the AMD Device
              Metrics Exporter is enabled.
        },
        "amd_gpu_device_plugin": {
            "enabled": bool  # Optional. Indicates whether the AMD GPU
              Device Plugin is enabled.
        },
        "auto_upgrade": False,  # Optional. Default value is False. A boolean
          value indicating whether the cluster will be automatically upgraded to new
          patch releases during its maintenance window.
        "cluster_autoscaler_configuration": {
            "expanders": [
                "str"  # Optional. Customizes expanders used by
                  cluster-autoscaler. The autoscaler will apply each expander from the
                  provided list to narrow down the selection of node types created to
                  scale up, until either a single node type is left, or the list of
                  expanders is exhausted. If this flag is unset, autoscaler will use
                  its default expander ``random``. Passing an empty list ("" *not*
                  ``null``"" ) will unset any previous expander customizations.
                  Available expanders:   * ``random``"" : Randomly selects a node group
                  to scale. * `priority`: Selects the node group with the highest
                  priority as per [user-provided
                  configuration](https://docs.digitalocean.com/products/kubernetes/how-to/autoscale/#configuring-priority-expander)
                  * ``least_waste``"" : Selects the node group that will result in the
                  least amount of idle resources.
            ],
            "scale_down_unneeded_time": "str",  # Optional. Used to
              customize how long a node is unneeded before being scaled down.
            "scale_down_utilization_threshold": 0.0  # Optional. Used to
              customize when cluster autoscaler scales down non-empty nodes by setting
              the node utilization threshold.
        },
        "cluster_subnet": "str",  # Optional. The range of IP addresses for
          the overlay network of the Kubernetes cluster in CIDR notation.
        "control_plane_firewall": {
            "allowed_addresses": [
                "str"  # Optional. An array of public addresses (IPv4
                  or CIDR) allowed to access the control plane.
            ],
            "enabled": bool  # Optional. Indicates whether the control
              plane firewall is enabled.
        },
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the Kubernetes
          cluster was created.
        "endpoint": "str",  # Optional. The base URL of the API server on the
          Kubernetes master node.
        "ha": bool,  # Optional. A boolean value indicating whether the
          control plane is run in a highly available configuration in the cluster.
          Highly available control planes incur less downtime. The property cannot be
          disabled. When omitted on create, the default is version-dependent; for DOKS
          1.36.0 and later, the default is true; for earlier versions, the default is
          false.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a Kubernetes cluster.
        "ipv4": "str",  # Optional. The public IPv4 address of the Kubernetes
          master node. This will not be set if high availability is configured on the
          cluster (v1.21+).
        "maintenance_policy": {
            "day": "str",  # Optional. The day of the maintenance window
              policy. May be one of ``monday`` through ``sunday``"" , or ``any`` to
              indicate an arbitrary week day. Known values are: "any", "monday",
              "tuesday", "wednesday", "thursday", "friday", "saturday", and "sunday".
            "duration": "str",  # Optional. The duration of the
              maintenance window policy in human-readable format.
            "start_time": "str"  # Optional. The start time in UTC of the
              maintenance window policy in 24-hour clock format / HH:MM notation (e.g.,
              ``15:00``"" ).
        },
        "nvidia_gpu_device_plugin": {
            "enabled": bool  # Optional. Indicates whether the Nvidia GPU
              Device Plugin is enabled.
        },
        "rdma_shared_dev_plugin": {
            "enabled": bool  # Optional. Indicates whether the RDMA
              shared device plugin is enabled.
        },
        "registry_enabled": bool,  # Optional. A read-only boolean value
          indicating if a container registry is integrated with the cluster.
        "routing_agent": {
            "enabled": bool  # Optional. Indicates whether the
              routing-agent component is enabled.
        },
        "service_subnet": "str",  # Optional. The range of assignable IP
          addresses for services running in the Kubernetes cluster in CIDR notation.
        "sso": {
            "client_id": "str",  # Optional. The OIDC client ID
              registered with the identity provider. Required when ``enabled`` is
              ``true``.
            "enabled": False,  # Optional. Default value is False.
              Indicates whether SSO authentication is enabled for the cluster.
            "issuer_url": "str",  # Optional. The OIDC issuer URL for the
              identity provider. Required when ``enabled`` is ``true``.
            "required": False  # Optional. Default value is False.
              Indicates whether any non-SSO forms of authentication are disallowed. Can
              only be set to ``true`` when ``enabled`` is ``true``.
        },
        "status": {
            "message": "str",  # Optional. An optional message providing
              additional information about the current cluster state.
            "state": "str"  # Optional. A string indicating the current
              status of the cluster. Known values are: "running", "provisioning",
              "degraded", "error", "deleted", "upgrading", and "deleting".
        },
        "surge_upgrade": False,  # Optional. Default value is False. A
          boolean value indicating whether surge upgrade is enabled/disabled for the
          cluster. Surge upgrade makes cluster upgrades fast and reliable by bringing
          up new nodes before destroying the outdated nodes.
        "tags": [
            "str"  # Optional. An array of tags to apply to the
              Kubernetes cluster. All clusters are automatically tagged ``k8s`` and
              ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires ``tag:read``
              and ``tag:create`` scope, as well as ``tag:delete`` if existing tags are
              getting removed.
        ],
        "updated_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the Kubernetes
          cluster was last updated.
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the Kubernetes cluster is
          assigned.:code:`<br>`:code:`<br>`Requires ``vpc:read`` scope.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_node_pool(cluster_id: str, node_pool_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_node_pool(cluster_id: str, node_pool_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Node Pool in a Kubernetes Cluster.

To update the name of a node pool, edit the tags applied to it, or adjust its number of nodes, send a PUT request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/node_pools/$NODE_POOL_ID with the following attributes.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • node_pool_id (str) – A unique ID that can be used to reference a Kubernetes node pool. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "auto_scale": bool,  # Optional. A boolean value indicating whether
      auto-scaling is enabled for this node pool.
    "count": 0,  # Optional. The number of Droplet instances in the node pool.
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference a specific node pool.
    "labels": {},  # Optional. An object of key/value mappings specifying labels
      to apply to all nodes in a pool. Labels will automatically be applied to all
      existing nodes and any subsequent nodes added to the pool. Note that when a label
      is removed, it is not deleted from the nodes in the pool.
    "max_nodes": 0,  # Optional. The maximum number of nodes that this node pool
      can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is set to
      ``false``.
    "min_nodes": 0,  # Optional. The minimum number of nodes that this node pool
      can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is set to
      ``false``.
    "name": "str",  # Optional. A human-readable name for the node pool.
    "nodes": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the node was created.
            "droplet_id": "str",  # Optional. The ID of the Droplet used
              for the worker node.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the node.
            "name": "str",  # Optional. An automatically generated,
              human-readable name for the node.
            "status": {
                "state": "str"  # Optional. A string indicating the
                  current status of the node. Known values are: "provisioning",
                  "running", "draining", and "deleting".
            },
            "updated_at": "2020-02-20 00:00:00"  # Optional. A time value
              given in ISO8601 combined date and time format that represents when the
              node was last updated.
        }
    ],
    "tags": [
        "str"  # Optional. An array containing the tags applied to the node
          pool. All node pools are automatically tagged ``k8s``"" , ``k8s-worker``"" ,
          and ``k8s:$K8S_CLUSTER_ID``. :code:`<br>`:code:`<br>`Requires ``tag:read``
          scope.
    ],
    "taints": [
        {
            "effect": "str",  # Optional. How the node reacts to pods
              that it won't tolerate. Available effect values are ``NoSchedule``"" ,
              ``PreferNoSchedule``"" , and ``NoExecute``. Known values are:
              "NoSchedule", "PreferNoSchedule", and "NoExecute".
            "key": "str",  # Optional. An arbitrary string. The ``key``
              and ``value`` fields of the ``taint`` object form a key-value pair. For
              example, if the value of the ``key`` field is "special" and the value of
              the ``value`` field is "gpu", the key value pair would be
              ``special=gpu``.
            "value": "str"  # Optional. An arbitrary string. The ``key``
              and ``value`` fields of the ``taint`` object form a key-value pair. For
              example, if the value of the ``key`` field is "special" and the value of
              the ``value`` field is "gpu", the key value pair would be
              ``special=gpu``.
        }
    ]
}

# response body for status code(s): 202
response == {
    "node_pool": {
        "auto_scale": bool,  # Optional. A boolean value indicating whether
          auto-scaling is enabled for this node pool.
        "count": 0,  # Optional. The number of Droplet instances in the node
          pool.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a specific node pool.
        "labels": {},  # Optional. An object of key/value mappings specifying
          labels to apply to all nodes in a pool. Labels will automatically be applied
          to all existing nodes and any subsequent nodes added to the pool. Note that
          when a label is removed, it is not deleted from the nodes in the pool.
        "max_nodes": 0,  # Optional. The maximum number of nodes that this
          node pool can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is
          set to ``false``.
        "min_nodes": 0,  # Optional. The minimum number of nodes that this
          node pool can be auto-scaled to. The value will be ``0`` if ``auto_scale`` is
          set to ``false``.
        "name": "str",  # Optional. A human-readable name for the node pool.
        "nodes": [
            {
                "created_at": "2020-02-20 00:00:00",  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the node was created.
                "droplet_id": "str",  # Optional. The ID of the
                  Droplet used for the worker node.
                "id": "str",  # Optional. A unique ID that can be
                  used to identify and reference the node.
                "name": "str",  # Optional. An automatically
                  generated, human-readable name for the node.
                "status": {
                    "state": "str"  # Optional. A string
                      indicating the current status of the node. Known values are:
                      "provisioning", "running", "draining", and "deleting".
                },
                "updated_at": "2020-02-20 00:00:00"  # Optional. A
                  time value given in ISO8601 combined date and time format that
                  represents when the node was last updated.
            }
        ],
        "size": "str",  # Optional. The slug identifier for the type of
          Droplet used as workers in the node pool.
        "tags": [
            "str"  # Optional. An array containing the tags applied to
              the node pool. All node pools are automatically tagged ``k8s``"" ,
              ``k8s-worker``"" , and ``k8s:$K8S_CLUSTER_ID``.
              :code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
        ],
        "taints": [
            {
                "effect": "str",  # Optional. How the node reacts to
                  pods that it won't tolerate. Available effect values are
                  ``NoSchedule``"" , ``PreferNoSchedule``"" , and ``NoExecute``. Known
                  values are: "NoSchedule", "PreferNoSchedule", and "NoExecute".
                "key": "str",  # Optional. An arbitrary string. The
                  ``key`` and ``value`` fields of the ``taint`` object form a key-value
                  pair. For example, if the value of the ``key`` field is "special" and
                  the value of the ``value`` field is "gpu", the key value pair would
                  be ``special=gpu``.
                "value": "str"  # Optional. An arbitrary string. The
                  ``key`` and ``value`` fields of the ``taint`` object form a key-value
                  pair. For example, if the value of the ``key`` field is "special" and
                  the value of the ``value`` field is "gpu", the key value pair would
                  be ``special=gpu``.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
upgrade_cluster(cluster_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
upgrade_cluster(cluster_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Upgrade a Kubernetes Cluster.

To immediately upgrade a Kubernetes cluster to a newer patch release of Kubernetes, send a POST request to /v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrade. The body of the request must specify a version attribute.

Available upgrade versions for a cluster can be fetched from /v2/kubernetes/clusters/$K8S_CLUSTER_ID/upgrades.

Parameters:
  • cluster_id (str) – A unique ID that can be used to reference a Kubernetes cluster. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "version": "str"  # Optional. The slug identifier for the version of
      Kubernetes that the cluster will be upgraded to.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.LoadBalancersOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s load_balancers attribute.

add_droplets(lb_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
add_droplets(lb_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Add Droplets to a Load Balancer.

To assign a Droplet to a load balancer instance, send a POST request to /v2/load_balancers/$LOAD_BALANCER_ID/droplets. In the body of the request, there should be a droplet_ids attribute containing a list of Droplet IDs. Individual Droplets can not be added to a load balancer configured with a Droplet tag. Attempting to do so will result in a “422 Unprocessable Entity” response from the API.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "droplet_ids": [
        0  # An array containing the IDs of the Droplets assigned to the load
          balancer. Required.
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
add_forwarding_rules(lb_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
add_forwarding_rules(lb_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Add Forwarding Rules to a Load Balancer.

To add an additional forwarding rule to a load balancer instance, send a POST request to /v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules. In the body of the request, there should be a forwarding_rules attribute containing an array of rules to be added.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "forwarding_rules": [
        {
            "entry_port": 0,  # An integer representing the port on which
              the load balancer instance will listen. Required.
            "entry_protocol": "str",  # The protocol used for traffic to
              the load balancer. The possible values are: ``http``"" , ``https``"" ,
              ``http2``"" , ``http3``"" , ``tcp``"" , or ``udp``. If you set the
              ``entry_protocol`` to ``udp``"" , the ``target_protocol`` must be set to
              ``udp``.  When using UDP, the load balancer requires that you set up a
              health  check with a port that uses TCP, HTTP, or HTTPS to work properly.
              Required. Known values are: "http", "https", "http2", "http3", "tcp", and
              "udp".
            "target_port": 0,  # An integer representing the port on the
              backend Droplets to which the load balancer will send traffic. Required.
            "target_protocol": "str",  # The protocol used for traffic
              from the load balancer to the backend Droplets. The possible values are:
              ``http``"" , ``https``"" , ``http2``"" , ``tcp``"" , or ``udp``. If you
              set the ``target_protocol`` to ``udp``"" , the ``entry_protocol`` must be
              set to  ``udp``. When using UDP, the load balancer requires that you set
              up a health  check with a port that uses TCP, HTTP, or HTTPS to work
              properly. Required. Known values are: "http", "https", "http2", "tcp",
              and "udp".
            "certificate_id": "str",  # Optional. The ID of the TLS
              certificate used for SSL termination if enabled.
            "tls_passthrough": bool  # Optional. A boolean value
              indicating whether SSL encrypted traffic will be passed through to the
              backend Droplets.
        }
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Load Balancer.

To create a new load balancer instance, send a POST request to /v2/load_balancers.

You can specify the Droplets that will sit behind the load balancer using one of two methods:

  • Set droplet_ids to a list of specific Droplet IDs.

  • Set tag to the name of a tag. All Droplets with this tag applied will be assigned to the load balancer. Additional Droplets will be automatically assigned as they are tagged.

These methods are mutually exclusive.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 202
response == {
    "load_balancer": {
        "forwarding_rules": [
            {
                "entry_port": 0,  # An integer representing the port
                  on which the load balancer instance will listen. Required.
                "entry_protocol": "str",  # The protocol used for
                  traffic to the load balancer. The possible values are: ``http``"" ,
                  ``https``"" , ``http2``"" , ``http3``"" , ``tcp``"" , or ``udp``. If
                  you set the  ``entry_protocol`` to ``udp``"" , the
                  ``target_protocol`` must be set to ``udp``.  When using UDP, the load
                  balancer requires that you set up a health  check with a port that
                  uses TCP, HTTP, or HTTPS to work properly. Required. Known values
                  are: "http", "https", "http2", "http3", "tcp", and "udp".
                "target_port": 0,  # An integer representing the port
                  on the backend Droplets to which the load balancer will send traffic.
                  Required.
                "target_protocol": "str",  # The protocol used for
                  traffic from the load balancer to the backend Droplets. The possible
                  values are: ``http``"" , ``https``"" , ``http2``"" , ``tcp``"" , or
                  ``udp``. If you set the ``target_protocol`` to ``udp``"" , the
                  ``entry_protocol`` must be set to  ``udp``. When using UDP, the load
                  balancer requires that you set up a health  check with a port that
                  uses TCP, HTTP, or HTTPS to work properly. Required. Known values
                  are: "http", "https", "http2", "tcp", and "udp".
                "certificate_id": "str",  # Optional. The ID of the
                  TLS certificate used for SSL termination if enabled.
                "tls_passthrough": bool  # Optional. A boolean value
                  indicating whether SSL encrypted traffic will be passed through to
                  the backend Droplets.
            }
        ],
        "algorithm": "round_robin",  # Optional. Default value is
          "round_robin". This field has been deprecated. You can no longer specify an
          algorithm for load balancers. Known values are: "round_robin" and
          "least_connections".
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the load
          balancer was created.
        "disable_lets_encrypt_dns_records": False,  # Optional. Default value
          is False. A boolean value indicating whether to disable automatic DNS record
          creation for Let's Encrypt certificates that are added to the load balancer.
        "domains": [
            {
                "certificate_id": "str",  # Optional. The ID of the
                  TLS certificate used for SSL termination.
                "is_managed": bool,  # Optional. A boolean value
                  indicating if the domain is already managed by DigitalOcean. If true,
                  all A and AAAA records required to enable Global load balancers will
                  be automatically added.
                "name": "str"  # Optional. FQDN to associate with a
                  Global load balancer.
            }
        ],
        "enable_backend_keepalive": False,  # Optional. Default value is
          False. A boolean value indicating whether HTTP keepalive connections are
          maintained to target Droplets.
        "enable_proxy_protocol": False,  # Optional. Default value is False.
          A boolean value indicating whether PROXY Protocol is in use.
        "firewall": {
            "allow": [
                "str"  # Optional. the rules for allowing traffic to
                  the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16').
            ],
            "deny": [
                "str"  # Optional. the rules for denying traffic to
                  the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16').
            ]
        },
        "glb_settings": {
            "cdn": {
                "is_enabled": bool  # Optional. A boolean flag to
                  enable CDN caching.
            },
            "failover_threshold": 0,  # Optional. An integer value as a
              percentage to indicate failure threshold to decide how the regional
              priorities will take effect. A value of ``50`` would indicate that the
              Global load balancer will choose a lower priority region to forward
              traffic to once this failure threshold has been reached for the higher
              priority region.
            "region_priorities": {
                "str": 0  # Optional. A map of region string to an
                  integer priority value indicating preference for which regional
                  target a Global load balancer will forward traffic to. A lower value
                  indicates a higher priority.
            },
            "target_port": 0,  # Optional. An integer representing the
              port on the target backends which the load balancer will forward traffic
              to.
            "target_protocol": "str"  # Optional. The protocol used for
              forwarding traffic from the load balancer to the target backends. The
              possible values are ``http``"" , ``https`` and ``http2``. Known values
              are: "http", "https", and "http2".
        },
        "health_check": {
            "check_interval_seconds": 10,  # Optional. Default value is
              10. The number of seconds between between two consecutive health checks.
            "healthy_threshold": 3,  # Optional. Default value is 3. The
              number of times a health check must pass for a backend Droplet to be
              marked "healthy" and be re-added to the pool.
            "path": "/",  # Optional. Default value is "/". The path on
              the backend Droplets to which the load balancer instance will send a
              request.
            "port": 80,  # Optional. Default value is 80. An integer
              representing the port on the backend Droplets on which the health check
              will attempt a connection.
            "protocol": "http",  # Optional. Default value is "http". The
              protocol used for health checks sent to the backend Droplets. The
              possible values are ``http``"" , ``https``"" , or ``tcp``. Known values
              are: "http", "https", and "tcp".
            "response_timeout_seconds": 5,  # Optional. Default value is
              5. The number of seconds the load balancer instance will wait for a
              response until marking a health check as failed.
            "unhealthy_threshold": 5  # Optional. Default value is 5. The
              number of times a health check must fail for a backend Droplet to be
              marked "unhealthy" and be removed from the pool.
        },
        "http_idle_timeout_seconds": 60,  # Optional. Default value is 60. An
          integer value which configures the idle timeout for HTTP requests to the
          target droplets.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a load balancer.
        "ip": "str",  # Optional. An attribute containing the public-facing
          IP address of the load balancer.
        "ipv6": "str",  # Optional. An attribute containing the public-facing
          IPv6 address of the load balancer.
        "name": "str",  # Optional. A human-readable name for a load balancer
          instance.
        "network": "EXTERNAL",  # Optional. Default value is "EXTERNAL". A
          string indicating whether the load balancer should be external or internal.
          Internal load balancers have no public IPs and are only accessible to
          resources on the same VPC network. This property cannot be updated after
          creating the load balancer. Known values are: "EXTERNAL" and "INTERNAL".
        "network_stack": "IPV4",  # Optional. Default value is "IPV4". A
          string indicating whether the load balancer will support IPv4 or both IPv4
          and IPv6 networking. This property cannot be updated after creating the load
          balancer. Known values are: "IPV4" and "DUALSTACK".
        "project_id": "str",  # Optional. The ID of the project that the load
          balancer is associated with. If no ID is provided at creation, the load
          balancer associates with the user's default project. If an invalid project ID
          is provided, the load balancer will not be created.
        "redirect_http_to_https": False,  # Optional. Default value is False.
          A boolean value indicating whether HTTP requests to the load balancer on port
          80 will be redirected to HTTPS on port 443.
        "size": "lb-small",  # Optional. Default value is "lb-small". This
          field has been replaced by the ``size_unit`` field for all regions except in
          AMS2, NYC2, and SFO1. Each available load balancer size now equates to the
          load balancer having a set number of nodes.   * ``lb-small`` = 1 node *
          ``lb-medium`` = 3 nodes * ``lb-large`` = 6 nodes  You can resize load
          balancers after creation up to once per hour. You cannot resize a load
          balancer within the first hour of its creation. Known values are: "lb-small",
          "lb-medium", and "lb-large".
        "size_unit": 1,  # Optional. Default value is 1. How many nodes the
          load balancer contains. Each additional node increases the load balancer's
          ability to manage more connections. Load balancers can be scaled up or down,
          and you can change the number of nodes after creation up to once per hour.
          This field is currently not available in the AMS2, NYC2, or SFO1 regions. Use
          the ``size`` field to scale load balancers that reside in these regions.
        "status": "str",  # Optional. A status string indicating the current
          state of the load balancer. This can be ``new``"" , ``active``"" , or
          ``errored``. Known values are: "new", "active", and "errored".
        "sticky_sessions": {
            "cookie_name": "str",  # Optional. The name of the cookie
              sent to the client. This attribute is only returned when using
              ``cookies`` for the sticky sessions type.
            "cookie_ttl_seconds": 0,  # Optional. The number of seconds
              until the cookie set by the load balancer expires. This attribute is only
              returned when using ``cookies`` for the sticky sessions type.
            "type": "none"  # Optional. Default value is "none". An
              attribute indicating how and if requests from a client will be
              persistently served by the same backend Droplet. The possible values are
              ``cookies`` or ``none``. Known values are: "cookies" and "none".
        },
        "tag": "str",  # Optional. The name of a Droplet tag corresponding to
          Droplets assigned to the load balancer.
        "target_load_balancer_ids": [
            "str"  # Optional. An array containing the UUIDs of the
              Regional load balancers to be used as target backends for a Global load
              balancer.
        ],
        "tls_cipher_policy": "DEFAULT",  # Optional. Default value is
          "DEFAULT". A string indicating the policy for the TLS cipher suites used by
          the load balancer. The possible values are ``DEFAULT`` or ``STRONG``. The
          default value is ``DEFAULT``. Known values are: "DEFAULT" and "STRONG".
        "type": "REGIONAL",  # Optional. Default value is "REGIONAL". A
          string indicating whether the load balancer should be a standard regional
          HTTP load balancer, a regional network load balancer that routes traffic at
          the TCP/UDP transport layer, or a global load balancer. Known values are:
          "REGIONAL", "REGIONAL_NETWORK", and "GLOBAL".
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the load balancer is assigned.
    }
}
delete(lb_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Load Balancer.

To delete a load balancer instance, disassociating any Droplets assigned to it and removing it from your account, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

lb_id (str) – A unique identifier for a load balancer. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_cache(lb_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Global Load Balancer CDN Cache.

To delete a Global load balancer CDN cache, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID/cache.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

lb_id (str) – A unique identifier for a load balancer. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(lb_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Load Balancer.

To show information about a load balancer instance, send a GET request to /v2/load_balancers/$LOAD_BALANCER_ID.

Parameters:

lb_id (str) – A unique identifier for a load balancer. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "load_balancer": {
        "forwarding_rules": [
            {
                "entry_port": 0,  # An integer representing the port
                  on which the load balancer instance will listen. Required.
                "entry_protocol": "str",  # The protocol used for
                  traffic to the load balancer. The possible values are: ``http``"" ,
                  ``https``"" , ``http2``"" , ``http3``"" , ``tcp``"" , or ``udp``. If
                  you set the  ``entry_protocol`` to ``udp``"" , the
                  ``target_protocol`` must be set to ``udp``.  When using UDP, the load
                  balancer requires that you set up a health  check with a port that
                  uses TCP, HTTP, or HTTPS to work properly. Required. Known values
                  are: "http", "https", "http2", "http3", "tcp", and "udp".
                "target_port": 0,  # An integer representing the port
                  on the backend Droplets to which the load balancer will send traffic.
                  Required.
                "target_protocol": "str",  # The protocol used for
                  traffic from the load balancer to the backend Droplets. The possible
                  values are: ``http``"" , ``https``"" , ``http2``"" , ``tcp``"" , or
                  ``udp``. If you set the ``target_protocol`` to ``udp``"" , the
                  ``entry_protocol`` must be set to  ``udp``. When using UDP, the load
                  balancer requires that you set up a health  check with a port that
                  uses TCP, HTTP, or HTTPS to work properly. Required. Known values
                  are: "http", "https", "http2", "tcp", and "udp".
                "certificate_id": "str",  # Optional. The ID of the
                  TLS certificate used for SSL termination if enabled.
                "tls_passthrough": bool  # Optional. A boolean value
                  indicating whether SSL encrypted traffic will be passed through to
                  the backend Droplets.
            }
        ],
        "algorithm": "round_robin",  # Optional. Default value is
          "round_robin". This field has been deprecated. You can no longer specify an
          algorithm for load balancers. Known values are: "round_robin" and
          "least_connections".
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the load
          balancer was created.
        "disable_lets_encrypt_dns_records": False,  # Optional. Default value
          is False. A boolean value indicating whether to disable automatic DNS record
          creation for Let's Encrypt certificates that are added to the load balancer.
        "domains": [
            {
                "certificate_id": "str",  # Optional. The ID of the
                  TLS certificate used for SSL termination.
                "is_managed": bool,  # Optional. A boolean value
                  indicating if the domain is already managed by DigitalOcean. If true,
                  all A and AAAA records required to enable Global load balancers will
                  be automatically added.
                "name": "str"  # Optional. FQDN to associate with a
                  Global load balancer.
            }
        ],
        "enable_backend_keepalive": False,  # Optional. Default value is
          False. A boolean value indicating whether HTTP keepalive connections are
          maintained to target Droplets.
        "enable_proxy_protocol": False,  # Optional. Default value is False.
          A boolean value indicating whether PROXY Protocol is in use.
        "firewall": {
            "allow": [
                "str"  # Optional. the rules for allowing traffic to
                  the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16').
            ],
            "deny": [
                "str"  # Optional. the rules for denying traffic to
                  the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16').
            ]
        },
        "glb_settings": {
            "cdn": {
                "is_enabled": bool  # Optional. A boolean flag to
                  enable CDN caching.
            },
            "failover_threshold": 0,  # Optional. An integer value as a
              percentage to indicate failure threshold to decide how the regional
              priorities will take effect. A value of ``50`` would indicate that the
              Global load balancer will choose a lower priority region to forward
              traffic to once this failure threshold has been reached for the higher
              priority region.
            "region_priorities": {
                "str": 0  # Optional. A map of region string to an
                  integer priority value indicating preference for which regional
                  target a Global load balancer will forward traffic to. A lower value
                  indicates a higher priority.
            },
            "target_port": 0,  # Optional. An integer representing the
              port on the target backends which the load balancer will forward traffic
              to.
            "target_protocol": "str"  # Optional. The protocol used for
              forwarding traffic from the load balancer to the target backends. The
              possible values are ``http``"" , ``https`` and ``http2``. Known values
              are: "http", "https", and "http2".
        },
        "health_check": {
            "check_interval_seconds": 10,  # Optional. Default value is
              10. The number of seconds between between two consecutive health checks.
            "healthy_threshold": 3,  # Optional. Default value is 3. The
              number of times a health check must pass for a backend Droplet to be
              marked "healthy" and be re-added to the pool.
            "path": "/",  # Optional. Default value is "/". The path on
              the backend Droplets to which the load balancer instance will send a
              request.
            "port": 80,  # Optional. Default value is 80. An integer
              representing the port on the backend Droplets on which the health check
              will attempt a connection.
            "protocol": "http",  # Optional. Default value is "http". The
              protocol used for health checks sent to the backend Droplets. The
              possible values are ``http``"" , ``https``"" , or ``tcp``. Known values
              are: "http", "https", and "tcp".
            "response_timeout_seconds": 5,  # Optional. Default value is
              5. The number of seconds the load balancer instance will wait for a
              response until marking a health check as failed.
            "unhealthy_threshold": 5  # Optional. Default value is 5. The
              number of times a health check must fail for a backend Droplet to be
              marked "unhealthy" and be removed from the pool.
        },
        "http_idle_timeout_seconds": 60,  # Optional. Default value is 60. An
          integer value which configures the idle timeout for HTTP requests to the
          target droplets.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a load balancer.
        "ip": "str",  # Optional. An attribute containing the public-facing
          IP address of the load balancer.
        "ipv6": "str",  # Optional. An attribute containing the public-facing
          IPv6 address of the load balancer.
        "name": "str",  # Optional. A human-readable name for a load balancer
          instance.
        "network": "EXTERNAL",  # Optional. Default value is "EXTERNAL". A
          string indicating whether the load balancer should be external or internal.
          Internal load balancers have no public IPs and are only accessible to
          resources on the same VPC network. This property cannot be updated after
          creating the load balancer. Known values are: "EXTERNAL" and "INTERNAL".
        "network_stack": "IPV4",  # Optional. Default value is "IPV4". A
          string indicating whether the load balancer will support IPv4 or both IPv4
          and IPv6 networking. This property cannot be updated after creating the load
          balancer. Known values are: "IPV4" and "DUALSTACK".
        "project_id": "str",  # Optional. The ID of the project that the load
          balancer is associated with. If no ID is provided at creation, the load
          balancer associates with the user's default project. If an invalid project ID
          is provided, the load balancer will not be created.
        "redirect_http_to_https": False,  # Optional. Default value is False.
          A boolean value indicating whether HTTP requests to the load balancer on port
          80 will be redirected to HTTPS on port 443.
        "size": "lb-small",  # Optional. Default value is "lb-small". This
          field has been replaced by the ``size_unit`` field for all regions except in
          AMS2, NYC2, and SFO1. Each available load balancer size now equates to the
          load balancer having a set number of nodes.   * ``lb-small`` = 1 node *
          ``lb-medium`` = 3 nodes * ``lb-large`` = 6 nodes  You can resize load
          balancers after creation up to once per hour. You cannot resize a load
          balancer within the first hour of its creation. Known values are: "lb-small",
          "lb-medium", and "lb-large".
        "size_unit": 1,  # Optional. Default value is 1. How many nodes the
          load balancer contains. Each additional node increases the load balancer's
          ability to manage more connections. Load balancers can be scaled up or down,
          and you can change the number of nodes after creation up to once per hour.
          This field is currently not available in the AMS2, NYC2, or SFO1 regions. Use
          the ``size`` field to scale load balancers that reside in these regions.
        "status": "str",  # Optional. A status string indicating the current
          state of the load balancer. This can be ``new``"" , ``active``"" , or
          ``errored``. Known values are: "new", "active", and "errored".
        "sticky_sessions": {
            "cookie_name": "str",  # Optional. The name of the cookie
              sent to the client. This attribute is only returned when using
              ``cookies`` for the sticky sessions type.
            "cookie_ttl_seconds": 0,  # Optional. The number of seconds
              until the cookie set by the load balancer expires. This attribute is only
              returned when using ``cookies`` for the sticky sessions type.
            "type": "none"  # Optional. Default value is "none". An
              attribute indicating how and if requests from a client will be
              persistently served by the same backend Droplet. The possible values are
              ``cookies`` or ``none``. Known values are: "cookies" and "none".
        },
        "tag": "str",  # Optional. The name of a Droplet tag corresponding to
          Droplets assigned to the load balancer.
        "target_load_balancer_ids": [
            "str"  # Optional. An array containing the UUIDs of the
              Regional load balancers to be used as target backends for a Global load
              balancer.
        ],
        "tls_cipher_policy": "DEFAULT",  # Optional. Default value is
          "DEFAULT". A string indicating the policy for the TLS cipher suites used by
          the load balancer. The possible values are ``DEFAULT`` or ``STRONG``. The
          default value is ``DEFAULT``. Known values are: "DEFAULT" and "STRONG".
        "type": "REGIONAL",  # Optional. Default value is "REGIONAL". A
          string indicating whether the load balancer should be a standard regional
          HTTP load balancer, a regional network load balancer that routes traffic at
          the TCP/UDP transport layer, or a global load balancer. Known values are:
          "REGIONAL", "REGIONAL_NETWORK", and "GLOBAL".
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the load balancer is assigned.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Load Balancers.

To list all of the load balancer instances on your account, send a GET request to /v2/load_balancers.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "load_balancers": [
        {
            "forwarding_rules": [
                {
                    "entry_port": 0,  # An integer representing
                      the port on which the load balancer instance will listen.
                      Required.
                    "entry_protocol": "str",  # The protocol used
                      for traffic to the load balancer. The possible values are:
                      ``http``"" , ``https``"" , ``http2``"" , ``http3``"" , ``tcp``""
                      , or ``udp``. If you set the  ``entry_protocol`` to ``udp``"" ,
                      the ``target_protocol`` must be set to ``udp``.  When using UDP,
                      the load balancer requires that you set up a health  check with a
                      port that uses TCP, HTTP, or HTTPS to work properly. Required.
                      Known values are: "http", "https", "http2", "http3", "tcp", and
                      "udp".
                    "target_port": 0,  # An integer representing
                      the port on the backend Droplets to which the load balancer will
                      send traffic. Required.
                    "target_protocol": "str",  # The protocol
                      used for traffic from the load balancer to the backend Droplets.
                      The possible values are: ``http``"" , ``https``"" , ``http2``"" ,
                      ``tcp``"" , or ``udp``. If you set the ``target_protocol`` to
                      ``udp``"" , the ``entry_protocol`` must be set to  ``udp``. When
                      using UDP, the load balancer requires that you set up a health
                      check with a port that uses TCP, HTTP, or HTTPS to work properly.
                      Required. Known values are: "http", "https", "http2", "tcp", and
                      "udp".
                    "certificate_id": "str",  # Optional. The ID
                      of the TLS certificate used for SSL termination if enabled.
                    "tls_passthrough": bool  # Optional. A
                      boolean value indicating whether SSL encrypted traffic will be
                      passed through to the backend Droplets.
                }
            ],
            "algorithm": "round_robin",  # Optional. Default value is
              "round_robin". This field has been deprecated. You can no longer specify
              an algorithm for load balancers. Known values are: "round_robin" and
              "least_connections".
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the load balancer was created.
            "disable_lets_encrypt_dns_records": False,  # Optional.
              Default value is False. A boolean value indicating whether to disable
              automatic DNS record creation for Let's Encrypt certificates that are
              added to the load balancer.
            "domains": [
                {
                    "certificate_id": "str",  # Optional. The ID
                      of the TLS certificate used for SSL termination.
                    "is_managed": bool,  # Optional. A boolean
                      value indicating if the domain is already managed by
                      DigitalOcean. If true, all A and AAAA records required to enable
                      Global load balancers will be automatically added.
                    "name": "str"  # Optional. FQDN to associate
                      with a Global load balancer.
                }
            ],
            "enable_backend_keepalive": False,  # Optional. Default value
              is False. A boolean value indicating whether HTTP keepalive connections
              are maintained to target Droplets.
            "enable_proxy_protocol": False,  # Optional. Default value is
              False. A boolean value indicating whether PROXY Protocol is in use.
            "firewall": {
                "allow": [
                    "str"  # Optional. the rules for allowing
                      traffic to the load balancer (in the form 'ip:1.2.3.4' or
                      'cidr:1.2.0.0/16').
                ],
                "deny": [
                    "str"  # Optional. the rules for denying
                      traffic to the load balancer (in the form 'ip:1.2.3.4' or
                      'cidr:1.2.0.0/16').
                ]
            },
            "glb_settings": {
                "cdn": {
                    "is_enabled": bool  # Optional. A boolean
                      flag to enable CDN caching.
                },
                "failover_threshold": 0,  # Optional. An integer
                  value as a percentage to indicate failure threshold to decide how the
                  regional priorities will take effect. A value of ``50`` would
                  indicate that the Global load balancer will choose a lower priority
                  region to forward traffic to once this failure threshold has been
                  reached for the higher priority region.
                "region_priorities": {
                    "str": 0  # Optional. A map of region string
                      to an integer priority value indicating preference for which
                      regional target a Global load balancer will forward traffic to. A
                      lower value indicates a higher priority.
                },
                "target_port": 0,  # Optional. An integer
                  representing the port on the target backends which the load balancer
                  will forward traffic to.
                "target_protocol": "str"  # Optional. The protocol
                  used for forwarding traffic from the load balancer to the target
                  backends. The possible values are ``http``"" , ``https`` and
                  ``http2``. Known values are: "http", "https", and "http2".
            },
            "health_check": {
                "check_interval_seconds": 10,  # Optional. Default
                  value is 10. The number of seconds between between two consecutive
                  health checks.
                "healthy_threshold": 3,  # Optional. Default value is
                  3. The number of times a health check must pass for a backend Droplet
                  to be marked "healthy" and be re-added to the pool.
                "path": "/",  # Optional. Default value is "/". The
                  path on the backend Droplets to which the load balancer instance will
                  send a request.
                "port": 80,  # Optional. Default value is 80. An
                  integer representing the port on the backend Droplets on which the
                  health check will attempt a connection.
                "protocol": "http",  # Optional. Default value is
                  "http". The protocol used for health checks sent to the backend
                  Droplets. The possible values are ``http``"" , ``https``"" , or
                  ``tcp``. Known values are: "http", "https", and "tcp".
                "response_timeout_seconds": 5,  # Optional. Default
                  value is 5. The number of seconds the load balancer instance will
                  wait for a response until marking a health check as failed.
                "unhealthy_threshold": 5  # Optional. Default value
                  is 5. The number of times a health check must fail for a backend
                  Droplet to be marked "unhealthy" and be removed from the pool.
            },
            "http_idle_timeout_seconds": 60,  # Optional. Default value
              is 60. An integer value which configures the idle timeout for HTTP
              requests to the target droplets.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference a load balancer.
            "ip": "str",  # Optional. An attribute containing the
              public-facing IP address of the load balancer.
            "ipv6": "str",  # Optional. An attribute containing the
              public-facing IPv6 address of the load balancer.
            "name": "str",  # Optional. A human-readable name for a load
              balancer instance.
            "network": "EXTERNAL",  # Optional. Default value is
              "EXTERNAL". A string indicating whether the load balancer should be
              external or internal. Internal load balancers have no public IPs and are
              only accessible to resources on the same VPC network. This property
              cannot be updated after creating the load balancer. Known values are:
              "EXTERNAL" and "INTERNAL".
            "network_stack": "IPV4",  # Optional. Default value is
              "IPV4". A string indicating whether the load balancer will support IPv4
              or both IPv4 and IPv6 networking. This property cannot be updated after
              creating the load balancer. Known values are: "IPV4" and "DUALSTACK".
            "project_id": "str",  # Optional. The ID of the project that
              the load balancer is associated with. If no ID is provided at creation,
              the load balancer associates with the user's default project. If an
              invalid project ID is provided, the load balancer will not be created.
            "redirect_http_to_https": False,  # Optional. Default value
              is False. A boolean value indicating whether HTTP requests to the load
              balancer on port 80 will be redirected to HTTPS on port 443.
            "size": "lb-small",  # Optional. Default value is "lb-small".
              This field has been replaced by the ``size_unit`` field for all regions
              except in AMS2, NYC2, and SFO1. Each available load balancer size now
              equates to the load balancer having a set number of nodes.   *
              ``lb-small`` = 1 node * ``lb-medium`` = 3 nodes * ``lb-large`` = 6 nodes
              You can resize load balancers after creation up to once per hour. You
              cannot resize a load balancer within the first hour of its creation.
              Known values are: "lb-small", "lb-medium", and "lb-large".
            "size_unit": 1,  # Optional. Default value is 1. How many
              nodes the load balancer contains. Each additional node increases the load
              balancer's ability to manage more connections. Load balancers can be
              scaled up or down, and you can change the number of nodes after creation
              up to once per hour. This field is currently not available in the AMS2,
              NYC2, or SFO1 regions. Use the ``size`` field to scale load balancers
              that reside in these regions.
            "status": "str",  # Optional. A status string indicating the
              current state of the load balancer. This can be ``new``"" , ``active``""
              , or ``errored``. Known values are: "new", "active", and "errored".
            "sticky_sessions": {
                "cookie_name": "str",  # Optional. The name of the
                  cookie sent to the client. This attribute is only returned when using
                  ``cookies`` for the sticky sessions type.
                "cookie_ttl_seconds": 0,  # Optional. The number of
                  seconds until the cookie set by the load balancer expires. This
                  attribute is only returned when using ``cookies`` for the sticky
                  sessions type.
                "type": "none"  # Optional. Default value is "none".
                  An attribute indicating how and if requests from a client will be
                  persistently served by the same backend Droplet. The possible values
                  are ``cookies`` or ``none``. Known values are: "cookies" and "none".
            },
            "tag": "str",  # Optional. The name of a Droplet tag
              corresponding to Droplets assigned to the load balancer.
            "target_load_balancer_ids": [
                "str"  # Optional. An array containing the UUIDs of
                  the Regional load balancers to be used as target backends for a
                  Global load balancer.
            ],
            "tls_cipher_policy": "DEFAULT",  # Optional. Default value is
              "DEFAULT". A string indicating the policy for the TLS cipher suites used
              by the load balancer. The possible values are ``DEFAULT`` or ``STRONG``.
              The default value is ``DEFAULT``. Known values are: "DEFAULT" and
              "STRONG".
            "type": "REGIONAL",  # Optional. Default value is "REGIONAL".
              A string indicating whether the load balancer should be a standard
              regional HTTP load balancer, a regional network load balancer that routes
              traffic at the TCP/UDP transport layer, or a global load balancer. Known
              values are: "REGIONAL", "REGIONAL_NETWORK", and "GLOBAL".
            "vpc_uuid": "str"  # Optional. A string specifying the UUID
              of the VPC to which the load balancer is assigned.
        }
    ]
}
remove_droplets(lb_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
remove_droplets(lb_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Remove Droplets from a Load Balancer.

To remove a Droplet from a load balancer instance, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID/droplets. In the body of the request, there should be a droplet_ids attribute containing a list of Droplet IDs.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "droplet_ids": [
        0  # An array containing the IDs of the Droplets assigned to the load
          balancer. Required.
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
remove_forwarding_rules(lb_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
remove_forwarding_rules(lb_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Remove Forwarding Rules from a Load Balancer.

To remove forwarding rules from a load balancer instance, send a DELETE request to /v2/load_balancers/$LOAD_BALANCER_ID/forwarding_rules. In the body of the request, there should be a forwarding_rules attribute containing an array of rules to be removed.

No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "forwarding_rules": [
        {
            "entry_port": 0,  # An integer representing the port on which
              the load balancer instance will listen. Required.
            "entry_protocol": "str",  # The protocol used for traffic to
              the load balancer. The possible values are: ``http``"" , ``https``"" ,
              ``http2``"" , ``http3``"" , ``tcp``"" , or ``udp``. If you set the
              ``entry_protocol`` to ``udp``"" , the ``target_protocol`` must be set to
              ``udp``.  When using UDP, the load balancer requires that you set up a
              health  check with a port that uses TCP, HTTP, or HTTPS to work properly.
              Required. Known values are: "http", "https", "http2", "http3", "tcp", and
              "udp".
            "target_port": 0,  # An integer representing the port on the
              backend Droplets to which the load balancer will send traffic. Required.
            "target_protocol": "str",  # The protocol used for traffic
              from the load balancer to the backend Droplets. The possible values are:
              ``http``"" , ``https``"" , ``http2``"" , ``tcp``"" , or ``udp``. If you
              set the ``target_protocol`` to ``udp``"" , the ``entry_protocol`` must be
              set to  ``udp``. When using UDP, the load balancer requires that you set
              up a health  check with a port that uses TCP, HTTP, or HTTPS to work
              properly. Required. Known values are: "http", "https", "http2", "tcp",
              and "udp".
            "certificate_id": "str",  # Optional. The ID of the TLS
              certificate used for SSL termination if enabled.
            "tls_passthrough": bool  # Optional. A boolean value
              indicating whether SSL encrypted traffic will be passed through to the
              backend Droplets.
        }
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(lb_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(lb_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Load Balancer.

To update a load balancer’s settings, send a PUT request to /v2/load_balancers/$LOAD_BALANCER_ID. The request should contain a full representation of the load balancer including existing attributes. It may contain one of the droplets_ids or tag attributes as they are mutually exclusive. Note that any attribute that is not provided will be reset to its default value..

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 200
response == {
    "load_balancer": {
        "forwarding_rules": [
            {
                "entry_port": 0,  # An integer representing the port
                  on which the load balancer instance will listen. Required.
                "entry_protocol": "str",  # The protocol used for
                  traffic to the load balancer. The possible values are: ``http``"" ,
                  ``https``"" , ``http2``"" , ``http3``"" , ``tcp``"" , or ``udp``. If
                  you set the  ``entry_protocol`` to ``udp``"" , the
                  ``target_protocol`` must be set to ``udp``.  When using UDP, the load
                  balancer requires that you set up a health  check with a port that
                  uses TCP, HTTP, or HTTPS to work properly. Required. Known values
                  are: "http", "https", "http2", "http3", "tcp", and "udp".
                "target_port": 0,  # An integer representing the port
                  on the backend Droplets to which the load balancer will send traffic.
                  Required.
                "target_protocol": "str",  # The protocol used for
                  traffic from the load balancer to the backend Droplets. The possible
                  values are: ``http``"" , ``https``"" , ``http2``"" , ``tcp``"" , or
                  ``udp``. If you set the ``target_protocol`` to ``udp``"" , the
                  ``entry_protocol`` must be set to  ``udp``. When using UDP, the load
                  balancer requires that you set up a health  check with a port that
                  uses TCP, HTTP, or HTTPS to work properly. Required. Known values
                  are: "http", "https", "http2", "tcp", and "udp".
                "certificate_id": "str",  # Optional. The ID of the
                  TLS certificate used for SSL termination if enabled.
                "tls_passthrough": bool  # Optional. A boolean value
                  indicating whether SSL encrypted traffic will be passed through to
                  the backend Droplets.
            }
        ],
        "algorithm": "round_robin",  # Optional. Default value is
          "round_robin". This field has been deprecated. You can no longer specify an
          algorithm for load balancers. Known values are: "round_robin" and
          "least_connections".
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the load
          balancer was created.
        "disable_lets_encrypt_dns_records": False,  # Optional. Default value
          is False. A boolean value indicating whether to disable automatic DNS record
          creation for Let's Encrypt certificates that are added to the load balancer.
        "domains": [
            {
                "certificate_id": "str",  # Optional. The ID of the
                  TLS certificate used for SSL termination.
                "is_managed": bool,  # Optional. A boolean value
                  indicating if the domain is already managed by DigitalOcean. If true,
                  all A and AAAA records required to enable Global load balancers will
                  be automatically added.
                "name": "str"  # Optional. FQDN to associate with a
                  Global load balancer.
            }
        ],
        "enable_backend_keepalive": False,  # Optional. Default value is
          False. A boolean value indicating whether HTTP keepalive connections are
          maintained to target Droplets.
        "enable_proxy_protocol": False,  # Optional. Default value is False.
          A boolean value indicating whether PROXY Protocol is in use.
        "firewall": {
            "allow": [
                "str"  # Optional. the rules for allowing traffic to
                  the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16').
            ],
            "deny": [
                "str"  # Optional. the rules for denying traffic to
                  the load balancer (in the form 'ip:1.2.3.4' or 'cidr:1.2.0.0/16').
            ]
        },
        "glb_settings": {
            "cdn": {
                "is_enabled": bool  # Optional. A boolean flag to
                  enable CDN caching.
            },
            "failover_threshold": 0,  # Optional. An integer value as a
              percentage to indicate failure threshold to decide how the regional
              priorities will take effect. A value of ``50`` would indicate that the
              Global load balancer will choose a lower priority region to forward
              traffic to once this failure threshold has been reached for the higher
              priority region.
            "region_priorities": {
                "str": 0  # Optional. A map of region string to an
                  integer priority value indicating preference for which regional
                  target a Global load balancer will forward traffic to. A lower value
                  indicates a higher priority.
            },
            "target_port": 0,  # Optional. An integer representing the
              port on the target backends which the load balancer will forward traffic
              to.
            "target_protocol": "str"  # Optional. The protocol used for
              forwarding traffic from the load balancer to the target backends. The
              possible values are ``http``"" , ``https`` and ``http2``. Known values
              are: "http", "https", and "http2".
        },
        "health_check": {
            "check_interval_seconds": 10,  # Optional. Default value is
              10. The number of seconds between between two consecutive health checks.
            "healthy_threshold": 3,  # Optional. Default value is 3. The
              number of times a health check must pass for a backend Droplet to be
              marked "healthy" and be re-added to the pool.
            "path": "/",  # Optional. Default value is "/". The path on
              the backend Droplets to which the load balancer instance will send a
              request.
            "port": 80,  # Optional. Default value is 80. An integer
              representing the port on the backend Droplets on which the health check
              will attempt a connection.
            "protocol": "http",  # Optional. Default value is "http". The
              protocol used for health checks sent to the backend Droplets. The
              possible values are ``http``"" , ``https``"" , or ``tcp``. Known values
              are: "http", "https", and "tcp".
            "response_timeout_seconds": 5,  # Optional. Default value is
              5. The number of seconds the load balancer instance will wait for a
              response until marking a health check as failed.
            "unhealthy_threshold": 5  # Optional. Default value is 5. The
              number of times a health check must fail for a backend Droplet to be
              marked "unhealthy" and be removed from the pool.
        },
        "http_idle_timeout_seconds": 60,  # Optional. Default value is 60. An
          integer value which configures the idle timeout for HTTP requests to the
          target droplets.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference a load balancer.
        "ip": "str",  # Optional. An attribute containing the public-facing
          IP address of the load balancer.
        "ipv6": "str",  # Optional. An attribute containing the public-facing
          IPv6 address of the load balancer.
        "name": "str",  # Optional. A human-readable name for a load balancer
          instance.
        "network": "EXTERNAL",  # Optional. Default value is "EXTERNAL". A
          string indicating whether the load balancer should be external or internal.
          Internal load balancers have no public IPs and are only accessible to
          resources on the same VPC network. This property cannot be updated after
          creating the load balancer. Known values are: "EXTERNAL" and "INTERNAL".
        "network_stack": "IPV4",  # Optional. Default value is "IPV4". A
          string indicating whether the load balancer will support IPv4 or both IPv4
          and IPv6 networking. This property cannot be updated after creating the load
          balancer. Known values are: "IPV4" and "DUALSTACK".
        "project_id": "str",  # Optional. The ID of the project that the load
          balancer is associated with. If no ID is provided at creation, the load
          balancer associates with the user's default project. If an invalid project ID
          is provided, the load balancer will not be created.
        "redirect_http_to_https": False,  # Optional. Default value is False.
          A boolean value indicating whether HTTP requests to the load balancer on port
          80 will be redirected to HTTPS on port 443.
        "size": "lb-small",  # Optional. Default value is "lb-small". This
          field has been replaced by the ``size_unit`` field for all regions except in
          AMS2, NYC2, and SFO1. Each available load balancer size now equates to the
          load balancer having a set number of nodes.   * ``lb-small`` = 1 node *
          ``lb-medium`` = 3 nodes * ``lb-large`` = 6 nodes  You can resize load
          balancers after creation up to once per hour. You cannot resize a load
          balancer within the first hour of its creation. Known values are: "lb-small",
          "lb-medium", and "lb-large".
        "size_unit": 1,  # Optional. Default value is 1. How many nodes the
          load balancer contains. Each additional node increases the load balancer's
          ability to manage more connections. Load balancers can be scaled up or down,
          and you can change the number of nodes after creation up to once per hour.
          This field is currently not available in the AMS2, NYC2, or SFO1 regions. Use
          the ``size`` field to scale load balancers that reside in these regions.
        "status": "str",  # Optional. A status string indicating the current
          state of the load balancer. This can be ``new``"" , ``active``"" , or
          ``errored``. Known values are: "new", "active", and "errored".
        "sticky_sessions": {
            "cookie_name": "str",  # Optional. The name of the cookie
              sent to the client. This attribute is only returned when using
              ``cookies`` for the sticky sessions type.
            "cookie_ttl_seconds": 0,  # Optional. The number of seconds
              until the cookie set by the load balancer expires. This attribute is only
              returned when using ``cookies`` for the sticky sessions type.
            "type": "none"  # Optional. Default value is "none". An
              attribute indicating how and if requests from a client will be
              persistently served by the same backend Droplet. The possible values are
              ``cookies`` or ``none``. Known values are: "cookies" and "none".
        },
        "tag": "str",  # Optional. The name of a Droplet tag corresponding to
          Droplets assigned to the load balancer.
        "target_load_balancer_ids": [
            "str"  # Optional. An array containing the UUIDs of the
              Regional load balancers to be used as target backends for a Global load
              balancer.
        ],
        "tls_cipher_policy": "DEFAULT",  # Optional. Default value is
          "DEFAULT". A string indicating the policy for the TLS cipher suites used by
          the load balancer. The possible values are ``DEFAULT`` or ``STRONG``. The
          default value is ``DEFAULT``. Known values are: "DEFAULT" and "STRONG".
        "type": "REGIONAL",  # Optional. Default value is "REGIONAL". A
          string indicating whether the load balancer should be a standard regional
          HTTP load balancer, a regional network load balancer that routes traffic at
          the TCP/UDP transport layer, or a global load balancer. Known values are:
          "REGIONAL", "REGIONAL_NETWORK", and "GLOBAL".
        "vpc_uuid": "str"  # Optional. A string specifying the UUID of the
          VPC to which the load balancer is assigned.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.MonitoringOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s monitoring attribute.

create_alert_policy(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_alert_policy(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Alert Policy.

To create a new alert, send a POST request to /v2/monitoring/alerts.

Parameters:

body (JSON or IO[bytes]) –

The type field dictates what type of entity that the alert policy applies to and hence what type of entity is passed in the entities array. If both the tags array and entities array are empty the alert policy applies to all entities of the relevant type that are owned by the user account. Otherwise the following table shows the valid entity types for each type of alert policy:

HTTPS forwarding rule)
  • load balancer ID

    • v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx

    • alert on the percent increase of 5xx level http errors over 5m

    • load balancer ID

    • v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx

    • alert on the percent increase of 4xx level http errors over 5m

    • load balancer ID

    • v1/insights/lbaas/increase_in_http_error_rate_count_5xx

    • alert on the count of 5xx level http errors over 5m

    • load balancer ID

    • v1/insights/lbaas/increase_in_http_error_rate_count_4xx

    • alert on the count of 4xx level http errors over 5m

    • load balancer ID

    • v1/insights/lbaas/high_http_request_response_time

    • alert on high average http response time

    • load balancer ID

    • v1/insights/lbaas/high_http_request_response_time_50p

    • alert on high 50th percentile http response time

    • load balancer ID

    • v1/insights/lbaas/high_http_request_response_time_95p

    • alert on high 95th percentile http response time

    • load balancer ID

    • v1/insights/lbaas/high_http_request_response_time_99p

    • alert on high 99th percentile http response time

    • load balancer ID

    • v1/dbaas/alerts/load_15_alerts

    • alert on 15 minute load average across the database cluster

    • database cluster UUID

    • v1/dbaas/alerts/memory_utilization_alerts

    • alert on the percent memory utilization average across the database cluster

    • database cluster UUID

    • v1/dbaas/alerts/disk_utilization_alerts

    • alert on the percent disk utilization average across the database cluster

    • database cluster UUID

    • v1/dbaas/alerts/cpu_alerts

    • alert on the percent CPU usage average across the database cluster

    • database cluster UUID

    • v1/droplet/autoscale_alerts/current_instances

    • alert on current pool size

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/target_instances

    • alert on target pool size

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/current_cpu_utilization

    • alert on current average CPU utilization

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/target_cpu_utilization

    • alert on target average CPU utilization

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/current_memory_utilization

    • alert on current average memory utilization

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/target_memory_utilization

    • alert on target average memory utilization

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/scale_up

    • alert on scale up event

    • autoscale pool ID

    • v1/droplet/autoscale_alerts/scale_down

    • alert on scale down event

    • autoscale pool ID. Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "alerts": {
        "email": [
            "str"  # An email to notify on an alert trigger. Required.
        ],
        "slack": [
            {
                "channel": "str",  # Slack channel to notify of an
                  alert trigger. Required.
                "url": "str"  # Slack Webhook URL. Required.
            }
        ]
    },
    "compare": "str",  # Required. Known values are: "GreaterThan" and
      "LessThan".
    "description": "str",  # Required.
    "enabled": bool,  # Required.
    "entities": [
        "str"  # Required.
    ],
    "tags": [
        "str"  # Required.
    ],
    "type": "str",  # Required. Known values are: "v1/insights/droplet/load_1",
      "v1/insights/droplet/load_5", "v1/insights/droplet/load_15",
      "v1/insights/droplet/memory_utilization_percent",
      "v1/insights/droplet/disk_utilization_percent", "v1/insights/droplet/cpu",
      "v1/insights/droplet/disk_read", "v1/insights/droplet/disk_write",
      "v1/insights/droplet/public_outbound_bandwidth",
      "v1/insights/droplet/public_inbound_bandwidth",
      "v1/insights/droplet/private_outbound_bandwidth",
      "v1/insights/droplet/private_inbound_bandwidth",
      "v1/insights/lbaas/avg_cpu_utilization_percent",
      "v1/insights/lbaas/connection_utilization_percent",
      "v1/insights/lbaas/droplet_health",
      "v1/insights/lbaas/tls_connections_per_second_utilization_percent",
      "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx",
      "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx",
      "v1/insights/lbaas/increase_in_http_error_rate_count_5xx",
      "v1/insights/lbaas/increase_in_http_error_rate_count_4xx",
      "v1/insights/lbaas/high_http_request_response_time",
      "v1/insights/lbaas/high_http_request_response_time_50p",
      "v1/insights/lbaas/high_http_request_response_time_95p",
      "v1/insights/lbaas/high_http_request_response_time_99p",
      "v1/dbaas/alerts/load_15_alerts", "v1/dbaas/alerts/memory_utilization_alerts",
      "v1/dbaas/alerts/disk_utilization_alerts", "v1/dbaas/alerts/cpu_alerts",
      "v1/droplet/autoscale_alerts/current_instances",
      "v1/droplet/autoscale_alerts/target_instances",
      "v1/droplet/autoscale_alerts/current_cpu_utilization",
      "v1/droplet/autoscale_alerts/target_cpu_utilization",
      "v1/droplet/autoscale_alerts/current_memory_utilization",
      "v1/droplet/autoscale_alerts/target_memory_utilization",
      "v1/droplet/autoscale_alerts/scale_up", and
      "v1/droplet/autoscale_alerts/scale_down".
    "value": 0.0,  # Required.
    "window": "str"  # Required. Known values are: "5m", "10m", "30m", and "1h".
}

# response body for status code(s): 200
response == {
    "policy": {
        "alerts": {
            "email": [
                "str"  # An email to notify on an alert trigger.
                  Required.
            ],
            "slack": [
                {
                    "channel": "str",  # Slack channel to notify
                      of an alert trigger. Required.
                    "url": "str"  # Slack Webhook URL. Required.
                }
            ]
        },
        "compare": "str",  # Required. Known values are: "GreaterThan" and
          "LessThan".
        "description": "str",  # Required.
        "enabled": bool,  # Required.
        "entities": [
            "str"  # Required.
        ],
        "tags": [
            "str"  # Required.
        ],
        "type": "str",  # Required. Known values are:
          "v1/insights/droplet/load_1", "v1/insights/droplet/load_5",
          "v1/insights/droplet/load_15",
          "v1/insights/droplet/memory_utilization_percent",
          "v1/insights/droplet/disk_utilization_percent", "v1/insights/droplet/cpu",
          "v1/insights/droplet/disk_read", "v1/insights/droplet/disk_write",
          "v1/insights/droplet/public_outbound_bandwidth",
          "v1/insights/droplet/public_inbound_bandwidth",
          "v1/insights/droplet/private_outbound_bandwidth",
          "v1/insights/droplet/private_inbound_bandwidth",
          "v1/insights/lbaas/avg_cpu_utilization_percent",
          "v1/insights/lbaas/connection_utilization_percent",
          "v1/insights/lbaas/droplet_health",
          "v1/insights/lbaas/tls_connections_per_second_utilization_percent",
          "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx",
          "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx",
          "v1/insights/lbaas/increase_in_http_error_rate_count_5xx",
          "v1/insights/lbaas/increase_in_http_error_rate_count_4xx",
          "v1/insights/lbaas/high_http_request_response_time",
          "v1/insights/lbaas/high_http_request_response_time_50p",
          "v1/insights/lbaas/high_http_request_response_time_95p",
          "v1/insights/lbaas/high_http_request_response_time_99p",
          "v1/dbaas/alerts/load_15_alerts",
          "v1/dbaas/alerts/memory_utilization_alerts",
          "v1/dbaas/alerts/disk_utilization_alerts", "v1/dbaas/alerts/cpu_alerts",
          "v1/droplet/autoscale_alerts/current_instances",
          "v1/droplet/autoscale_alerts/target_instances",
          "v1/droplet/autoscale_alerts/current_cpu_utilization",
          "v1/droplet/autoscale_alerts/target_cpu_utilization",
          "v1/droplet/autoscale_alerts/current_memory_utilization",
          "v1/droplet/autoscale_alerts/target_memory_utilization",
          "v1/droplet/autoscale_alerts/scale_up", and
          "v1/droplet/autoscale_alerts/scale_down".
        "uuid": "str",  # Required.
        "value": 0.0,  # Required.
        "window": "str"  # Required. Known values are: "5m", "10m", "30m",
          and "1h".
    }
}
create_destination(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_destination(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Logging Destination.

To create a new destination, send a POST request to /v2/monitoring/sinks/destinations.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {
        "endpoint": "str",  # host of the OpenSearch cluster. Required.
        "cluster_name": "str",  # Optional. Name of a managed OpenSearch
          cluster.
        "cluster_uuid": "str",  # Optional. A unique identifier for a managed
          OpenSearch cluster.
        "credentials": {
            "password": "str",  # Optional. Credentials for an OpenSearch
              cluster user. Optional if ``cluster_uuid`` is passed.
            "username": "str"  # Optional. Credentials for an OpenSearch
              cluster user. Optional if ``cluster_uuid`` is passed.
        },
        "index_name": "str",  # Optional. OpenSearch index to send logs to.
        "retention_days": 14  # Optional. Default value is 14. Number of days
          to retain logs in an OpenSearch cluster.
    },
    "type": "str",  # The destination type. ``opensearch_dbaas`` for a
      DigitalOcean managed OpenSearch cluster or ``opensearch_ext`` for an externally
      managed one. Required. Known values are: "opensearch_dbaas" and "opensearch_ext".
    "name": "str"  # Optional. destination name.
}

# response body for status code(s): 200
response == {
    "destination": {
        "config": {
            "cluster_name": "str",  # Optional. Name of a managed
              OpenSearch cluster.
            "cluster_uuid": "str",  # Optional. A unique identifier for a
              managed OpenSearch cluster.
            "endpoint": "str",  # Optional. host of the OpenSearch
              cluster.
            "id": "str",  # Optional. A unique identifier for a
              configuration.
            "index_name": "str",  # Optional. OpenSearch index to send
              logs to.
            "retention_days": 14  # Optional. Default value is 14. Number
              of days to retain logs in OpenSearch.
        },
        "id": "str",  # Optional. A unique identifier for a destination.
        "name": "str",  # Optional. destination name.
        "type": "str"  # Optional. The destination type. ``opensearch_dbaas``
          for a DigitalOcean managed OpenSearch cluster or ``opensearch_ext`` for an
          externally managed one. Known values are: "opensearch_dbaas" and
          "opensearch_ext".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_sink(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
create_sink(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Create Sink.

To create a new sink, send a POST request to /v2/monitoring/sinks. Forwards logs from the resources identified in resources to the specified pre-existing destination.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "destination_uuid": "str",  # Optional. A unique identifier for an
      already-existing destination.
    "resources": [
        {
            "urn": "str",  # The uniform resource name (URN) for the
              resource in the format do:resource_type:resource_id. Required.
            "name": "str"  # Optional. resource name.
        }
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_alert_policy(alert_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an Alert Policy.

To delete an alert policy, send a DELETE request to /v2/monitoring/alerts/{alert_uuid}.

Parameters:

alert_uuid (str) – A unique identifier for an alert policy. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_destination(destination_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Logging Destination.

To delete a destination and all associated sinks, send a DELETE request to /v2/monitoring/sinks/destinations/${destination_uuid}.

Parameters:

destination_uuid (str) – A unique identifier for a destination. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_sink(sink_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Sink.

To delete a sink, send a DELETE request to /v2/monitoring/sinks/${sink_uuid}.

Parameters:

sink_uuid (str) – A unique identifier for a sink. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_alert_policy(alert_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Alert Policy.

To retrieve a given alert policy, send a GET request to /v2/monitoring/alerts/{alert_uuid}.

Parameters:

alert_uuid (str) – A unique identifier for an alert policy. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "policy": {
        "alerts": {
            "email": [
                "str"  # An email to notify on an alert trigger.
                  Required.
            ],
            "slack": [
                {
                    "channel": "str",  # Slack channel to notify
                      of an alert trigger. Required.
                    "url": "str"  # Slack Webhook URL. Required.
                }
            ]
        },
        "compare": "str",  # Required. Known values are: "GreaterThan" and
          "LessThan".
        "description": "str",  # Required.
        "enabled": bool,  # Required.
        "entities": [
            "str"  # Required.
        ],
        "tags": [
            "str"  # Required.
        ],
        "type": "str",  # Required. Known values are:
          "v1/insights/droplet/load_1", "v1/insights/droplet/load_5",
          "v1/insights/droplet/load_15",
          "v1/insights/droplet/memory_utilization_percent",
          "v1/insights/droplet/disk_utilization_percent", "v1/insights/droplet/cpu",
          "v1/insights/droplet/disk_read", "v1/insights/droplet/disk_write",
          "v1/insights/droplet/public_outbound_bandwidth",
          "v1/insights/droplet/public_inbound_bandwidth",
          "v1/insights/droplet/private_outbound_bandwidth",
          "v1/insights/droplet/private_inbound_bandwidth",
          "v1/insights/lbaas/avg_cpu_utilization_percent",
          "v1/insights/lbaas/connection_utilization_percent",
          "v1/insights/lbaas/droplet_health",
          "v1/insights/lbaas/tls_connections_per_second_utilization_percent",
          "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx",
          "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx",
          "v1/insights/lbaas/increase_in_http_error_rate_count_5xx",
          "v1/insights/lbaas/increase_in_http_error_rate_count_4xx",
          "v1/insights/lbaas/high_http_request_response_time",
          "v1/insights/lbaas/high_http_request_response_time_50p",
          "v1/insights/lbaas/high_http_request_response_time_95p",
          "v1/insights/lbaas/high_http_request_response_time_99p",
          "v1/dbaas/alerts/load_15_alerts",
          "v1/dbaas/alerts/memory_utilization_alerts",
          "v1/dbaas/alerts/disk_utilization_alerts", "v1/dbaas/alerts/cpu_alerts",
          "v1/droplet/autoscale_alerts/current_instances",
          "v1/droplet/autoscale_alerts/target_instances",
          "v1/droplet/autoscale_alerts/current_cpu_utilization",
          "v1/droplet/autoscale_alerts/target_cpu_utilization",
          "v1/droplet/autoscale_alerts/current_memory_utilization",
          "v1/droplet/autoscale_alerts/target_memory_utilization",
          "v1/droplet/autoscale_alerts/scale_up", and
          "v1/droplet/autoscale_alerts/scale_down".
        "uuid": "str",  # Required.
        "value": 0.0,  # Required.
        "window": "str"  # Required. Known values are: "5m", "10m", "30m",
          and "1h".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_app_cpu_percentage_metrics(*, app_id: str, start: str, end: str, app_component: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get App CPU Percentage Metrics.

To retrieve cpu percentage metrics for a given app, send a GET request to /v2/monitoring/metrics/apps/cpu_percentage.

Parameters:
  • app_id (str) – The app UUID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

  • app_component (str) – The app component name. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_app_memory_percentage_metrics(*, app_id: str, start: str, end: str, app_component: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get App Memory Percentage Metrics.

To retrieve memory percentage metrics for a given app, send a GET request to /v2/monitoring/metrics/apps/memory_percentage.

Parameters:
  • app_id (str) – The app UUID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

  • app_component (str) – The app component name. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_app_restart_count_metrics_yml(*, app_id: str, start: str, end: str, app_component: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get App Restart Count Metrics.

To retrieve restart count metrics for a given app, send a GET request to /v2/monitoring/metrics/apps/restart_count.

Parameters:
  • app_id (str) – The app UUID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

  • app_component (str) – The app component name. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_database_mysql_cpu_usage(*, db_id: str, aggregate: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL CPU Usage Metrics.

Retrieve CPU usage (percent) for a MySQL cluster. Response is a time series of cluster-level CPU usage. Use aggregate to get avg, max, or min over the range.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • aggregate (str) – Aggregation over the time range (avg, max, or min). Known values are: “avg”, “max”, and “min”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_disk_usage(*, db_id: str, aggregate: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Disk Usage Metrics.

Retrieve disk usage (percent) for a MySQL cluster. Use aggregate (avg, max, or min) over the time range.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • aggregate (str) – Aggregation over the time range (avg, max, or min). Known values are: “avg”, “max”, and “min”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_index_vs_sequential_reads(*, db_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Index vs Sequential Reads Metrics.

Retrieve index vs sequential reads ratio (percent) for a MySQL service — i.e. percentage of reads using an index.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_load(*, db_id: str, metric: str, aggregate: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Load Average Metrics.

Retrieve load metrics for a MySQL cluster. Use metric for the window: load1 (1-minute), load5 (5-minute), or load15 (15-minute). Use aggregate to get either the average (avg) or maximum (max) over that window over the time range.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • metric (str) – Load window: load1 (1-minute), load5 (5-minute), load15 (15-minute). The value is either average or max over that window, depending on the aggregate parameter (avg or max). Known values are: “load1”, “load5”, and “load15”. Required.

  • aggregate (str) – Aggregation over the time range (avg or max). Known values are: “avg” and “max”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_memory_usage(*, db_id: str, aggregate: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Memory Usage Metrics.

Retrieve memory usage (percent) for a MySQL cluster. Use aggregate (avg, max, or min) over the time range.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • aggregate (str) – Aggregation over the time range (avg, max, or min). Known values are: “avg”, “max”, and “min”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_op_rates(*, db_id: str, metric: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Operations Throughput Metrics.

Retrieve operations rate (per second) for a MySQL service. Use metric to choose select, insert, update, or delete.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • metric (str) – Operation type (select, insert, update, or delete). Known values are: “select”, “insert”, “update”, and “delete”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_schema_latency(*, db_id: str, schema: str, metric: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Schema Latency Metrics.

Retrieve table I/O latency (seconds) for a schema. Requires schema and metric (insert, fetch, update, delete).

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • schema (str) – The schema (database) name. Required.

  • metric (str) – Table I/O operation (insert, fetch, update, or delete). Known values are: “insert”, “fetch”, “update”, and “delete”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_schema_throughput(*, db_id: str, schema: str, metric: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Schema Throughput Metrics.

Retrieve table I/O throughput (rows per second) for a schema. Requires schema and metric (insert, fetch, update, delete).

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • schema (str) – The schema (database) name. Required.

  • metric (str) – Table I/O operation (insert, fetch, update, or delete). Known values are: “insert”, “fetch”, “update”, and “delete”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_threads_active(*, db_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Threads Active Metrics.

Retrieve active (running) threads for a MySQL service.

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_threads_connected(*, db_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Threads Connected Metrics.

Retrieve current threads connected for a MySQL service (gauge).

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_database_mysql_threads_created_rate(*, db_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Database MySQL Threads Created Rate Metrics.

Retrieve threads created rate for a MySQL service (per second).

Parameters:
  • db_id (str) – The DBaaS cluster UUID (database ID). Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_destination(destination_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Logging Destination.

To get the details of a destination, send a GET request to /v2/monitoring/sinks/destinations/${destination_uuid}.

Parameters:

destination_uuid (str) – A unique identifier for a destination. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "destination": {
        "config": {
            "cluster_name": "str",  # Optional. Name of a managed
              OpenSearch cluster.
            "cluster_uuid": "str",  # Optional. A unique identifier for a
              managed OpenSearch cluster.
            "endpoint": "str",  # Optional. host of the OpenSearch
              cluster.
            "id": "str",  # Optional. A unique identifier for a
              configuration.
            "index_name": "str",  # Optional. OpenSearch index to send
              logs to.
            "retention_days": 14  # Optional. Default value is 14. Number
              of days to retain logs in OpenSearch.
        },
        "id": "str",  # Optional. A unique identifier for a destination.
        "name": "str",  # Optional. destination name.
        "type": "str"  # Optional. The destination type. ``opensearch_dbaas``
          for a DigitalOcean managed OpenSearch cluster or ``opensearch_ext`` for an
          externally managed one. Known values are: "opensearch_dbaas" and
          "opensearch_ext".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_droplet_autoscale_current_cpu_utilization_yml(*, autoscale_pool_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Autoscale Pool Current Average CPU utilization.

To retrieve the current average CPU utilization for a given Droplet Autoscale Pool, send a GET request to /v2/monitoring/metrics/droplet_autoscale/current_cpu_utilization.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_autoscale_current_instances(*, autoscale_pool_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Autoscale Pool Current Size.

To retrieve the current size for a given Droplet Autoscale Pool, send a GET request to /v2/monitoring/metrics/droplet_autoscale/current_instances.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_autoscale_current_memory_utilization(*, autoscale_pool_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Autoscale Pool Current Average Memory utilization.

To retrieve the current average memory utilization for a given Droplet Autoscale Pool, send a GET request to /v2/monitoring/metrics/droplet_autoscale/current_memory_utilization.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_autoscale_target_cpu_utilization(*, autoscale_pool_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Autoscale Pool Target Average CPU utilization.

To retrieve the target average CPU utilization for a given Droplet Autoscale Pool, send a GET request to /v2/monitoring/metrics/droplet_autoscale/target_cpu_utilization.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_autoscale_target_instances(*, autoscale_pool_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Autoscale Pool Target Size.

To retrieve the target size for a given Droplet Autoscale Pool, send a GET request to /v2/monitoring/metrics/droplet_autoscale/target_instances.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_autoscale_target_memory_utilization(*, autoscale_pool_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Autoscale Pool Target Average Memory utilization.

To retrieve the target average memory utilization for a given Droplet Autoscale Pool, send a GET request to /v2/monitoring/metrics/droplet_autoscale/target_memory_utilization.

Parameters:
  • autoscale_pool_id (str) – A unique identifier for an autoscale pool. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_bandwidth_metrics(*, host_id: str, interface: str, direction: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Bandwidth Metrics.

To retrieve bandwidth metrics for a given Droplet, send a GET request to /v2/monitoring/metrics/droplet/bandwidth. Use the interface query parameter to specify if the results should be for the private or public interface. Use the direction query parameter to specify if the results should be for inbound or outbound traffic. The metrics in the response body are in megabits per second (Mbps).

Parameters:
  • host_id (str) – The droplet ID. Required.

  • interface (str) – The network interface. Known values are: “private” and “public”. Required.

  • direction (str) – The traffic direction. Known values are: “inbound” and “outbound”. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_cpu_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet CPU Metrics.

To retrieve CPU metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/cpu.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_filesystem_free_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Filesystem Free Metrics.

To retrieve filesystem free metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/filesystem_free.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_filesystem_size_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Filesystem Size Metrics.

To retrieve filesystem size metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/filesystem_size.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_load15_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Load15 Metrics.

To retrieve 15 minute load average metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/load_15.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_load1_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Load1 Metrics.

To retrieve 1 minute load average metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/load_1.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_load5_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Load5 Metrics.

To retrieve 5 minute load average metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/load_5.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_memory_available_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Available Memory Metrics.

To retrieve available memory metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/memory_available.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_memory_cached_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Cached Memory Metrics.

To retrieve cached memory metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/memory_cached.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_memory_free_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Free Memory Metrics.

To retrieve free memory metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/memory_free.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_droplet_memory_total_metrics(*, host_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Droplet Total Memory Metrics.

To retrieve total memory metrics for a given droplet, send a GET request to /v2/monitoring/metrics/droplet/memory_total.

Parameters:
  • host_id (str) – The droplet ID. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_connections(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets Active Connections Metrics.

To retrieve Droplets active connections for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_connections.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_downtime(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets Downtime Status Metrics.

To retrieve Droplets downtime status for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_downtime.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_health_checks(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets Health Check Status Metrics.

To retrieve Droplets health check status for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_health_checks.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_response_time50_p(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets 50th Percentile HTTP Response Time Metrics.

To retrieve Droplets 50th percentile HTTP response time in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_response_time_50p.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_response_time95_p(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets 95th Percentile HTTP Response Time Metrics.

To retrieve Droplets 95th percentile HTTP response time in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_response_time_95p.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_response_time99_p(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets 99th Percentile HTTP Response Time Metrics.

To retrieve Droplets 99th percentile HTTP response time in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_response_time_99p.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_response_time_avg(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets Average HTTP Response Time Metrics.

To retrieve Droplets average HTTP response time in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_response_time_avg.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_responses(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets HTTP Rate Of Response Code Metrics.

To retrieve Droplets HTTP rate of response code for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_responses.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_session_duration50_p(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets 50th Percentile HTTP Session Duration Metrics.

To retrieve Droplets 50th percentile HTTP session duration in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_session_duration_50p.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_session_duration95_p(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets 95th Percentile HTTP Session Duration Metrics.

To retrieve Droplets 95th percentile HTTP session duration in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_session_duration_95p.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_http_session_duration_avg(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets Average HTTP Session Duration Metrics.

To retrieve Droplets average HTTP session duration in seconds for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_http_session_duration_avg.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_droplets_queue_size(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Droplets Queue Size Metrics.

To retrieve Droplets queue size for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/droplets_queue_size.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_connections_current(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Total Current Active Connections Metrics.

To retrieve frontend total current active connections for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_connections_current.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_connections_limit(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Max Connections Limit Metrics.

To retrieve frontend max connections limit for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_connections_limit.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_cpu_utilization(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Average Percentage CPU Utilization Metrics.

To retrieve frontend average percentage CPU utilization for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_cpu_utilization.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_firewall_dropped_bytes(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Firewall Dropped Bytes Metrics.

To retrieve firewall dropped bytes for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_firewall_dropped_bytes. This is currently only supported for network load balancers.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_firewall_dropped_packets(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Firewall Dropped Packets Metrics.

To retrieve firewall dropped packets per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_firewall_dropped_packets. This is currently only supported for network load balancers.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_http_requests_per_second(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend HTTP Requests Metrics.

To retrieve frontend HTTP requests per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_http_requests_per_second.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_http_responses(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend HTTP Rate Of Response Code Metrics.

To retrieve frontend HTTP rate of response code for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_http_responses.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_network_throughput_http(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend HTTP Throughput Metrics.

To retrieve frontend HTTP throughput in bytes per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_network_throughput_http.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_network_throughput_tcp(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend TCP Throughput Metrics.

To retrieve frontend TCP throughput in bytes per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_network_throughput_tcp.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_network_throughput_udp(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend UDP Throughput Metrics.

To retrieve frontend UDP throughput in bytes per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_network_throughput_udp.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_nlb_tcp_network_throughput(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Network Load Balancer Frontend TCP Throughput Metrics.

To retrieve frontend TCP throughput in bytes per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_nlb_tcp_network_throughput.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_nlb_udp_network_throughput(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Network Load Balancer Frontend UDP Throughput Metrics.

To retrieve frontend UDP throughput in bytes per second for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_nlb_udp_network_throughput.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_tls_connections_current(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Current TLS Connections Rate Metrics.

To retrieve frontend current TLS connections rate for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_tls_connections_current.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_tls_connections_exceeding_rate_limit(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Closed TLS Connections For Exceeded Rate Limit Metrics.

To retrieve frontend closed TLS connections for exceeded rate limit for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_tls_connections_exceeding_rate_limit.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_lb_frontend_tls_connections_limit(*, lb_id: str, start: str, end: str, **kwargs: Any) MutableMapping[str, Any]

Get Load Balancer Frontend Max TLS Connections Limit Metrics.

To retrieve frontend max TLS connections limit for a given load balancer, send a GET request to /v2/monitoring/metrics/load_balancer/frontend_tls_connections_limit.

Parameters:
  • lb_id (str) – A unique identifier for a load balancer. Required.

  • start (str) – UNIX timestamp to start metric window. Required.

  • end (str) – UNIX timestamp to end metric window. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "data": {
        "result": [
            {
                "metric": {
                    "str": "str"  # An object containing the
                      metric's labels. These labels are key/value pairs that vary
                      depending on the metric being queried. For example, load balancer
                      metrics contain a ``lb_id`` label, while Droplet metrics contain
                      a ``host_id`` label, and App Platform metrics contain a
                      ``app_component`` label. Required.
                },
                "values": [
                    [
                        {}
                    ]
                ]
            }
        ],
        "resultType": "str"  # Required. "matrix"
    },
    "status": "str"  # Required. Known values are: "success" and "error".
}
get_sink(sink_uuid: str, **kwargs: Any) MutableMapping[str, Any]

Get Sink.

To get the details of a sink (resources and destination), send a GET request to /v2/monitoring/sinks/${sink_uuid}.

Parameters:

sink_uuid (str) – A unique identifier for a sink. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "sink": {
        "destination": {
            "config": {
                "endpoint": "str",  # host of the OpenSearch cluster.
                  Required.
                "cluster_name": "str",  # Optional. Name of a managed
                  OpenSearch cluster.
                "cluster_uuid": "str",  # Optional. A unique
                  identifier for a managed OpenSearch cluster.
                "credentials": {
                    "password": "str",  # Optional. Credentials
                      for an OpenSearch cluster user. Optional if ``cluster_uuid`` is
                      passed.
                    "username": "str"  # Optional. Credentials
                      for an OpenSearch cluster user. Optional if ``cluster_uuid`` is
                      passed.
                },
                "id": "str",  # Optional. A unique identifier for a
                  configuration.
                "index_name": "str",  # Optional. OpenSearch index to
                  send logs to.
                "retention_days": 0  # Optional. Number of days to
                  retain logs in OpenSearch (default: 14).
            },
            "id": "str",  # Optional. A unique identifier for a
              destination.
            "name": "str",  # Optional. destination name.
            "type": "str"  # Optional. The destination type.
              ``opensearch_dbaas`` for a DigitalOcean managed OpenSearch cluster or
              ``opensearch_ext`` for an externally managed one. Known values are:
              "opensearch_dbaas" and "opensearch_ext".
        },
        "resources": [
            {
                "urn": "str",  # The uniform resource name (URN) for
                  the resource in the format do:resource_type:resource_id. Required.
                "name": "str"  # Optional. resource name.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_alert_policy(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Alert Policies.

Returns all alert policies that are configured for the given account. To List all alert policies, send a GET request to /v2/monitoring/alerts.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "policies": [
        {
            "alerts": {
                "email": [
                    "str"  # An email to notify on an alert
                      trigger. Required.
                ],
                "slack": [
                    {
                        "channel": "str",  # Slack channel to
                          notify of an alert trigger. Required.
                        "url": "str"  # Slack Webhook URL.
                          Required.
                    }
                ]
            },
            "compare": "str",  # Required. Known values are:
              "GreaterThan" and "LessThan".
            "description": "str",  # Required.
            "enabled": bool,  # Required.
            "entities": [
                "str"  # Required.
            ],
            "tags": [
                "str"  # Required.
            ],
            "type": "str",  # Required. Known values are:
              "v1/insights/droplet/load_1", "v1/insights/droplet/load_5",
              "v1/insights/droplet/load_15",
              "v1/insights/droplet/memory_utilization_percent",
              "v1/insights/droplet/disk_utilization_percent",
              "v1/insights/droplet/cpu", "v1/insights/droplet/disk_read",
              "v1/insights/droplet/disk_write",
              "v1/insights/droplet/public_outbound_bandwidth",
              "v1/insights/droplet/public_inbound_bandwidth",
              "v1/insights/droplet/private_outbound_bandwidth",
              "v1/insights/droplet/private_inbound_bandwidth",
              "v1/insights/lbaas/avg_cpu_utilization_percent",
              "v1/insights/lbaas/connection_utilization_percent",
              "v1/insights/lbaas/droplet_health",
              "v1/insights/lbaas/tls_connections_per_second_utilization_percent",
              "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx",
              "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx",
              "v1/insights/lbaas/increase_in_http_error_rate_count_5xx",
              "v1/insights/lbaas/increase_in_http_error_rate_count_4xx",
              "v1/insights/lbaas/high_http_request_response_time",
              "v1/insights/lbaas/high_http_request_response_time_50p",
              "v1/insights/lbaas/high_http_request_response_time_95p",
              "v1/insights/lbaas/high_http_request_response_time_99p",
              "v1/dbaas/alerts/load_15_alerts",
              "v1/dbaas/alerts/memory_utilization_alerts",
              "v1/dbaas/alerts/disk_utilization_alerts", "v1/dbaas/alerts/cpu_alerts",
              "v1/droplet/autoscale_alerts/current_instances",
              "v1/droplet/autoscale_alerts/target_instances",
              "v1/droplet/autoscale_alerts/current_cpu_utilization",
              "v1/droplet/autoscale_alerts/target_cpu_utilization",
              "v1/droplet/autoscale_alerts/current_memory_utilization",
              "v1/droplet/autoscale_alerts/target_memory_utilization",
              "v1/droplet/autoscale_alerts/scale_up", and
              "v1/droplet/autoscale_alerts/scale_down".
            "uuid": "str",  # Required.
            "value": 0.0,  # Required.
            "window": "str"  # Required. Known values are: "5m", "10m",
              "30m", and "1h".
        }
    ],
    "links": {
        "pages": {}
    }
}
list_destinations(**kwargs: Any) MutableMapping[str, Any]

List Logging Destinations.

To list all logging destinations, send a GET request to /v2/monitoring/sinks/destinations.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "destinations": [
        {
            "config": {
                "cluster_name": "str",  # Optional. Name of a managed
                  OpenSearch cluster.
                "cluster_uuid": "str",  # Optional. A unique
                  identifier for a managed OpenSearch cluster.
                "endpoint": "str",  # Optional. host of the
                  OpenSearch cluster.
                "id": "str",  # Optional. A unique identifier for a
                  configuration.
                "index_name": "str",  # Optional. OpenSearch index to
                  send logs to.
                "retention_days": 14  # Optional. Default value is
                  14. Number of days to retain logs in OpenSearch.
            },
            "id": "str",  # Optional. A unique identifier for a
              destination.
            "name": "str",  # Optional. destination name.
            "type": "str"  # Optional. The destination type.
              ``opensearch_dbaas`` for a DigitalOcean managed OpenSearch cluster or
              ``opensearch_ext`` for an externally managed one. Known values are:
              "opensearch_dbaas" and "opensearch_ext".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_sinks(*, resource_id: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Lists all sinks.

To list all sinks, send a GET request to /v2/monitoring/sinks.

Parameters:

resource_id (str) – A unique URN for a resource. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "sinks": [
        {
            "destination": {
                "config": {
                    "endpoint": "str",  # host of the OpenSearch
                      cluster. Required.
                    "cluster_name": "str",  # Optional. Name of a
                      managed OpenSearch cluster.
                    "cluster_uuid": "str",  # Optional. A unique
                      identifier for a managed OpenSearch cluster.
                    "credentials": {
                        "password": "str",  # Optional.
                          Credentials for an OpenSearch cluster user. Optional if
                          ``cluster_uuid`` is passed.
                        "username": "str"  # Optional.
                          Credentials for an OpenSearch cluster user. Optional if
                          ``cluster_uuid`` is passed.
                    },
                    "id": "str",  # Optional. A unique identifier
                      for a configuration.
                    "index_name": "str",  # Optional. OpenSearch
                      index to send logs to.
                    "retention_days": 0  # Optional. Number of
                      days to retain logs in OpenSearch (default: 14).
                },
                "id": "str",  # Optional. A unique identifier for a
                  destination.
                "name": "str",  # Optional. destination name.
                "type": "str"  # Optional. The destination type.
                  ``opensearch_dbaas`` for a DigitalOcean managed OpenSearch cluster or
                  ``opensearch_ext`` for an externally managed one. Known values are:
                  "opensearch_dbaas" and "opensearch_ext".
            },
            "resources": [
                {
                    "urn": "str",  # The uniform resource name
                      (URN) for the resource in the format
                      do:resource_type:resource_id. Required.
                    "name": "str"  # Optional. resource name.
                }
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_alert_policy(alert_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_alert_policy(alert_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an Alert Policy.

To update en existing policy, send a PUT request to v2/monitoring/alerts/{alert_uuid}.

Parameters:
  • alert_uuid (str) – A unique identifier for an alert policy. Required.

  • body (JSON or IO[bytes]) –

    The type field dictates what type of entity that the alert policy applies to and hence what type of entity is passed in the entities array. If both the tags array and entities array are empty the alert policy applies to all entities of the relevant type that are owned by the user account. Otherwise the following table shows the valid entity types for each type of alert policy:

    HTTPS forwarding rule)
    • load balancer ID

      • v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx

      • alert on the percent increase of 5xx level http errors over 5m

      • load balancer ID

      • v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx

      • alert on the percent increase of 4xx level http errors over 5m

      • load balancer ID

      • v1/insights/lbaas/increase_in_http_error_rate_count_5xx

      • alert on the count of 5xx level http errors over 5m

      • load balancer ID

      • v1/insights/lbaas/increase_in_http_error_rate_count_4xx

      • alert on the count of 4xx level http errors over 5m

      • load balancer ID

      • v1/insights/lbaas/high_http_request_response_time

      • alert on high average http response time

      • load balancer ID

      • v1/insights/lbaas/high_http_request_response_time_50p

      • alert on high 50th percentile http response time

      • load balancer ID

      • v1/insights/lbaas/high_http_request_response_time_95p

      • alert on high 95th percentile http response time

      • load balancer ID

      • v1/insights/lbaas/high_http_request_response_time_99p

      • alert on high 99th percentile http response time

      • load balancer ID

      • v1/dbaas/alerts/load_15_alerts

      • alert on 15 minute load average across the database cluster

      • database cluster UUID

      • v1/dbaas/alerts/memory_utilization_alerts

      • alert on the percent memory utilization average across the database cluster

      • database cluster UUID

      • v1/dbaas/alerts/disk_utilization_alerts

      • alert on the percent disk utilization average across the database cluster

      • database cluster UUID

      • v1/dbaas/alerts/cpu_alerts

      • alert on the percent CPU usage average across the database cluster

      • database cluster UUID

      • v1/droplet/autoscale_alerts/current_instances

      • alert on current pool size

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/target_instances

      • alert on target pool size

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/current_cpu_utilization

      • alert on current average CPU utilization

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/target_cpu_utilization

      • alert on target average CPU utilization

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/current_memory_utilization

      • alert on current average memory utilization

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/target_memory_utilization

      • alert on target average memory utilization

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/scale_up

      • alert on scale up event

      • autoscale pool ID

      • v1/droplet/autoscale_alerts/scale_down

      • alert on scale down event

      • autoscale pool ID. Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "alerts": {
        "email": [
            "str"  # An email to notify on an alert trigger. Required.
        ],
        "slack": [
            {
                "channel": "str",  # Slack channel to notify of an
                  alert trigger. Required.
                "url": "str"  # Slack Webhook URL. Required.
            }
        ]
    },
    "compare": "str",  # Required. Known values are: "GreaterThan" and
      "LessThan".
    "description": "str",  # Required.
    "enabled": bool,  # Required.
    "entities": [
        "str"  # Required.
    ],
    "tags": [
        "str"  # Required.
    ],
    "type": "str",  # Required. Known values are: "v1/insights/droplet/load_1",
      "v1/insights/droplet/load_5", "v1/insights/droplet/load_15",
      "v1/insights/droplet/memory_utilization_percent",
      "v1/insights/droplet/disk_utilization_percent", "v1/insights/droplet/cpu",
      "v1/insights/droplet/disk_read", "v1/insights/droplet/disk_write",
      "v1/insights/droplet/public_outbound_bandwidth",
      "v1/insights/droplet/public_inbound_bandwidth",
      "v1/insights/droplet/private_outbound_bandwidth",
      "v1/insights/droplet/private_inbound_bandwidth",
      "v1/insights/lbaas/avg_cpu_utilization_percent",
      "v1/insights/lbaas/connection_utilization_percent",
      "v1/insights/lbaas/droplet_health",
      "v1/insights/lbaas/tls_connections_per_second_utilization_percent",
      "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx",
      "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx",
      "v1/insights/lbaas/increase_in_http_error_rate_count_5xx",
      "v1/insights/lbaas/increase_in_http_error_rate_count_4xx",
      "v1/insights/lbaas/high_http_request_response_time",
      "v1/insights/lbaas/high_http_request_response_time_50p",
      "v1/insights/lbaas/high_http_request_response_time_95p",
      "v1/insights/lbaas/high_http_request_response_time_99p",
      "v1/dbaas/alerts/load_15_alerts", "v1/dbaas/alerts/memory_utilization_alerts",
      "v1/dbaas/alerts/disk_utilization_alerts", "v1/dbaas/alerts/cpu_alerts",
      "v1/droplet/autoscale_alerts/current_instances",
      "v1/droplet/autoscale_alerts/target_instances",
      "v1/droplet/autoscale_alerts/current_cpu_utilization",
      "v1/droplet/autoscale_alerts/target_cpu_utilization",
      "v1/droplet/autoscale_alerts/current_memory_utilization",
      "v1/droplet/autoscale_alerts/target_memory_utilization",
      "v1/droplet/autoscale_alerts/scale_up", and
      "v1/droplet/autoscale_alerts/scale_down".
    "value": 0.0,  # Required.
    "window": "str"  # Required. Known values are: "5m", "10m", "30m", and "1h".
}

# response body for status code(s): 200
response == {
    "policy": {
        "alerts": {
            "email": [
                "str"  # An email to notify on an alert trigger.
                  Required.
            ],
            "slack": [
                {
                    "channel": "str",  # Slack channel to notify
                      of an alert trigger. Required.
                    "url": "str"  # Slack Webhook URL. Required.
                }
            ]
        },
        "compare": "str",  # Required. Known values are: "GreaterThan" and
          "LessThan".
        "description": "str",  # Required.
        "enabled": bool,  # Required.
        "entities": [
            "str"  # Required.
        ],
        "tags": [
            "str"  # Required.
        ],
        "type": "str",  # Required. Known values are:
          "v1/insights/droplet/load_1", "v1/insights/droplet/load_5",
          "v1/insights/droplet/load_15",
          "v1/insights/droplet/memory_utilization_percent",
          "v1/insights/droplet/disk_utilization_percent", "v1/insights/droplet/cpu",
          "v1/insights/droplet/disk_read", "v1/insights/droplet/disk_write",
          "v1/insights/droplet/public_outbound_bandwidth",
          "v1/insights/droplet/public_inbound_bandwidth",
          "v1/insights/droplet/private_outbound_bandwidth",
          "v1/insights/droplet/private_inbound_bandwidth",
          "v1/insights/lbaas/avg_cpu_utilization_percent",
          "v1/insights/lbaas/connection_utilization_percent",
          "v1/insights/lbaas/droplet_health",
          "v1/insights/lbaas/tls_connections_per_second_utilization_percent",
          "v1/insights/lbaas/increase_in_http_error_rate_percentage_5xx",
          "v1/insights/lbaas/increase_in_http_error_rate_percentage_4xx",
          "v1/insights/lbaas/increase_in_http_error_rate_count_5xx",
          "v1/insights/lbaas/increase_in_http_error_rate_count_4xx",
          "v1/insights/lbaas/high_http_request_response_time",
          "v1/insights/lbaas/high_http_request_response_time_50p",
          "v1/insights/lbaas/high_http_request_response_time_95p",
          "v1/insights/lbaas/high_http_request_response_time_99p",
          "v1/dbaas/alerts/load_15_alerts",
          "v1/dbaas/alerts/memory_utilization_alerts",
          "v1/dbaas/alerts/disk_utilization_alerts", "v1/dbaas/alerts/cpu_alerts",
          "v1/droplet/autoscale_alerts/current_instances",
          "v1/droplet/autoscale_alerts/target_instances",
          "v1/droplet/autoscale_alerts/current_cpu_utilization",
          "v1/droplet/autoscale_alerts/target_cpu_utilization",
          "v1/droplet/autoscale_alerts/current_memory_utilization",
          "v1/droplet/autoscale_alerts/target_memory_utilization",
          "v1/droplet/autoscale_alerts/scale_up", and
          "v1/droplet/autoscale_alerts/scale_down".
        "uuid": "str",  # Required.
        "value": 0.0,  # Required.
        "window": "str"  # Required. Known values are: "5m", "10m", "30m",
          and "1h".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_destination(destination_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
update_destination(destination_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Update Logging Destination.

To update the details of a destination, send a PATCH request to /v2/monitoring/sinks/destinations/${destination_uuid}.

Parameters:
  • destination_uuid (str) – A unique identifier for a destination. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "config": {
        "endpoint": "str",  # host of the OpenSearch cluster. Required.
        "cluster_name": "str",  # Optional. Name of a managed OpenSearch
          cluster.
        "cluster_uuid": "str",  # Optional. A unique identifier for a managed
          OpenSearch cluster.
        "credentials": {
            "password": "str",  # Optional. Credentials for an OpenSearch
              cluster user. Optional if ``cluster_uuid`` is passed.
            "username": "str"  # Optional. Credentials for an OpenSearch
              cluster user. Optional if ``cluster_uuid`` is passed.
        },
        "index_name": "str",  # Optional. OpenSearch index to send logs to.
        "retention_days": 14  # Optional. Default value is 14. Number of days
          to retain logs in an OpenSearch cluster.
    },
    "type": "str",  # The destination type. ``opensearch_dbaas`` for a
      DigitalOcean managed OpenSearch cluster or ``opensearch_ext`` for an externally
      managed one. Required. Known values are: "opensearch_dbaas" and "opensearch_ext".
    "name": "str"  # Optional. destination name.
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.NfsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s nfs attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a new NFS share.

To create a new NFS share, send a POST request to /v2/nfs.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The human-readable name of the share. Required.
    "region": "str",  # The DigitalOcean region slug (e.g., nyc2, atl1) where the
      NFS share resides. Required.
    "size_gib": 0,  # The desired/provisioned size of the share in GiB
      (Gibibytes). Must be >= 50. Required.
    "vpc_ids": [
        "str"  # List of VPC IDs that should be able to access the share.
          Required.
    ],
    "performance_tier": "str"  # Optional. The performance tier of the share.
}

# response body for status code(s): 201
response == {
    "share": {
        "created_at": "2020-02-20 00:00:00",  # Timestamp for when the NFS
          share was created. Required.
        "id": "str",  # The unique identifier of the NFS share. Required.
        "name": "str",  # The human-readable name of the share. Required.
        "region": "str",  # The DigitalOcean region slug (e.g., nyc2, atl1)
          where the NFS share resides. Required.
        "size_gib": 0,  # The desired/provisioned size of the share in GiB
          (Gibibytes). Must be >= 50. Required.
        "status": "str",  # The current status of the share. Required. Known
          values are: "CREATING", "ACTIVE", "FAILED", and "DELETED".
        "host": "str",  # Optional. The host IP of the NFS server that will
          be accessible from the associated VPC.
        "mount_path": "str",  # Optional. Path at which the share will be
          available, to be mounted at a target of the user's choice within the client.
        "vpc_ids": [
            "str"  # Optional. List of VPC IDs that should be able to
              access the share.
        ]
    }
}
# response body for status code(s): 400
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_action(nfs_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_action(nfs_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate an NFS action.

To execute an action (such as resize) on a specified NFS share, send a POST request to /v2/nfs/{nfs_id}/actions. In the JSON body to the request, set the type attribute to on of the supported action types:

Action

Details

<nobr>`resize`</nobr>

Resizes an NFS share. Set the size_gib attribute to a desired value in GiB

<nobr>`snapshot`</nobr>

Takes a snapshot of an NFS share

<nobr>`attach`</nobr>

Attaches an NFS share to a VPC. Set the vpc_id attribute to the desired VPC ID

<nobr>`detach`</nobr>

Detaches an NFS share from a VPC. Set the vpc_id attribute to the desired VPC ID

<nobr>`reassign`</nobr>

Reassigns an NFS share from one VPC to another. Set the old_vpc_id and new_vpc_id

attributes to the desired VPC IDs
    • <nobr>`switch_performance_tier`</nobr>

    • Switches the performance tier of an NFS share. Set the performance_tier attribute to the

desired tier (e.g., standard, high).

Parameters:
  • nfs_id (str) – The unique ID of the NFS share. Required.

  • body (JSON or IO[bytes]) – The type attribute set in the request body will specify the action that will be taken on the NFS share. Some actions will require additional attributes to be set as well. Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "action": {
        "region_slug": "str",  # The DigitalOcean region slug where the
          resource is located. Required.
        "resource_id": "str",  # The unique identifier of the resource on
          which the action is being performed. Required.
        "resource_type": "str",  # The type of resource on which the action
          is being performed. Required. Known values are: "network_file_share" and
          "network_file_share_snapshot".
        "started_at": "2020-02-20 00:00:00",  # The timestamp when the action
          was started. Required.
        "status": "str",  # The current status of the action. Required. Known
          values are: "in-progress", "completed", and "errored".
        "type": "str"  # The type of action being performed. Required.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(nfs_id: str, *, region: Optional[str] = None, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an NFS share.

To delete an NFS share, send a DELETE request to /v2/nfs/{nfs_id}?region=${region}.

A successful request will return a 204 No Content status code.

Parameters:
  • nfs_id (str) – The unique ID of the NFS share. Required.

  • region (str) – The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_snapshot(nfs_snapshot_id: str, *, region: Optional[str] = None, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an NFS snapshot.

To delete an NFS snapshot, send a DELETE request to /v2/nfs/snapshots/{nfs_snapshot_id}?region=${region}.

A successful request will return a 204 No Content status code.

Parameters:
  • nfs_snapshot_id (str) – The unique ID of the NFS snapshot. Required.

  • region (str) – The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(nfs_id: str, *, region: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get an NFS share.

To get an NFS share, send a GET request to /v2/nfs/{nfs_id}?region=${region}.

A successful request will return the NFS share.

Parameters:
  • nfs_id (str) – The unique ID of the NFS share. Required.

  • region (str) – The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "share": {
        "created_at": "2020-02-20 00:00:00",  # Timestamp for when the NFS
          share was created. Required.
        "id": "str",  # The unique identifier of the NFS share. Required.
        "name": "str",  # The human-readable name of the share. Required.
        "region": "str",  # The DigitalOcean region slug (e.g., nyc2, atl1)
          where the NFS share resides. Required.
        "size_gib": 0,  # The desired/provisioned size of the share in GiB
          (Gibibytes). Must be >= 50. Required.
        "status": "str",  # The current status of the share. Required. Known
          values are: "CREATING", "ACTIVE", "FAILED", and "DELETED".
        "host": "str",  # Optional. The host IP of the NFS server that will
          be accessible from the associated VPC.
        "mount_path": "str",  # Optional. Path at which the share will be
          available, to be mounted at a target of the user's choice within the client.
        "vpc_ids": [
            "str"  # Optional. List of VPC IDs that should be able to
              access the share.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_snapshot(nfs_snapshot_id: str, *, region: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get an NFS snapshot by ID.

To get an NFS snapshot, send a GET request to /v2/nfs/snapshots/{nfs_snapshot_id}?region=${region}.

A successful request will return the NFS snapshot.

Parameters:
  • nfs_snapshot_id (str) – The unique ID of the NFS snapshot. Required.

  • region (str) – The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "snapshot": {
        "created_at": "2020-02-20 00:00:00",  # The timestamp when the
          snapshot was created. Required.
        "id": "str",  # The unique identifier of the snapshot. Required.
        "name": "str",  # The human-readable name of the snapshot. Required.
        "region": "str",  # The DigitalOcean region slug where the snapshot
          is located. Required.
        "share_id": "str",  # The unique identifier of the share from which
          this snapshot was created. Required.
        "size_gib": 0,  # The size of the snapshot in GiB. Required.
        "status": "str"  # The current status of the snapshot. Required.
          Known values are: "UNKNOWN", "CREATING", "ACTIVE", "FAILED", and "DELETED".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, region: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List NFS shares per region.

To list NFS shares, send a GET request to /v2/nfs?region=${region}.

A successful request will return all NFS shares belonging to the authenticated user.

Parameters:

region (str) – The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "shares": [
        {
            "created_at": "2020-02-20 00:00:00",  # Timestamp for when
              the NFS share was created. Required.
            "id": "str",  # The unique identifier of the NFS share.
              Required.
            "name": "str",  # The human-readable name of the share.
              Required.
            "region": "str",  # The DigitalOcean region slug (e.g., nyc2,
              atl1) where the NFS share resides. Required.
            "size_gib": 0,  # The desired/provisioned size of the share
              in GiB (Gibibytes). Must be >= 50. Required.
            "status": "str",  # The current status of the share.
              Required. Known values are: "CREATING", "ACTIVE", "FAILED", and
              "DELETED".
            "host": "str",  # Optional. The host IP of the NFS server
              that will be accessible from the associated VPC.
            "mount_path": "str",  # Optional. Path at which the share
              will be available, to be mounted at a target of the user's choice within
              the client.
            "vpc_ids": [
                "str"  # Optional. List of VPC IDs that should be
                  able to access the share.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_snapshot(*, region: Optional[str] = None, share_id: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List NFS snapshots per region.

To list all NFS snapshots, send a GET request to /v2/nfs/snapshots?region=${region}&share_id={share_id}.

A successful request will return all NFS snapshots belonging to the authenticated user in the specified region.

Optionally, you can filter snapshots by a specific NFS share by including the share_id query parameter.

Parameters:
  • region (str) – The DigitalOcean region slug (e.g., nyc2, atl1) where the NFS share resides. Default value is None.

  • share_id (str) – The unique ID of an NFS share. If provided, only snapshots of this specific share will be returned. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "snapshots": [
        {
            "created_at": "2020-02-20 00:00:00",  # The timestamp when
              the snapshot was created. Required.
            "id": "str",  # The unique identifier of the snapshot.
              Required.
            "name": "str",  # The human-readable name of the snapshot.
              Required.
            "region": "str",  # The DigitalOcean region slug where the
              snapshot is located. Required.
            "share_id": "str",  # The unique identifier of the share from
              which this snapshot was created. Required.
            "size_gib": 0,  # The size of the snapshot in GiB. Required.
            "status": "str"  # The current status of the snapshot.
              Required. Known values are: "UNKNOWN", "CREATING", "ACTIVE", "FAILED",
              and "DELETED".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.OneClicksOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s one_clicks attribute.

install_kubernetes(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
install_kubernetes(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Install Kubernetes 1-Click Applications.

To install a Kubernetes 1-Click application on a cluster, send a POST request to /v2/1-clicks/kubernetes. The addon_slugs and cluster_uuid must be provided as body parameter in order to specify which 1-Click application(s) to install. To list all available 1-Click Kubernetes applications, send a request to /v2/1-clicks?type=kubernetes.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "addon_slugs": [
        "str"  # An array of 1-Click Application slugs to be installed to the
          Kubernetes cluster. Required.
    ],
    "cluster_uuid": "str"  # A unique ID for the Kubernetes cluster to which the
      1-Click Applications will be installed. Required.
}

# response body for status code(s): 200
response == {
    "message": "str"  # Optional. A message about the result of the request.
}
list(*, type: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List 1-Click Applications.

To list all available 1-Click applications, send a GET request to /v2/1-clicks. The type may be provided as query paramater in order to restrict results to a certain type of 1-Click, for example: /v2/1-clicks?type=droplet. Current supported types are kubernetes and droplet.

The response will be a JSON object with a key called 1_clicks. This will be set to an array of 1-Click application data, each of which will contain the the slug and type for the 1-Click.

Parameters:

type (str) – Restrict results to a certain type of 1-Click. Known values are: “droplet” and “kubernetes”. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "1_clicks": [
        {
            "slug": "str",  # The slug identifier for the 1-Click
              application. Required.
            "type": "str"  # The type of the 1-Click application.
              Required.
        }
    ]
}
class pydo.operations.PartnerAttachmentsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s partner_attachments attribute.

create(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a new partner attachment.

To create a new partner attachment, send a POST request to /v2/partner_network_connect/attachments with a JSON object containing the required configuration details.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "connection_bandwidth_in_mbps": 0,  # Bandwidth (in Mbps) of the connection.
      Required. Known values are: 1000, 2000, 5000, and 10000.
    "naas_provider": "str",  # Required.
    "name": "str",  # The name of the partner attachment. Must be unique and may
      only contain alphanumeric characters, dashes, and periods. Required.
    "region": "str",  # The region to create the partner attachment. Required.
      Known values are: "nyc", "sfo", "fra", "ams", and "sgp".
    "vpc_ids": [
        "str"  # An array of VPCs IDs. Required.
    ],
    "bgp": {
        "auth_key": "str",  # BGP Auth Key. Required.
        "local_router_ip": "str",  # IP of the DO router. Required.
        "peer_router_asn": 0,  # ASN of the peer router. Required.
        "peer_router_ip": "str"  # IP of the Naas Provider router. Required.
    },
    "parent_uuid": "str",  # Optional. Optional associated partner attachment
      UUID.
    "redundancy_zone": "str"  # Optional. Optional redundancy zone for the
      partner attachment. Known values are: "MEGAPORT_BLUE" and "MEGAPORT_RED".
}

# response body for status code(s): 202
response == {
    "partner_attachment": {
        "bgp": {
            "local_asn": 0,  # Optional. ASN of the local router.
            "local_router_ip": "str",  # Optional. IP of the DigitalOcean
              router.
            "peer_asn": 0,  # Optional. ASN of the peer router.
            "peer_router_ip": "str"  # Optional. IP of the peer router.
        },
        "children": [
            "str"  # Optional. An array of associated partner attachment
              UUIDs.
        ],
        "connection_bandwidth_in_mbps": 0,  # Optional. The bandwidth (in
          Mbps) of the connection.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the partner attachment.
        "naas_provider": "str",  # Optional. The Network as a Service (NaaS)
          provider for the partner attachment.
        "name": "str",  # Optional. The name of the partner attachment. Must
          be unique and may only contain alphanumeric characters, dashes, and periods.
        "parent_uuid": "str",  # Optional. Associated partner attachment
          UUID.
        "region": "str",  # Optional. The region where the partner attachment
          is located.
        "state": "str",  # Optional. The current operational state of the
          attachment.
        "vpc_ids": [
            "str"  # Optional. An array of VPC network IDs.
        ]
    }
}
# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_service_key(pa_id: str, **kwargs: Any) MutableMapping[str, Any]

Regenerate the service key for the partner attachment.

This operation generates a new service key for the specified partner attachment. The operation is asynchronous, and the response is an empty JSON object returned with a 202 status code. To poll for the new service key, send a GET request to /v2/partner_network_connect/attachments/{pa_id}/service_key.

Parameters:

pa_id (str) – A unique identifier for a partner attachment. Required.

Returns:

JSON or JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(pa_id: str, **kwargs: Any) MutableMapping[str, Any]

Delete an existing partner attachment.

To delete an existing partner attachment, send a DELETE request to /v2/partner_network_connect/attachments/{pa_id}.

Parameters:

pa_id (str) – A unique identifier for a partner attachment. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 202
response == {
    "partner_attachment": {
        "bgp": {
            "local_asn": 0,  # Optional. ASN of the local router.
            "local_router_ip": "str",  # Optional. IP of the DigitalOcean
              router.
            "peer_asn": 0,  # Optional. ASN of the peer router.
            "peer_router_ip": "str"  # Optional. IP of the peer router.
        },
        "children": [
            "str"  # Optional. An array of associated partner attachment
              UUIDs.
        ],
        "connection_bandwidth_in_mbps": 0,  # Optional. The bandwidth (in
          Mbps) of the connection.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the partner attachment.
        "naas_provider": "str",  # Optional. The Network as a Service (NaaS)
          provider for the partner attachment.
        "name": "str",  # Optional. The name of the partner attachment. Must
          be unique and may only contain alphanumeric characters, dashes, and periods.
        "parent_uuid": "str",  # Optional. Associated partner attachment
          UUID.
        "region": "str",  # Optional. The region where the partner attachment
          is located.
        "state": "str",  # Optional. The current operational state of the
          attachment.
        "vpc_ids": [
            "str"  # Optional. An array of VPC network IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(pa_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an existing partner attachment.

To get the details of a partner attachment, send a GET request to /v2/partner_network_connect/attachments/{pa_id}.

Parameters:

pa_id (str) – A unique identifier for a partner attachment. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "partner_attachment": {
        "bgp": {
            "local_asn": 0,  # Optional. ASN of the local router.
            "local_router_ip": "str",  # Optional. IP of the DigitalOcean
              router.
            "peer_asn": 0,  # Optional. ASN of the peer router.
            "peer_router_ip": "str"  # Optional. IP of the peer router.
        },
        "children": [
            "str"  # Optional. An array of associated partner attachment
              UUIDs.
        ],
        "connection_bandwidth_in_mbps": 0,  # Optional. The bandwidth (in
          Mbps) of the connection.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the partner attachment.
        "naas_provider": "str",  # Optional. The Network as a Service (NaaS)
          provider for the partner attachment.
        "name": "str",  # Optional. The name of the partner attachment. Must
          be unique and may only contain alphanumeric characters, dashes, and periods.
        "parent_uuid": "str",  # Optional. Associated partner attachment
          UUID.
        "region": "str",  # Optional. The region where the partner attachment
          is located.
        "state": "str",  # Optional. The current operational state of the
          attachment.
        "vpc_ids": [
            "str"  # Optional. An array of VPC network IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_bgp_auth_key(pa_id: str, **kwargs: Any) MutableMapping[str, Any]

Get current BGP auth key for the partner attachment.

To get the current BGP auth key for a partner attachment, send a GET request to /v2/partner_network_connect/attachments/{pa_id}/bgp_auth_key.

Parameters:

pa_id (str) – A unique identifier for a partner attachment. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "bgp_auth_key": {}  # Optional. Any object.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_service_key(pa_id: str, **kwargs: Any) MutableMapping[str, Any]

Get the current service key for the partner attachment.

To get the current service key for a partner attachment, send a GET request to /v2/partner_network_connect/attachments/{pa_id}/service_key.

Parameters:

pa_id (str) – A unique identifier for a partner attachment. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "service_key": {}  # Optional. Any object.
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List all partner attachments.

To list all of the Partner Attachments on your account, send a GET request to /v2/partner_network_connect/attachments.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "partner_attachments": [
        {
            "bgp": {
                "local_asn": 0,  # Optional. ASN of the local router.
                "local_router_ip": "str",  # Optional. IP of the
                  DigitalOcean router.
                "peer_asn": 0,  # Optional. ASN of the peer router.
                "peer_router_ip": "str"  # Optional. IP of the peer
                  router.
            },
            "children": [
                "str"  # Optional. An array of associated partner
                  attachment UUIDs.
            ],
            "connection_bandwidth_in_mbps": 0,  # Optional. The bandwidth
              (in Mbps) of the connection.
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the partner attachment.
            "naas_provider": "str",  # Optional. The Network as a Service
              (NaaS) provider for the partner attachment.
            "name": "str",  # Optional. The name of the partner
              attachment. Must be unique and may only contain alphanumeric characters,
              dashes, and periods.
            "parent_uuid": "str",  # Optional. Associated partner
              attachment UUID.
            "region": "str",  # Optional. The region where the partner
              attachment is located.
            "state": "str",  # Optional. The current operational state of
              the attachment.
            "vpc_ids": [
                "str"  # Optional. An array of VPC network IDs.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_remote_routes(pa_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List remote routes for a partner attachment.

To list all remote routes associated with a partner attachment, send a GET request to /v2/partner_network_connect/attachments/{pa_id}/remote_routes.

Parameters:
  • pa_id (str) – A unique identifier for a partner attachment. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "remote_routes": [
        {
            "cidr": "str"  # Optional. A CIDR block representing a remote
              route.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch(pa_id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(pa_id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an existing partner attachment.

To update an existing partner attachment, send a PATCH request to /v2/partner_network_connect/attachments/{pa_id} with a JSON object containing the fields to be updated.

Parameters:
  • pa_id (str) – A unique identifier for a partner attachment. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 202
response == {
    "partner_attachment": {
        "bgp": {
            "local_asn": 0,  # Optional. ASN of the local router.
            "local_router_ip": "str",  # Optional. IP of the DigitalOcean
              router.
            "peer_asn": 0,  # Optional. ASN of the peer router.
            "peer_router_ip": "str"  # Optional. IP of the peer router.
        },
        "children": [
            "str"  # Optional. An array of associated partner attachment
              UUIDs.
        ],
        "connection_bandwidth_in_mbps": 0,  # Optional. The bandwidth (in
          Mbps) of the connection.
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the partner attachment.
        "naas_provider": "str",  # Optional. The Network as a Service (NaaS)
          provider for the partner attachment.
        "name": "str",  # Optional. The name of the partner attachment. Must
          be unique and may only contain alphanumeric characters, dashes, and periods.
        "parent_uuid": "str",  # Optional. Associated partner attachment
          UUID.
        "region": "str",  # Optional. The region where the partner attachment
          is located.
        "state": "str",  # Optional. The current operational state of the
          attachment.
        "vpc_ids": [
            "str"  # Optional. An array of VPC network IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ProjectsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s projects attribute.

assign_resources(project_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
assign_resources(project_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Assign Resources to a Project.

To assign resources to a project, send a POST request to /v2/projects/$PROJECT_ID/resources.

You must have both project:update and <resource>:read scopes to assign new resources. For example, to assign a Droplet to a project, include both the project:update and droplet:read scopes.

Parameters:
  • project_id (str) – A unique identifier for a project. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "resources": [
        "str"  # Optional. A list of uniform resource names (URNs) to be
          added to a project. Only resources that you are authorized to see will be
          returned.
    ]
}

# response body for status code(s): 200
response == {
    "resources": [
        {
            "assigned_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the project was created.
            "links": {
                "self": "str"  # Optional. A URI that can be used to
                  retrieve the resource.
            },
            "status": "str",  # Optional. The status of assigning and
              fetching the resources. Known values are: "ok", "not_found", "assigned",
              "already_assigned", and "service_down".
            "urn": "str"  # Optional. The uniform resource name (URN) for
              the resource in the format do:resource_type:resource_id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
assign_resources_default(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
assign_resources_default(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Assign Resources to Default Project.

To assign resources to your default project, send a POST request to /v2/projects/default/resources.

You must have both project:update and <resource>:read scopes to assign new resources. For example, to assign a Droplet to the default project, include both the project:update and droplet:read scopes.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "resources": [
        "str"  # Optional. A list of uniform resource names (URNs) to be
          added to a project. Only resources that you are authorized to see will be
          returned.
    ]
}

# response body for status code(s): 200
response == {
    "resources": [
        {
            "assigned_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the project was created.
            "links": {
                "self": "str"  # Optional. A URI that can be used to
                  retrieve the resource.
            },
            "status": "str",  # Optional. The status of assigning and
              fetching the resources. Known values are: "ok", "not_found", "assigned",
              "already_assigned", and "service_down".
            "urn": "str"  # Optional. The uniform resource name (URN) for
              the resource in the format do:resource_type:resource_id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Project.

To create a project, send a POST request to /v2/projects.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      created.
    "description": "str",  # Optional. The description of the project. The
      maximum length is 255 characters.
    "environment": "str",  # Optional. The environment of the project's
      resources. Known values are: "Development", "Staging", and "Production".
    "id": "str",  # Optional. The unique universal identifier of this project.
    "name": "str",  # Optional. The human-readable name for the project. The
      maximum length is 175 characters and the name must be unique.
    "owner_id": 0,  # Optional. The integer id of the project owner.
    "owner_uuid": "str",  # Optional. The unique universal identifier of the
      project owner.
    "purpose": "str",  # Optional. The purpose of the project. The maximum length
      is 255 characters. It can have one of the following values:   * Just trying out
      DigitalOcean * Class project / Educational purposes * Website or blog * Web
      Application * Service or API * Mobile Application * Machine learning / AI / Data
      processing * IoT * Operational / Developer tooling  If another value for purpose
      is specified, for example, "your custom purpose", your purpose will be stored as
      ``Other: your custom purpose``.
    "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      updated.
}

# response body for status code(s): 201
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
delete(project_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an Existing Project.

To delete a project, send a DELETE request to /v2/projects/$PROJECT_ID. To be deleted, a project must not have any resources assigned to it. Any existing resources must first be reassigned or destroyed, or you will receive a 412 error.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

project_id (str) – A unique identifier for a project. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404, 412
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(project_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Project.

To get a project, send a GET request to /v2/projects/$PROJECT_ID.

Parameters:

project_id (str) – A unique identifier for a project. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_default(**kwargs: Any) MutableMapping[str, Any]

Retrieve the Default Project.

To get your default project, send a GET request to /v2/projects/default.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Projects.

To list all your projects, send a GET request to /v2/projects.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "projects": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the project was created.
            "description": "str",  # Optional. The description of the
              project. The maximum length is 255 characters.
            "environment": "str",  # Optional. The environment of the
              project's resources. Known values are: "Development", "Staging", and
              "Production".
            "id": "str",  # Optional. The unique universal identifier of
              this project.
            "is_default": bool,  # Optional. If true, all resources will
              be added to this project if no project is specified.
            "name": "str",  # Optional. The human-readable name for the
              project. The maximum length is 175 characters and the name must be
              unique.
            "owner_id": 0,  # Optional. The integer id of the project
              owner.
            "owner_uuid": "str",  # Optional. The unique universal
              identifier of the project owner.
            "purpose": "str",  # Optional. The purpose of the project.
              The maximum length is 255 characters. It can have one of the following
              values:   * Just trying out DigitalOcean * Class project / Educational
              purposes * Website or blog * Web Application * Service or API * Mobile
              Application * Machine learning / AI / Data processing * IoT * Operational
              / Developer tooling  If another value for purpose is specified, for
              example, "your custom purpose", your purpose will be stored as ``Other:
              your custom purpose``.
            "updated_at": "2020-02-20 00:00:00"  # Optional. A time value
              given in ISO8601 combined date and time format that represents when the
              project was updated.
        }
    ]
}
list_resources(project_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Project Resources.

To list all your resources in a project, send a GET request to /v2/projects/$PROJECT_ID/resources.

This endpoint will only return resources that you are authorized to see. For example, to see Droplets in a project, include the droplet:read scope.

Parameters:
  • project_id (str) – A unique identifier for a project. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "resources": [
        {
            "assigned_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the project was created.
            "links": {
                "self": "str"  # Optional. A URI that can be used to
                  retrieve the resource.
            },
            "status": "str",  # Optional. The status of assigning and
              fetching the resources. Known values are: "ok", "not_found", "assigned",
              "already_assigned", and "service_down".
            "urn": "str"  # Optional. The uniform resource name (URN) for
              the resource in the format do:resource_type:resource_id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_resources_default(**kwargs: Any) MutableMapping[str, Any]

List Default Project Resources.

To list all your resources in your default project, send a GET request to /v2/projects/default/resources.

Only resources that you are authorized to see will be returned. For example, to see Droplets in a project, include the droplet:read scope.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "resources": [
        {
            "assigned_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the project was created.
            "links": {
                "self": "str"  # Optional. A URI that can be used to
                  retrieve the resource.
            },
            "status": "str",  # Optional. The status of assigning and
              fetching the resources. Known values are: "ok", "not_found", "assigned",
              "already_assigned", and "service_down".
            "urn": "str"  # Optional. The uniform resource name (URN) for
              the resource in the format do:resource_type:resource_id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch(project_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(project_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Patch a Project.

To update only specific attributes of a project, send a PATCH request to /v2/projects/$PROJECT_ID. At least one of the following attributes needs to be sent.

Parameters:
  • project_id (str) – A unique identifier for a project. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      created.
    "description": "str",  # Optional. The description of the project. The
      maximum length is 255 characters.
    "environment": "str",  # Optional. The environment of the project's
      resources. Known values are: "Development", "Staging", and "Production".
    "id": "str",  # Optional. The unique universal identifier of this project.
    "is_default": bool,  # Optional. If true, all resources will be added to this
      project if no project is specified.
    "name": "str",  # Optional. The human-readable name for the project. The
      maximum length is 175 characters and the name must be unique.
    "owner_id": 0,  # Optional. The integer id of the project owner.
    "owner_uuid": "str",  # Optional. The unique universal identifier of the
      project owner.
    "purpose": "str",  # Optional. The purpose of the project. The maximum length
      is 255 characters. It can have one of the following values:   * Just trying out
      DigitalOcean * Class project / Educational purposes * Website or blog * Web
      Application * Service or API * Mobile Application * Machine learning / AI / Data
      processing * IoT * Operational / Developer tooling  If another value for purpose
      is specified, for example, "your custom purpose", your purpose will be stored as
      ``Other: your custom purpose``.
    "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      updated.
}

# response body for status code(s): 200
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch_default(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch_default(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Patch the Default Project.

To update only specific attributes of your default project, send a PATCH request to /v2/projects/default. At least one of the following attributes needs to be sent.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      created.
    "description": "str",  # Optional. The description of the project. The
      maximum length is 255 characters.
    "environment": "str",  # Optional. The environment of the project's
      resources. Known values are: "Development", "Staging", and "Production".
    "id": "str",  # Optional. The unique universal identifier of this project.
    "is_default": bool,  # Optional. If true, all resources will be added to this
      project if no project is specified.
    "name": "str",  # Optional. The human-readable name for the project. The
      maximum length is 175 characters and the name must be unique.
    "owner_id": 0,  # Optional. The integer id of the project owner.
    "owner_uuid": "str",  # Optional. The unique universal identifier of the
      project owner.
    "purpose": "str",  # Optional. The purpose of the project. The maximum length
      is 255 characters. It can have one of the following values:   * Just trying out
      DigitalOcean * Class project / Educational purposes * Website or blog * Web
      Application * Service or API * Mobile Application * Machine learning / AI / Data
      processing * IoT * Operational / Developer tooling  If another value for purpose
      is specified, for example, "your custom purpose", your purpose will be stored as
      ``Other: your custom purpose``.
    "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      updated.
}

# response body for status code(s): 200
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(project_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(project_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Project.

To update a project, send a PUT request to /v2/projects/$PROJECT_ID. All of the following attributes must be sent.

Parameters:
  • project_id (str) – A unique identifier for a project. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      created.
    "description": "str",  # Optional. The description of the project. The
      maximum length is 255 characters.
    "environment": "str",  # Optional. The environment of the project's
      resources. Known values are: "Development", "Staging", and "Production".
    "id": "str",  # Optional. The unique universal identifier of this project.
    "is_default": bool,  # Optional. If true, all resources will be added to this
      project if no project is specified.
    "name": "str",  # Optional. The human-readable name for the project. The
      maximum length is 175 characters and the name must be unique.
    "owner_id": 0,  # Optional. The integer id of the project owner.
    "owner_uuid": "str",  # Optional. The unique universal identifier of the
      project owner.
    "purpose": "str",  # Optional. The purpose of the project. The maximum length
      is 255 characters. It can have one of the following values:   * Just trying out
      DigitalOcean * Class project / Educational purposes * Website or blog * Web
      Application * Service or API * Mobile Application * Machine learning / AI / Data
      processing * IoT * Operational / Developer tooling  If another value for purpose
      is specified, for example, "your custom purpose", your purpose will be stored as
      ``Other: your custom purpose``.
    "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      updated.
}

# response body for status code(s): 200
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_default(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_default(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update the Default Project.

To update you default project, send a PUT request to /v2/projects/default. All of the following attributes must be sent.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "created_at": "2020-02-20 00:00:00",  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      created.
    "description": "str",  # Optional. The description of the project. The
      maximum length is 255 characters.
    "environment": "str",  # Optional. The environment of the project's
      resources. Known values are: "Development", "Staging", and "Production".
    "id": "str",  # Optional. The unique universal identifier of this project.
    "is_default": bool,  # Optional. If true, all resources will be added to this
      project if no project is specified.
    "name": "str",  # Optional. The human-readable name for the project. The
      maximum length is 175 characters and the name must be unique.
    "owner_id": 0,  # Optional. The integer id of the project owner.
    "owner_uuid": "str",  # Optional. The unique universal identifier of the
      project owner.
    "purpose": "str",  # Optional. The purpose of the project. The maximum length
      is 255 characters. It can have one of the following values:   * Just trying out
      DigitalOcean * Class project / Educational purposes * Website or blog * Web
      Application * Service or API * Mobile Application * Machine learning / AI / Data
      processing * IoT * Operational / Developer tooling  If another value for purpose
      is specified, for example, "your custom purpose", your purpose will be stored as
      ``Other: your custom purpose``.
    "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given in
      ISO8601 combined date and time format that represents when the project was
      updated.
}

# response body for status code(s): 200
response == {
    "project": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          created.
        "description": "str",  # Optional. The description of the project.
          The maximum length is 255 characters.
        "environment": "str",  # Optional. The environment of the project's
          resources. Known values are: "Development", "Staging", and "Production".
        "id": "str",  # Optional. The unique universal identifier of this
          project.
        "is_default": bool,  # Optional. If true, all resources will be added
          to this project if no project is specified.
        "name": "str",  # Optional. The human-readable name for the project.
          The maximum length is 175 characters and the name must be unique.
        "owner_id": 0,  # Optional. The integer id of the project owner.
        "owner_uuid": "str",  # Optional. The unique universal identifier of
          the project owner.
        "purpose": "str",  # Optional. The purpose of the project. The
          maximum length is 255 characters. It can have one of the following values:
          * Just trying out DigitalOcean * Class project / Educational purposes *
          Website or blog * Web Application * Service or API * Mobile Application *
          Machine learning / AI / Data processing * IoT * Operational / Developer
          tooling  If another value for purpose is specified, for example, "your custom
          purpose", your purpose will be stored as ``Other: your custom purpose``.
        "updated_at": "2020-02-20 00:00:00"  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the project was
          updated.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.RegionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s regions attribute.

list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Data Center Regions.

To list all of the regions that are available, send a GET request to /v2/regions. The response will be a JSON object with a key called regions. The value of this will be an array of region objects, each of which will contain the standard region attributes.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "regions": [
        {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        }
    ],
    "links": {
        "pages": {}
    }
}
class pydo.operations.RegistriesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s registries attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Container Registry.

To create your container registry, send a POST request to /v2/registries.

The name becomes part of the URL for images stored in the registry. For example, if your registry is called example, an image in it will have the URL registry.digitalocean.com/example/image:tag.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # A globally unique name for the container registry. Must be
      lowercase and be composed only of numbers, letters and ``-``"" , up to a limit of
      63 characters. Required.
    "region": "str",  # Optional. Slug of the region where registry data is
      stored. When not provided, a region will be selected. Known values are: "nyc3",
      "sfo3", "sfo2", "ams3", "sgp1", "fra1", "blr1", and "syd1".
    "subscription_tier_slug": "str"  # Optional. The slug of the subscription
      tier to sign up for. Valid values can be retrieved using the options endpoint.
      Known values are: "starter", "basic", and "professional".
}

# response body for status code(s): 201
response == {
    "registry": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the registry
          was created.
        "name": "str",  # Optional. A globally unique name for the container
          registry. Must be lowercase and be composed only of numbers, letters and
          ``-``"" , up to a limit of 63 characters.
        "region": "str",  # Optional. Slug of the region where registry data
          is stored.
        "storage_usage_bytes": 0,  # Optional. The amount of storage used in
          the registry in bytes.
        "storage_usage_bytes_updated_at": "2020-02-20 00:00:00"  # Optional.
          The time at which the storage usage was updated. Storage usage is calculated
          asynchronously, and may not immediately reflect pushes to the registry.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(registry_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry By Name.

To delete your container registry, destroying all container image data stored in it, send a DELETE request to /v2/registries/{registry_name}.

Parameters:

registry_name (str) – The name of a container registry. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_repository(registry_name: str, repository_name: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry Repository.

To delete a container repository including all of its tags, send a DELETE request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_repository_manifest(registry_name: str, repository_name: str, manifest_digest: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry Repository Manifest.

To delete a container repository manifest by digest in one of your registries, send a DELETE request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to delete registry.digitalocean.com/example/my/repo@sha256:abcd, the path would be /v2/registry/example/repositories/my%2Frepo/digests/sha256:abcd.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

It is similar to DELETE /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • manifest_digest (str) – The manifest digest of a container registry repository tag. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_repository_tag(registry_name: str, repository_name: str, repository_tag: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry Repository Tag.

To delete a container repository tag in on of our container registries, send a DELETE request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to delete registry.digitalocean.com/example/my/repo:mytag, the path would be /v2/registry/example/repositories/my%2Frepo/tags/mytag.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. It is similar to DELETE /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • repository_tag (str) – The name of a container registry repository tag. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(registry_name: str, **kwargs: Any) MutableMapping[str, Any]

Get a Container Registry By Name.

To get information about any container registry in your account, send a GET request to /v2/registries/{registry_name}.

Parameters:

registry_name (str) – The name of a container registry. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "registry": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the registry
          was created.
        "name": "str",  # Optional. A globally unique name for the container
          registry. Must be lowercase and be composed only of numbers, letters and
          ``-``"" , up to a limit of 63 characters.
        "region": "str",  # Optional. Slug of the region where registry data
          is stored.
        "storage_usage_bytes": 0,  # Optional. The amount of storage used in
          the registry in bytes.
        "storage_usage_bytes_updated_at": "2020-02-20 00:00:00"  # Optional.
          The time at which the storage usage was updated. Storage usage is calculated
          asynchronously, and may not immediately reflect pushes to the registry.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_docker_credentials(registry_name: str, **kwargs: Any) MutableMapping[str, Any]

Get Docker Credentials By Registry Name.

In order to access your container registry with the Docker client or from a Kubernetes cluster, you will need to configure authentication. The necessary JSON configuration can be retrieved by sending a GET request to /v2/registries/{registry_name}/docker-credentials.

The response will be in the format of a Docker config.json file. To use the config in your Kubernetes cluster, create a Secret with:

kubectl create secret generic docr \
  --from-file=.dockerconfigjson=config.json \
  --type=kubernetes.io/dockerconfigjson

By default, the returned credentials have read-only access to your registry and cannot be used to push images. This is appropriate for most Kubernetes clusters. To retrieve read/write credentials, suitable for use with the Docker client or in a CI system, read_write may be provided as query parameter. For example: /v2/registries/{registry_name}/docker-credentials?read_write=true

By default, the returned credentials will not expire. To retrieve credentials with an expiry set, expiry_seconds may be provided as a query parameter. For example: /v2/registries/{registry_name}/docker-credentials?expiry_seconds=3600 will return credentials that expire after one hour.

Parameters:

registry_name (str) – The name of a container registry. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "auths": {
        "registry.digitalocean.com": {
            "auth": "str"  # Optional. A base64 encoded string containing
              credentials for the container registry.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_garbage_collection(registry_name: str, **kwargs: Any) MutableMapping[str, Any]

Get Active Garbage Collection.

To get information about the currently-active garbage collection for a registry, send a GET request to /v2/registry/$REGISTRY_NAME/garbage-collection.

Parameters:

registry_name (str) – The name of a container registry. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "garbage_collection": {
        "blobs_deleted": 0,  # Optional. The number of blobs deleted as a
          result of this garbage collection.
        "created_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was created.
        "freed_bytes": 0,  # Optional. The number of bytes freed as a result
          of this garbage collection.
        "registry_name": "str",  # Optional. The name of the container
          registry.
        "status": "str",  # Optional. The current status of this garbage
          collection. Known values are: "requested", "waiting for write JWTs to
          expire", "scanning manifests", "deleting unreferenced blobs", "cancelling",
          "failed", "succeeded", and "cancelled".
        "updated_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was last updated.
        "uuid": "str"  # Optional. A string specifying the UUID of the
          garbage collection.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_options(**kwargs: Any) MutableMapping[str, Any]

List Registry Options (Subscription Tiers and Available Regions).

This endpoint serves to provide additional information as to which option values are available when creating a container registry. There are multiple subscription tiers available for container registry. Each tier allows a different number of image repositories to be created in your registry, and has a different amount of storage and transfer included. There are multiple regions available for container registry and controls where your data is stored. To list the available options, send a GET request to /v2/registries/options. This is similar to GET /v2/registry/options.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "options": {
        "available_regions": [
            "str"  # Optional.
        ],
        "subscription_tiers": [
            {
                "allow_storage_overage": bool,  # Optional. A boolean
                  indicating whether the subscription tier supports additional storage
                  above what is included in the base plan at an additional cost per GiB
                  used.
                "eligibility_reasons": [
                    "str"  # Optional. If your account is not
                      eligible to use a certain subscription tier, this will include a
                      list of reasons that prevent you from using the tier.
                ],
                "eligible": bool,  # Optional. A boolean indicating
                  whether your account it eligible to use a certain subscription tier.
                "included_bandwidth_bytes": 0,  # Optional. The
                  amount of outbound data transfer included in the subscription tier in
                  bytes.
                "included_repositories": 0,  # Optional. The number
                  of repositories included in the subscription tier. ``0`` indicates
                  that the subscription tier includes unlimited repositories.
                "included_storage_bytes": 0,  # Optional. The amount
                  of storage included in the subscription tier in bytes.
                "monthly_price_in_cents": 0,  # Optional. The monthly
                  cost of the subscription tier in cents.
                "name": "str",  # Optional. The name of the
                  subscription tier.
                "slug": "str",  # Optional. The slug identifier of
                  the subscription tier.
                "storage_overage_price_in_cents": 0  # Optional. The
                  price paid in cents per GiB for additional storage beyond what is
                  included in the subscription plan.
            }
        ]
    }
}
get_subscription(**kwargs: Any) MutableMapping[str, Any]

Get Subscription Information.

A subscription is automatically created when you configure your container registry. To get information about your subscription, send a GET request to /v2/registries/subscription. It is similar to GET /v2/registry/subscription.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "subscription": {
        "created_at": "2020-02-20 00:00:00",  # Optional. The time at which
          the subscription was created.
        "tier": {
            "allow_storage_overage": bool,  # Optional. A boolean
              indicating whether the subscription tier supports additional storage
              above what is included in the base plan at an additional cost per GiB
              used.
            "included_bandwidth_bytes": 0,  # Optional. The amount of
              outbound data transfer included in the subscription tier in bytes.
            "included_repositories": 0,  # Optional. The number of
              repositories included in the subscription tier. ``0`` indicates that the
              subscription tier includes unlimited repositories.
            "included_storage_bytes": 0,  # Optional. The amount of
              storage included in the subscription tier in bytes.
            "monthly_price_in_cents": 0,  # Optional. The monthly cost of
              the subscription tier in cents.
            "name": "str",  # Optional. The name of the subscription
              tier.
            "slug": "str",  # Optional. The slug identifier of the
              subscription tier.
            "storage_overage_price_in_cents": 0  # Optional. The price
              paid in cents per GiB for additional storage beyond what is included in
              the subscription plan.
        },
        "updated_at": "2020-02-20 00:00:00"  # Optional. The time at which
          the subscription was last updated.
    }
}
list(**kwargs: Any) MutableMapping[str, Any]

List All Container Registries.

To get information about any container registry in your account, send a GET request to /v2/registries/.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "registries": [
        {}
    ]
}
list_garbage_collections(registry_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Garbage Collections.

To get information about past garbage collections for a registry, send a GET request to /v2/registry/$REGISTRY_NAME/garbage-collections.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "garbage_collections": [
        {
            "blobs_deleted": 0,  # Optional. The number of blobs deleted
              as a result of this garbage collection.
            "created_at": "2020-02-20 00:00:00",  # Optional. The time
              the garbage collection was created.
            "freed_bytes": 0,  # Optional. The number of bytes freed as a
              result of this garbage collection.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "status": "str",  # Optional. The current status of this
              garbage collection. Known values are: "requested", "waiting for write
              JWTs to expire", "scanning manifests", "deleting unreferenced blobs",
              "cancelling", "failed", "succeeded", and "cancelled".
            "updated_at": "2020-02-20 00:00:00",  # Optional. The time
              the garbage collection was last updated.
            "uuid": "str"  # Optional. A string specifying the UUID of
              the garbage collection.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repositories_v2(registry_name: str, *, per_page: int = 20, page: int = 1, page_token: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repositories (V2).

To list all repositories in your container registry, send a GET request to /v2/registries/$REGISTRY_NAME/repositoriesV2. It is similar to GET /v2/registry/$REGISTRY_NAME/repositoriesV2.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Ignored when ‘page_token’ is provided. Default value is 1.

  • page_token (str) – Token to retrieve of the next or previous set of results more quickly than using ‘page’. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "repositories": [
        {
            "latest_manifest": {
                "blobs": [
                    {
                        "compressed_size_bytes": 0,  #
                          Optional. The compressed size of the blob in bytes.
                        "digest": "str"  # Optional. The
                          digest of the blob.
                    }
                ],
                "compressed_size_bytes": 0,  # Optional. The
                  compressed size of the manifest in bytes.
                "digest": "str",  # Optional. The manifest digest.
                "registry_name": "str",  # Optional. The name of the
                  container registry.
                "repository": "str",  # Optional. The name of the
                  repository.
                "size_bytes": 0,  # Optional. The uncompressed size
                  of the manifest in bytes (this size is calculated asynchronously so
                  it may not be immediately available).
                "tags": [
                    "str"  # Optional. All tags associated with
                      this manifest.
                ],
                "updated_at": "2020-02-20 00:00:00"  # Optional. The
                  time the manifest was last updated.
            },
            "manifest_count": 0,  # Optional. The number of manifests in
              the repository.
            "name": "str",  # Optional. The name of the repository.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "tag_count": 0  # Optional. The number of tags in the
              repository.
        }
    ]
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repository_manifests(registry_name: str, repository_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repository Manifests.

To list all manifests in your container registry repository, send a GET request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to list manifests for registry.digitalocean.com/example/my/repo, the path would be /v2/registry/example/repositories/my%2Frepo/digests.

It is similar to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "manifests": [
        {
            "blobs": [
                {
                    "compressed_size_bytes": 0,  # Optional. The
                      compressed size of the blob in bytes.
                    "digest": "str"  # Optional. The digest of
                      the blob.
                }
            ],
            "compressed_size_bytes": 0,  # Optional. The compressed size
              of the manifest in bytes.
            "digest": "str",  # Optional. The manifest digest.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "repository": "str",  # Optional. The name of the repository.
            "size_bytes": 0,  # Optional. The uncompressed size of the
              manifest in bytes (this size is calculated asynchronously so it may not
              be immediately available).
            "tags": [
                "str"  # Optional. All tags associated with this
                  manifest.
            ],
            "updated_at": "2020-02-20 00:00:00"  # Optional. The time the
              manifest was last updated.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repository_tags(registry_name: str, repository_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repository Tags.

To list all tags in one of your container registry’s repository, send a GET request to /v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to list tags for registry.digitalocean.com/example/my/repo, the path would be /v2/registry/example/repositories/my%2Frepo/tags.

It is similar to GET /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "tags": [
        {
            "compressed_size_bytes": 0,  # Optional. The compressed size
              of the tag in bytes.
            "manifest_digest": "str",  # Optional. The digest of the
              manifest associated with the tag.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "repository": "str",  # Optional. The name of the repository.
            "size_bytes": 0,  # Optional. The uncompressed size of the
              tag in bytes (this size is calculated asynchronously so it may not be
              immediately available).
            "tag": "str",  # Optional. The name of the tag.
            "updated_at": "2020-02-20 00:00:00"  # Optional. The time the
              tag was last updated.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
run_garbage_collection(registry_name: str, **kwargs: Any) MutableMapping[str, Any]

Start Garbage Collection.

Garbage collection enables users to clear out unreferenced blobs (layer & manifest data) after deleting one or more manifests from a repository. If there are no unreferenced blobs resulting from the deletion of one or more manifests, garbage collection is effectively a noop. See here for more information about how and why you should clean up your container registry periodically.

To request a garbage collection run on your registry, send a POST request to /v2/registries/$REGISTRY_NAME/garbage-collection. This will initiate the following sequence of events on your registry.

  • Set the registry to read-only mode, meaning no further write-scoped JWTs will be issued to registry clients. Existing write-scoped JWTs will continue to work until they expire which can take up to 15 minutes.

  • Wait until all existing write-scoped JWTs have expired.

  • Scan all registry manifests to determine which blobs are unreferenced.

  • Delete all unreferenced blobs from the registry.

  • Record the number of blobs deleted and bytes freed, mark the garbage collection status as success.

  • Remove the read-only mode restriction from the registry, meaning write-scoped JWTs will once again be issued to registry clients.

Parameters:

registry_name (str) – The name of a container registry. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 201
response == {
    "garbage_collection": {
        "blobs_deleted": 0,  # Optional. The number of blobs deleted as a
          result of this garbage collection.
        "created_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was created.
        "freed_bytes": 0,  # Optional. The number of bytes freed as a result
          of this garbage collection.
        "registry_name": "str",  # Optional. The name of the container
          registry.
        "status": "str",  # Optional. The current status of this garbage
          collection. Known values are: "requested", "waiting for write JWTs to
          expire", "scanning manifests", "deleting unreferenced blobs", "cancelling",
          "failed", "succeeded", and "cancelled".
        "updated_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was last updated.
        "uuid": "str"  # Optional. A string specifying the UUID of the
          garbage collection.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_garbage_collection(registry_name: str, garbage_collection_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_garbage_collection(registry_name: str, garbage_collection_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Garbage Collection.

To cancel the currently-active garbage collection for a registry, send a PUT request to /v2/registries/$REGISTRY_NAME/garbage-collection/$GC_UUID and specify one or more of the attributes below. It is similar to PUT /v2/registries/$REGISTRY_NAME/garbage-collection/$GC_UUID.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • garbage_collection_uuid (str) – The UUID of a garbage collection run. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "cancel": bool  # Optional. A boolean value indicating that the garbage
      collection should be cancelled.
}

# response body for status code(s): 200
response == {
    "garbage_collection": {
        "blobs_deleted": 0,  # Optional. The number of blobs deleted as a
          result of this garbage collection.
        "created_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was created.
        "freed_bytes": 0,  # Optional. The number of bytes freed as a result
          of this garbage collection.
        "registry_name": "str",  # Optional. The name of the container
          registry.
        "status": "str",  # Optional. The current status of this garbage
          collection. Known values are: "requested", "waiting for write JWTs to
          expire", "scanning manifests", "deleting unreferenced blobs", "cancelling",
          "failed", "succeeded", and "cancelled".
        "updated_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was last updated.
        "uuid": "str"  # Optional. A string specifying the UUID of the
          garbage collection.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_subscription(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_subscription(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Subscription Tier.

After creating your registry, you can switch to a different subscription tier to better suit your needs. To do this, send a POST request to /v2/registries/subscription. It is similar to POST /v2/registry/subscription.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "tier_slug": "str"  # Optional. The slug of the subscription tier to sign up
      for. Known values are: "starter", "basic", and "professional".
}

# response body for status code(s): 200
response == {
    "subscription": {
        "created_at": "2020-02-20 00:00:00",  # Optional. The time at which
          the subscription was created.
        "tier": {
            "allow_storage_overage": bool,  # Optional. A boolean
              indicating whether the subscription tier supports additional storage
              above what is included in the base plan at an additional cost per GiB
              used.
            "included_bandwidth_bytes": 0,  # Optional. The amount of
              outbound data transfer included in the subscription tier in bytes.
            "included_repositories": 0,  # Optional. The number of
              repositories included in the subscription tier. ``0`` indicates that the
              subscription tier includes unlimited repositories.
            "included_storage_bytes": 0,  # Optional. The amount of
              storage included in the subscription tier in bytes.
            "monthly_price_in_cents": 0,  # Optional. The monthly cost of
              the subscription tier in cents.
            "name": "str",  # Optional. The name of the subscription
              tier.
            "slug": "str",  # Optional. The slug identifier of the
              subscription tier.
            "storage_overage_price_in_cents": 0  # Optional. The price
              paid in cents per GiB for additional storage beyond what is included in
              the subscription plan.
        },
        "updated_at": "2020-02-20 00:00:00"  # Optional. The time at which
          the subscription was last updated.
    }
}
validate_name(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
validate_name(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Validate a Container Registry Name.

To validate that a container registry name is available for use, send a POST request to /v2/registries/validate-name.

If the name is both formatted correctly and available, the response code will be 204 and contain no body. If the name is already in use, the response will be a 409 Conflict.

It is similar to /v2/registry/validate-name.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # A globally unique name for the container registry. Must be
      lowercase and be composed only of numbers, letters and ``-``"" , up to a limit of
      63 characters. Required.
}

# response body for status code(s): 409
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.RegistryOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s registry attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Container Registry.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To create your container registry, send a POST request to /v2/registry.

The name becomes part of the URL for images stored in the registry. For example, if your registry is called example, an image in it will have the URL registry.digitalocean.com/example/image:tag.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # A globally unique name for the container registry. Must be
      lowercase and be composed only of numbers, letters and ``-``"" , up to a limit of
      63 characters. Required.
    "subscription_tier_slug": "str",  # The slug of the subscription tier to sign
      up for. Valid values can be retrieved using the options endpoint. Required. Known
      values are: "starter", "basic", and "professional".
    "region": "str"  # Optional. Slug of the region where registry data is
      stored. When not provided, a region will be selected. Known values are: "nyc3",
      "sfo3", "ams3", "sgp1", and "fra1".
}

# response body for status code(s): 201
response == {
    "registry": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the registry
          was created.
        "name": "str",  # Optional. A globally unique name for the container
          registry. Must be lowercase and be composed only of numbers, letters and
          ``-``"" , up to a limit of 63 characters.
        "region": "str",  # Optional. Slug of the region where registry data
          is stored.
        "storage_usage_bytes": 0,  # Optional. The amount of storage used in
          the registry in bytes.
        "storage_usage_bytes_updated_at": "2020-02-20 00:00:00",  # Optional.
          The time at which the storage usage was updated. Storage usage is calculated
          asynchronously, and may not immediately reflect pushes to the registry.
        "subscription": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The time at
              which the subscription was created.
            "tier": {
                "allow_storage_overage": bool,  # Optional. A boolean
                  indicating whether the subscription tier supports additional storage
                  above what is included in the base plan at an additional cost per GiB
                  used.
                "included_bandwidth_bytes": 0,  # Optional. The
                  amount of outbound data transfer included in the subscription tier in
                  bytes.
                "included_repositories": 0,  # Optional. The number
                  of repositories included in the subscription tier. ``0`` indicates
                  that the subscription tier includes unlimited repositories.
                "included_storage_bytes": 0,  # Optional. The amount
                  of storage included in the subscription tier in bytes.
                "monthly_price_in_cents": 0,  # Optional. The monthly
                  cost of the subscription tier in cents.
                "name": "str",  # Optional. The name of the
                  subscription tier.
                "slug": "str",  # Optional. The slug identifier of
                  the subscription tier.
                "storage_overage_price_in_cents": 0  # Optional. The
                  price paid in cents per GiB for additional storage beyond what is
                  included in the subscription plan.
            },
            "updated_at": "2020-02-20 00:00:00"  # Optional. The time at
              which the subscription was last updated.
        }
    }
}
delete(**kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To delete your container registry, destroying all container image data stored in it, send a DELETE request to /v2/registry.

This operation is not compatible with multiple registries in a DO account. You should use /v2/registries/{registry_name} instead.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404, 412
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_repository_manifest(registry_name: str, repository_name: str, manifest_digest: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry Repository Manifest.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To delete a container repository manifest by digest, send a DELETE request to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to delete registry.digitalocean.com/example/my/repo@sha256:abcd, the path would be /v2/registry/example/repositories/my%2Frepo/digests/sha256:abcd.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • manifest_digest (str) – The manifest digest of a container registry repository tag. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_repository_tag(registry_name: str, repository_name: str, repository_tag: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Container Registry Repository Tag.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To delete a container repository tag, send a DELETE request to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to delete registry.digitalocean.com/example/my/repo:mytag, the path would be /v2/registry/example/repositories/my%2Frepo/tags/mytag.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • repository_tag (str) – The name of a container registry repository tag. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(**kwargs: Any) MutableMapping[str, Any]

Get Container Registry Information.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To get information about your container registry, send a GET request to /v2/registry.

This operation is not compatible with multiple registries in a DO account. You should use /v2/registries/{registry_name} instead.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "registry": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the registry
          was created.
        "name": "str",  # Optional. A globally unique name for the container
          registry. Must be lowercase and be composed only of numbers, letters and
          ``-``"" , up to a limit of 63 characters.
        "region": "str",  # Optional. Slug of the region where registry data
          is stored.
        "storage_usage_bytes": 0,  # Optional. The amount of storage used in
          the registry in bytes.
        "storage_usage_bytes_updated_at": "2020-02-20 00:00:00",  # Optional.
          The time at which the storage usage was updated. Storage usage is calculated
          asynchronously, and may not immediately reflect pushes to the registry.
        "subscription": {
            "created_at": "2020-02-20 00:00:00",  # Optional. The time at
              which the subscription was created.
            "tier": {
                "allow_storage_overage": bool,  # Optional. A boolean
                  indicating whether the subscription tier supports additional storage
                  above what is included in the base plan at an additional cost per GiB
                  used.
                "included_bandwidth_bytes": 0,  # Optional. The
                  amount of outbound data transfer included in the subscription tier in
                  bytes.
                "included_repositories": 0,  # Optional. The number
                  of repositories included in the subscription tier. ``0`` indicates
                  that the subscription tier includes unlimited repositories.
                "included_storage_bytes": 0,  # Optional. The amount
                  of storage included in the subscription tier in bytes.
                "monthly_price_in_cents": 0,  # Optional. The monthly
                  cost of the subscription tier in cents.
                "name": "str",  # Optional. The name of the
                  subscription tier.
                "slug": "str",  # Optional. The slug identifier of
                  the subscription tier.
                "storage_overage_price_in_cents": 0  # Optional. The
                  price paid in cents per GiB for additional storage beyond what is
                  included in the subscription plan.
            },
            "updated_at": "2020-02-20 00:00:00"  # Optional. The time at
              which the subscription was last updated.
        }
    }
}
# response body for status code(s): 412
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_docker_credentials(*, expiry_seconds: int = 0, read_write: bool = False, **kwargs: Any) MutableMapping[str, Any]

Get Docker Credentials for Container Registry.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

In order to access your container registry with the Docker client or from a Kubernetes cluster, you will need to configure authentication. The necessary JSON configuration can be retrieved by sending a GET request to /v2/registry/docker-credentials.

The response will be in the format of a Docker config.json file. To use the config in your Kubernetes cluster, create a Secret with:

kubectl create secret generic docr \
  --from-file=.dockerconfigjson=config.json \
  --type=kubernetes.io/dockerconfigjson

By default, the returned credentials have read-only access to your registry and cannot be used to push images. This is appropriate for most Kubernetes clusters. To retrieve read/write credentials, suitable for use with the Docker client or in a CI system, read_write may be provided as query parameter. For example: /v2/registry/docker-credentials?read_write=true

By default, the returned credentials will not expire. To retrieve credentials with an expiry set, expiry_seconds may be provided as a query parameter. For example: /v2/registry/docker-credentials?expiry_seconds=3600 will return credentials that expire after one hour.

Parameters:
  • expiry_seconds (int) – The duration in seconds that the returned registry credentials will be valid. If not set or 0, the credentials will not expire. Default value is 0.

  • read_write (bool) – By default, the registry credentials allow for read-only access. Set this query parameter to true to obtain read-write credentials. Default value is False.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "auths": {
        "registry.digitalocean.com": {
            "auth": "str"  # Optional. A base64 encoded string containing
              credentials for the container registry.
        }
    }
}
get_garbage_collection(registry_name: str, **kwargs: Any) MutableMapping[str, Any]

Get Active Garbage Collection.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To get information about the currently-active garbage collection for a registry, send a GET request to /v2/registry/$REGISTRY_NAME/garbage-collection.

Parameters:

registry_name (str) – The name of a container registry. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "garbage_collection": {
        "blobs_deleted": 0,  # Optional. The number of blobs deleted as a
          result of this garbage collection.
        "created_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was created.
        "freed_bytes": 0,  # Optional. The number of bytes freed as a result
          of this garbage collection.
        "registry_name": "str",  # Optional. The name of the container
          registry.
        "status": "str",  # Optional. The current status of this garbage
          collection. Known values are: "requested", "waiting for write JWTs to
          expire", "scanning manifests", "deleting unreferenced blobs", "cancelling",
          "failed", "succeeded", and "cancelled".
        "updated_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was last updated.
        "uuid": "str"  # Optional. A string specifying the UUID of the
          garbage collection.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_options(**kwargs: Any) MutableMapping[str, Any]

List Registry Options (Subscription Tiers and Available Regions).

Note: This endpoint is deprecated and may be removed in a future version. There is no alternative.**Note: This endpoint is deprecated. Please use the /v2/registries endpoint instead.**

This endpoint serves to provide additional information as to which option values are available when creating a container registry.

There are multiple subscription tiers available for container registry. Each tier allows a different number of image repositories to be created in your registry, and has a different amount of storage and transfer included.

There are multiple regions available for container registry and controls where your data is stored.

To list the available options, send a GET request to /v2/registry/options.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "options": {
        "available_regions": [
            "str"  # Optional.
        ],
        "subscription_tiers": [
            {
                "allow_storage_overage": bool,  # Optional. A boolean
                  indicating whether the subscription tier supports additional storage
                  above what is included in the base plan at an additional cost per GiB
                  used.
                "eligibility_reasons": [
                    "str"  # Optional. If your account is not
                      eligible to use a certain subscription tier, this will include a
                      list of reasons that prevent you from using the tier.
                ],
                "eligible": bool,  # Optional. A boolean indicating
                  whether your account it eligible to use a certain subscription tier.
                "included_bandwidth_bytes": 0,  # Optional. The
                  amount of outbound data transfer included in the subscription tier in
                  bytes.
                "included_repositories": 0,  # Optional. The number
                  of repositories included in the subscription tier. ``0`` indicates
                  that the subscription tier includes unlimited repositories.
                "included_storage_bytes": 0,  # Optional. The amount
                  of storage included in the subscription tier in bytes.
                "monthly_price_in_cents": 0,  # Optional. The monthly
                  cost of the subscription tier in cents.
                "name": "str",  # Optional. The name of the
                  subscription tier.
                "slug": "str",  # Optional. The slug identifier of
                  the subscription tier.
                "storage_overage_price_in_cents": 0  # Optional. The
                  price paid in cents per GiB for additional storage beyond what is
                  included in the subscription plan.
            }
        ]
    }
}
get_subscription(**kwargs: Any) MutableMapping[str, Any]

Get Subscription.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

A subscription is automatically created when you configure your container registry. To get information about your subscription, send a GET request to /v2/registry/subscription.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "subscription": {
        "created_at": "2020-02-20 00:00:00",  # Optional. The time at which
          the subscription was created.
        "tier": {
            "allow_storage_overage": bool,  # Optional. A boolean
              indicating whether the subscription tier supports additional storage
              above what is included in the base plan at an additional cost per GiB
              used.
            "included_bandwidth_bytes": 0,  # Optional. The amount of
              outbound data transfer included in the subscription tier in bytes.
            "included_repositories": 0,  # Optional. The number of
              repositories included in the subscription tier. ``0`` indicates that the
              subscription tier includes unlimited repositories.
            "included_storage_bytes": 0,  # Optional. The amount of
              storage included in the subscription tier in bytes.
            "monthly_price_in_cents": 0,  # Optional. The monthly cost of
              the subscription tier in cents.
            "name": "str",  # Optional. The name of the subscription
              tier.
            "slug": "str",  # Optional. The slug identifier of the
              subscription tier.
            "storage_overage_price_in_cents": 0  # Optional. The price
              paid in cents per GiB for additional storage beyond what is included in
              the subscription plan.
        },
        "updated_at": "2020-02-20 00:00:00"  # Optional. The time at which
          the subscription was last updated.
    }
}
list_garbage_collections(registry_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Garbage Collections.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To get information about past garbage collections for a registry, send a GET request to /v2/registry/$REGISTRY_NAME/garbage-collections.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "garbage_collections": [
        {
            "blobs_deleted": 0,  # Optional. The number of blobs deleted
              as a result of this garbage collection.
            "created_at": "2020-02-20 00:00:00",  # Optional. The time
              the garbage collection was created.
            "freed_bytes": 0,  # Optional. The number of bytes freed as a
              result of this garbage collection.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "status": "str",  # Optional. The current status of this
              garbage collection. Known values are: "requested", "waiting for write
              JWTs to expire", "scanning manifests", "deleting unreferenced blobs",
              "cancelling", "failed", "succeeded", and "cancelled".
            "updated_at": "2020-02-20 00:00:00",  # Optional. The time
              the garbage collection was last updated.
            "uuid": "str"  # Optional. A string specifying the UUID of
              the garbage collection.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repositories(registry_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repositories.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

This endpoint has been deprecated in favor of the List All Container Registry Repositories [V2] endpoint.

To list all repositories in your container registry, send a GET request to /v2/registry/$REGISTRY_NAME/repositories.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "repositories": [
        {
            "latest_tag": {
                "compressed_size_bytes": 0,  # Optional. The
                  compressed size of the tag in bytes.
                "manifest_digest": "str",  # Optional. The digest of
                  the manifest associated with the tag.
                "registry_name": "str",  # Optional. The name of the
                  container registry.
                "repository": "str",  # Optional. The name of the
                  repository.
                "size_bytes": 0,  # Optional. The uncompressed size
                  of the tag in bytes (this size is calculated asynchronously so it may
                  not be immediately available).
                "tag": "str",  # Optional. The name of the tag.
                "updated_at": "2020-02-20 00:00:00"  # Optional. The
                  time the tag was last updated.
            },
            "name": "str",  # Optional. The name of the repository.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "tag_count": 0  # Optional. The number of tags in the
              repository.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repositories_v2(registry_name: str, *, per_page: int = 20, page: int = 1, page_token: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repositories (V2).

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To list all repositories in your container registry, send a GET request to /v2/registry/$REGISTRY_NAME/repositoriesV2.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Ignored when ‘page_token’ is provided. Default value is 1.

  • page_token (str) – Token to retrieve of the next or previous set of results more quickly than using ‘page’. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "repositories": [
        {
            "latest_manifest": {
                "blobs": [
                    {
                        "compressed_size_bytes": 0,  #
                          Optional. The compressed size of the blob in bytes.
                        "digest": "str"  # Optional. The
                          digest of the blob.
                    }
                ],
                "compressed_size_bytes": 0,  # Optional. The
                  compressed size of the manifest in bytes.
                "digest": "str",  # Optional. The manifest digest.
                "registry_name": "str",  # Optional. The name of the
                  container registry.
                "repository": "str",  # Optional. The name of the
                  repository.
                "size_bytes": 0,  # Optional. The uncompressed size
                  of the manifest in bytes (this size is calculated asynchronously so
                  it may not be immediately available).
                "tags": [
                    "str"  # Optional. All tags associated with
                      this manifest.
                ],
                "updated_at": "2020-02-20 00:00:00"  # Optional. The
                  time the manifest was last updated.
            },
            "manifest_count": 0,  # Optional. The number of manifests in
              the repository.
            "name": "str",  # Optional. The name of the repository.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "tag_count": 0  # Optional. The number of tags in the
              repository.
        }
    ]
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repository_manifests(registry_name: str, repository_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repository Manifests.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To list all manifests in your container registry repository, send a GET request to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to list manifests for registry.digitalocean.com/example/my/repo, the path would be /v2/registry/example/repositories/my%2Frepo/digests.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "manifests": [
        {
            "blobs": [
                {
                    "compressed_size_bytes": 0,  # Optional. The
                      compressed size of the blob in bytes.
                    "digest": "str"  # Optional. The digest of
                      the blob.
                }
            ],
            "compressed_size_bytes": 0,  # Optional. The compressed size
              of the manifest in bytes.
            "digest": "str",  # Optional. The manifest digest.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "repository": "str",  # Optional. The name of the repository.
            "size_bytes": 0,  # Optional. The uncompressed size of the
              manifest in bytes (this size is calculated asynchronously so it may not
              be immediately available).
            "tags": [
                "str"  # Optional. All tags associated with this
                  manifest.
            ],
            "updated_at": "2020-02-20 00:00:00"  # Optional. The time the
              manifest was last updated.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_repository_tags(registry_name: str, repository_name: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Container Registry Repository Tags.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To list all tags in your container registry repository, send a GET request to /v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags.

Note that if your repository name contains / characters, it must be URL-encoded in the request URL. For example, to list tags for registry.digitalocean.com/example/my/repo, the path would be /v2/registry/example/repositories/my%2Frepo/tags.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • repository_name (str) – The name of a container registry repository. If the name contains / characters, they must be URL-encoded, e.g. %2F. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "tags": [
        {
            "compressed_size_bytes": 0,  # Optional. The compressed size
              of the tag in bytes.
            "manifest_digest": "str",  # Optional. The digest of the
              manifest associated with the tag.
            "registry_name": "str",  # Optional. The name of the
              container registry.
            "repository": "str",  # Optional. The name of the repository.
            "size_bytes": 0,  # Optional. The uncompressed size of the
              tag in bytes (this size is calculated asynchronously so it may not be
              immediately available).
            "tag": "str",  # Optional. The name of the tag.
            "updated_at": "2020-02-20 00:00:00"  # Optional. The time the
              tag was last updated.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
run_garbage_collection(registry_name: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
run_garbage_collection(registry_name: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Start Garbage Collection.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

Garbage collection enables users to clear out unreferenced blobs (layer & manifest data) after deleting one or more manifests from a repository. If there are no unreferenced blobs resulting from the deletion of one or more manifests, garbage collection is effectively a noop. See here for more information about how and why you should clean up your container registry periodically.

To request a garbage collection run on your registry, send a POST request to /v2/registry/$REGISTRY_NAME/garbage-collection. This will initiate the following sequence of events on your registry.

  • Set the registry to read-only mode, meaning no further write-scoped JWTs will be issued to registry clients. Existing write-scoped JWTs will continue to work until they expire which can take up to 15 minutes.

  • Wait until all existing write-scoped JWTs have expired.

  • Scan all registry manifests to determine which blobs are unreferenced.

  • Delete all unreferenced blobs from the registry.

  • Record the number of blobs deleted and bytes freed, mark the garbage collection status as success.

  • Remove the read-only mode restriction from the registry, meaning write-scoped JWTs will once again be issued to registry clients.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "type": "str"  # Optional. Type of the garbage collection to run against this
      registry. Known values are: "untagged manifests only", "unreferenced blobs only",
      and "untagged manifests and unreferenced blobs".
}

# response body for status code(s): 201
response == {
    "garbage_collection": {
        "blobs_deleted": 0,  # Optional. The number of blobs deleted as a
          result of this garbage collection.
        "created_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was created.
        "freed_bytes": 0,  # Optional. The number of bytes freed as a result
          of this garbage collection.
        "registry_name": "str",  # Optional. The name of the container
          registry.
        "status": "str",  # Optional. The current status of this garbage
          collection. Known values are: "requested", "waiting for write JWTs to
          expire", "scanning manifests", "deleting unreferenced blobs", "cancelling",
          "failed", "succeeded", and "cancelled".
        "updated_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was last updated.
        "uuid": "str"  # Optional. A string specifying the UUID of the
          garbage collection.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_garbage_collection(registry_name: str, garbage_collection_uuid: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_garbage_collection(registry_name: str, garbage_collection_uuid: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Garbage Collection.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To cancel the currently-active garbage collection for a registry, send a PUT request to /v2/registry/$REGISTRY_NAME/garbage-collection/$GC_UUID and specify one or more of the attributes below.

Parameters:
  • registry_name (str) – The name of a container registry. Required.

  • garbage_collection_uuid (str) – The UUID of a garbage collection run. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "cancel": bool  # Optional. A boolean value indicating that the garbage
      collection should be cancelled.
}

# response body for status code(s): 200
response == {
    "garbage_collection": {
        "blobs_deleted": 0,  # Optional. The number of blobs deleted as a
          result of this garbage collection.
        "created_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was created.
        "freed_bytes": 0,  # Optional. The number of bytes freed as a result
          of this garbage collection.
        "registry_name": "str",  # Optional. The name of the container
          registry.
        "status": "str",  # Optional. The current status of this garbage
          collection. Known values are: "requested", "waiting for write JWTs to
          expire", "scanning manifests", "deleting unreferenced blobs", "cancelling",
          "failed", "succeeded", and "cancelled".
        "updated_at": "2020-02-20 00:00:00",  # Optional. The time the
          garbage collection was last updated.
        "uuid": "str"  # Optional. A string specifying the UUID of the
          garbage collection.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_subscription(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_subscription(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Subscription Tier.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

After creating your registry, you can switch to a different subscription tier to better suit your needs. To do this, send a POST request to /v2/registry/subscription.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "tier_slug": "str"  # Optional. The slug of the subscription tier to sign up
      for. Known values are: "starter", "basic", and "professional".
}

# response body for status code(s): 200
response == {
    "subscription": {
        "created_at": "2020-02-20 00:00:00",  # Optional. The time at which
          the subscription was created.
        "tier": {
            "allow_storage_overage": bool,  # Optional. A boolean
              indicating whether the subscription tier supports additional storage
              above what is included in the base plan at an additional cost per GiB
              used.
            "included_bandwidth_bytes": 0,  # Optional. The amount of
              outbound data transfer included in the subscription tier in bytes.
            "included_repositories": 0,  # Optional. The number of
              repositories included in the subscription tier. ``0`` indicates that the
              subscription tier includes unlimited repositories.
            "included_storage_bytes": 0,  # Optional. The amount of
              storage included in the subscription tier in bytes.
            "monthly_price_in_cents": 0,  # Optional. The monthly cost of
              the subscription tier in cents.
            "name": "str",  # Optional. The name of the subscription
              tier.
            "slug": "str",  # Optional. The slug identifier of the
              subscription tier.
            "storage_overage_price_in_cents": 0  # Optional. The price
              paid in cents per GiB for additional storage beyond what is included in
              the subscription plan.
        },
        "updated_at": "2020-02-20 00:00:00"  # Optional. The time at which
          the subscription was last updated.
    }
}
# response body for status code(s): 412
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
validate_name(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
validate_name(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Validate a Container Registry Name.

Note: This endpoint is deprecated. Please use the ``/v2/registries`` endpoint instead.

To validate that a container registry name is available for use, send a POST request to /v2/registry/validate-name.

If the name is both formatted correctly and available, the response code will be 204 and contain no body. If the name is already in use, the response will be a 409 Conflict.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # A globally unique name for the container registry. Must be
      lowercase and be composed only of numbers, letters and ``-``"" , up to a limit of
      63 characters. Required.
}

# response body for status code(s): 409
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ReservedIPsActionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s reserved_ips_actions attribute.

get(reserved_ip: str, action_id: int, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Reserved IP Action.

To retrieve the status of a reserved IP action, send a GET request to /v2/reserved_ips/$RESERVED_IP/actions/$ACTION_ID.

Parameters:
  • reserved_ip (str) – A reserved IP address. Required.

  • action_id (int) – A unique numeric ID that can be used to identify and reference an action. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "project_id": "str",  # Optional. The UUID of the project to which
          the reserved IP currently belongs.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional. A unique identifier for the resource
          that the action is associated with.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "transfer" to represent the state of
          an image transfer action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(reserved_ip: str, **kwargs: Any) MutableMapping[str, Any]

List All Actions for a Reserved IP.

To retrieve all actions that have been executed on a reserved IP, send a GET request to /v2/reserved_ips/$RESERVED_IP/actions.

Parameters:

reserved_ip (str) – A reserved IP address. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "actions": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was completed.
            "id": 0,  # Optional. A unique numeric ID that can be used to
              identify and reference an action.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": "str",  # Optional. A human-readable string
              that is used as a unique identifier for each region.
            "resource_id": 0,  # Optional. A unique identifier for the
              resource that the action is associated with.
            "resource_type": "str",  # Optional. The type of resource
              that the action is associated with.
            "started_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was initiated.
            "status": "in-progress",  # Optional. Default value is
              "in-progress". The current status of the action. This can be
              "in-progress", "completed", or "errored". Known values are:
              "in-progress", "completed", and "errored".
            "type": "str"  # Optional. This is the type of action that
              the object represents. For example, this could be "transfer" to represent
              the state of an image transfer action.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post(reserved_ip: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
post(reserved_ip: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate a Reserved IP Action.

To initiate an action on a reserved IP send a POST request to /v2/reserved_ips/$RESERVED_IP/actions. In the JSON body to the request, set the type attribute to on of the supported action types:

Action

Details

assign

Assigns a reserved IP to a Droplet

unassign

Unassign a reserved IP from a Droplet.

Parameters:
  • reserved_ip (str) – A reserved IP address. Required.

  • body (JSON or IO[bytes]) – The type attribute set in the request body will specify the action that will be taken on the reserved IP. Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "project_id": "str",  # Optional. The UUID of the project to which
          the reserved IP currently belongs.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional. A unique identifier for the resource
          that the action is associated with.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "transfer" to represent the state of
          an image transfer action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ReservedIPsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s reserved_ips attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Reserved IP.

On creation, a reserved IP must be either assigned to a Droplet or reserved to a region.

  • To create a new reserved IP assigned to a Droplet, send a POST request to /v2/reserved_ips with the droplet_id attribute.

  • To create a new reserved IP reserved to a region, send a POST request to /v2/reserved_ips with the region attribute.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 202
response == {
    "links": {
        "actions": [
            {
                "href": "str",  # Optional. A URL that can be used to
                  access the action.
                "id": 0,  # Optional. A unique numeric ID that can be
                  used to identify and reference an action.
                "rel": "str"  # Optional. A string specifying the
                  type of the related action.
            }
        ],
        "droplets": [
            {
                "href": "str",  # Optional. A URL that can be used to
                  access the action.
                "id": 0,  # Optional. A unique numeric ID that can be
                  used to identify and reference an action.
                "rel": "str"  # Optional. A string specifying the
                  type of the related action.
            }
        ]
    },
    "reserved_ip": {
        "droplet": {},
        "ip": "str",  # Optional. The public IP address of the reserved IP.
          It also serves as its identifier.
        "locked": bool,  # Optional. A boolean value indicating whether or
          not the reserved IP has pending actions preventing new ones from being
          submitted.
        "project_id": "str",  # Optional. The UUID of the project to which
          the reserved IP currently belongs.:code:`<br>`:code:`<br>`Requires
          ``project:read`` scope.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        }
    }
}
delete(reserved_ip: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Reserved IP.

To delete a reserved IP and remove it from your account, send a DELETE request to /v2/reserved_ips/$RESERVED_IP_ADDR.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

reserved_ip (str) – A reserved IP address. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(reserved_ip: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Reserved IP.

To show information about a reserved IP, send a GET request to /v2/reserved_ips/$RESERVED_IP_ADDR.

Parameters:

reserved_ip (str) – A reserved IP address. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "reserved_ip": {
        "droplet": {},
        "ip": "str",  # Optional. The public IP address of the reserved IP.
          It also serves as its identifier.
        "locked": bool,  # Optional. A boolean value indicating whether or
          not the reserved IP has pending actions preventing new ones from being
          submitted.
        "project_id": "str",  # Optional. The UUID of the project to which
          the reserved IP currently belongs.:code:`<br>`:code:`<br>`Requires
          ``project:read`` scope.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Reserved IPs.

To list all of the reserved IPs available on your account, send a GET request to /v2/reserved_ips.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "reserved_ips": [
        {
            "droplet": {},
            "ip": "str",  # Optional. The public IP address of the
              reserved IP. It also serves as its identifier.
            "locked": bool,  # Optional. A boolean value indicating
              whether or not the reserved IP has pending actions preventing new ones
              from being submitted.
            "project_id": "str",  # Optional. The UUID of the project to
              which the reserved IP currently belongs.:code:`<br>`:code:`<br>`Requires
              ``project:read`` scope.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            }
        }
    ]
}
class pydo.operations.ReservedIPv6ActionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s reserved_ipv6_actions attribute.

post(reserved_ipv6: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
post(reserved_ipv6: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate a Reserved IPv6 Action.

To initiate an action on a reserved IPv6 send a POST request to /v2/reserved_ipv6/$RESERVED_IPV6/actions. In the JSON body to the request, set the type attribute to on of the supported action types:

Action

Details

assign

Assigns a reserved IPv6 to a Droplet

unassign

Unassign a reserved IPv6 from a Droplet.

Parameters:
  • reserved_ipv6 (str) – A reserved IPv6 address. Required.

  • body (JSON or IO[bytes]) – The type attribute set in the request body will specify the action that will be taken on the reserved IPv6. Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional. A unique identifier for the resource
          that the action is associated with.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "transfer" to represent the state of
          an image transfer action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.ReservedIPv6Operations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s reserved_ipv6 attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Reserved IPv6.

On creation, a reserved IPv6 must be reserved to a region.

  • To create a new reserved IPv6 reserved to a region, send a POST request to /v2/reserved_ipv6 with the region_slug attribute.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "region_slug": "str"  # The slug identifier for the region the reserved IPv6
      will be reserved to. Required.
}

# response body for status code(s): 201
response == {
    "reserved_ipv6": {
        "ip": "str",  # Optional. The public IP address of the reserved IPv6.
          It also serves as its identifier.
        "region_slug": "str",  # Optional. The region that the reserved IPv6
          is reserved to. When you query a reserved IPv6,the region_slug will be
          returned.
        "reserved_at": "2020-02-20 00:00:00"  # Optional.
    }
}
delete(reserved_ipv6: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Reserved IPv6.

To delete a reserved IP and remove it from your account, send a DELETE request to /v2/reserved_ipv6/$RESERVED_IPV6.

A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully.

Parameters:

reserved_ipv6 (str) – A reserved IPv6 address. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404, 422
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(reserved_ipv6: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Reserved IPv6.

To show information about a reserved IPv6, send a GET request to /v2/reserved_ipv6/$RESERVED_IPV6.

Parameters:

reserved_ipv6 (str) – A reserved IPv6 address. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "reserved_ipv6": {
        "droplet": {},
        "ip": "str",  # Optional. The public IP address of the reserved IPv6.
          It also serves as its identifier.
        "region_slug": "str",  # Optional. The region that the reserved IPv6
          is reserved to. When you query a reserved IPv6,the region_slug will be
          returned.
        "reserved_at": "2020-02-20 00:00:00"  # Optional. The date and time
          when the reserved IPv6 was reserved.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Reserved IPv6s.

To list all of the reserved IPv6s available on your account, send a GET request to /v2/reserved_ipv6.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "reserved_ipv6s": [
        {
            "droplet": {},
            "ip": "str",  # Optional. The public IP address of the
              reserved IPv6. It also serves as its identifier.
            "region_slug": "str",  # Optional. The region that the
              reserved IPv6 is reserved to. When you query a reserved IPv6,the
              region_slug will be returned.
            "reserved_at": "2020-02-20 00:00:00"  # Optional.
        }
    ]
}
class pydo.operations.SecurityOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s security attribute.

create_scan(**kwargs: Any) MutableMapping[str, Any]

Create Scan.

To create a CSPM scan, send a POST request to /v2/security/scans.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 201
response == {
    "scan": {
        "created_at": "2020-02-20 00:00:00",  # Optional. When scan was
          created.
        "findings": [
            {
                "affected_resources_count": 0,  # Optional. The
                  number of affected resources for the finding.
                "business_impact": "str",  # Optional. A description
                  of the business impact of the finding.
                "details": "str",  # Optional. A description of the
                  risk associated with the finding.
                "found_at": "2020-02-20 00:00:00",  # Optional. When
                  the finding was discovered.
                "mitigation_steps": [
                    {
                        "description": "str",  # Optional.
                          description.
                        "step": 0,  # Optional. step.
                        "title": "str"  # Optional. title.
                    }
                ],
                "name": "str",  # Optional. The name of the rule that
                  triggered the finding.
                "rule_uuid": "str",  # Optional. The unique
                  identifier for the rule that triggered the finding.
                "severity": "str",  # Optional. The severity of the
                  finding. Known values are: "CRITICAL", "HIGH", "MEDIUM", and "LOW".
                "technical_details": "str"  # Optional. A description
                  of the technical details related to the finding.
            }
        ],
        "id": "str",  # Optional. The unique identifier for the scan.
        "status": "str"  # Optional. The status of the scan. Known values
          are: "IN_PROGRESS", "COMPLETED", "FAILED", "CSPM_NOT_ENABLED", and
          "SCAN_NOT_RUN".
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_scan_rule(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
create_scan_rule(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Create Scan Rule.

To mark a scan finding as a false positive, send a POST request to /v2/security/scans/rules to create a new scan rule.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "resource": "str"  # Optional. The URN of a resource to exclude from future
      scans.
}

# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_suppression(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_suppression(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Suppression.

To suppress scan findings, send a POST request to /v2/security/settings/suppressions.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "resources": [
        "str"  # Optional. The URNs of resources to suppress for the rule.
    ],
    "rule_uuid": "str"  # Optional. The rule UUID to suppress for the listed
      resources.
}

# response body for status code(s): 201
response == {
    "links": {
        "pages": {
            "first": "str",  # Optional.
            "last": "str",  # Optional.
            "next": "str",  # Optional.
            "prev": "str"  # Optional.
        }
    },
    "meta": {
        "page": 0,  # Optional.
        "pages": 0,  # Optional.
        "total": 0  # Optional.
    },
    "resources": [
        {
            "id": "str",  # Optional. Unique identifier for the
              suppressed resource.
            "resource_id": "str",  # Optional. Unique identifier for the
              resource suppressed.
            "resource_type": "str",  # Optional. Resource type for the
              resource suppressed.
            "rule_name": "str",  # Optional. Human-readable rule name for
              the suppressed rule.
            "rule_uuid": "str"  # Optional. Unique identifier for the
              suppressed rule.
        }
    ]
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_suppression(suppression_uuid: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete Suppression.

To remove a suppression, send a DELETE request to /v2/security/settings/suppressions/{suppression_uuid}.

Parameters:

suppression_uuid (str) – The suppression UUID to remove. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_latest_scan(*, per_page: int = 20, page: int = 1, severity: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get Latest Scan.

To get the latest CSPM scan, send a GET request to /v2/security/scans/latest.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • severity (str) – The finding severity level to include. Known values are: “LOW”, “MEDIUM”, “HIGH”, and “CRITICAL”. Default value is None.

  • type (str) – The finding type to include. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "scan": {
        "created_at": "2020-02-20 00:00:00",  # Optional. When scan was
          created.
        "findings": [
            {
                "affected_resources_count": 0,  # Optional. The
                  number of affected resources for the finding.
                "business_impact": "str",  # Optional. A description
                  of the business impact of the finding.
                "details": "str",  # Optional. A description of the
                  risk associated with the finding.
                "found_at": "2020-02-20 00:00:00",  # Optional. When
                  the finding was discovered.
                "mitigation_steps": [
                    {
                        "description": "str",  # Optional.
                          description.
                        "step": 0,  # Optional. step.
                        "title": "str"  # Optional. title.
                    }
                ],
                "name": "str",  # Optional. The name of the rule that
                  triggered the finding.
                "rule_uuid": "str",  # Optional. The unique
                  identifier for the rule that triggered the finding.
                "severity": "str",  # Optional. The severity of the
                  finding. Known values are: "CRITICAL", "HIGH", "MEDIUM", and "LOW".
                "technical_details": "str"  # Optional. A description
                  of the technical details related to the finding.
            }
        ],
        "id": "str",  # Optional. The unique identifier for the scan.
        "status": "str"  # Optional. The status of the scan. Known values
          are: "IN_PROGRESS", "COMPLETED", "FAILED", "CSPM_NOT_ENABLED", and
          "SCAN_NOT_RUN".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_scan(scan_id: str, *, severity: Optional[str] = None, per_page: int = 20, page: int = 1, type: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

Get Scan.

To get a CSPM scan by ID, send a GET request to /v2/security/scans/{scan_id}.

Parameters:
  • scan_id (str) – The scan UUID. Required.

  • severity (str) – The finding severity level to include. Known values are: “LOW”, “MEDIUM”, “HIGH”, and “CRITICAL”. Default value is None.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • type (str) – The finding type to include. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "scan": {
        "created_at": "2020-02-20 00:00:00",  # Optional. When scan was
          created.
        "findings": [
            {
                "affected_resources_count": 0,  # Optional. The
                  number of affected resources for the finding.
                "business_impact": "str",  # Optional. A description
                  of the business impact of the finding.
                "details": "str",  # Optional. A description of the
                  risk associated with the finding.
                "found_at": "2020-02-20 00:00:00",  # Optional. When
                  the finding was discovered.
                "mitigation_steps": [
                    {
                        "description": "str",  # Optional.
                          description.
                        "step": 0,  # Optional. step.
                        "title": "str"  # Optional. title.
                    }
                ],
                "name": "str",  # Optional. The name of the rule that
                  triggered the finding.
                "rule_uuid": "str",  # Optional. The unique
                  identifier for the rule that triggered the finding.
                "severity": "str",  # Optional. The severity of the
                  finding. Known values are: "CRITICAL", "HIGH", "MEDIUM", and "LOW".
                "technical_details": "str"  # Optional. A description
                  of the technical details related to the finding.
            }
        ],
        "id": "str",  # Optional. The unique identifier for the scan.
        "status": "str"  # Optional. The status of the scan. Known values
          are: "IN_PROGRESS", "COMPLETED", "FAILED", "CSPM_NOT_ENABLED", and
          "SCAN_NOT_RUN".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_scan_finding_affected_resources(scan_id: str, finding_uuid: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Finding Affected Resources.

To get affected resources for a scan finding, send a GET request to /v2/security/scans/{scan_id}/findings/{finding_uuid}/affected_resources.

Parameters:
  • scan_id (str) – The scan UUID. Required.

  • finding_uuid (str) – The finding UUID. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "affected_resources": [
        {
            "name": "str",  # Optional. The name of the affected
              resource.
            "type": "str",  # Optional. The type of the affected
              resource.
            "urn": "str"  # Optional. The URN for the affected resource.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_scans(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Scans.

To list all CSPM scans, send a GET request to /v2/security/scans.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "scans": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. When scan
              was created.
            "findings": [
                {
                    "affected_resources_count": 0,  # Optional.
                      The number of affected resources for the finding.
                    "business_impact": "str",  # Optional. A
                      description of the business impact of the finding.
                    "details": "str",  # Optional. A description
                      of the risk associated with the finding.
                    "found_at": "2020-02-20 00:00:00",  #
                      Optional. When the finding was discovered.
                    "mitigation_steps": [
                        {
                            "description": "str",  #
                              Optional. description.
                            "step": 0,  # Optional. step.
                            "title": "str"  # Optional.
                              title.
                        }
                    ],
                    "name": "str",  # Optional. The name of the
                      rule that triggered the finding.
                    "rule_uuid": "str",  # Optional. The unique
                      identifier for the rule that triggered the finding.
                    "severity": "str",  # Optional. The severity
                      of the finding. Known values are: "CRITICAL", "HIGH", "MEDIUM",
                      and "LOW".
                    "technical_details": "str"  # Optional. A
                      description of the technical details related to the finding.
                }
            ],
            "id": "str",  # Optional. The unique identifier for the scan.
            "status": "str"  # Optional. The status of the scan. Known
              values are: "IN_PROGRESS", "COMPLETED", "FAILED", "CSPM_NOT_ENABLED", and
              "SCAN_NOT_RUN".
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_settings(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Settings.

To list CSPM scan settings, send a GET request to /v2/security/settings.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "plan_downgrades": {
        "str": {
            "effective_at": "2020-02-20 00:00:00",  # Optional. When the
              coverage downgrade takes effect.
            "resources": [
                "str"  # Optional. URNs of resources that will be
                  downgraded.
            ]
        }
    },
    "settings": {
        "suppressions": {
            "links": {
                "pages": {
                    "first": "str",  # Optional.
                    "last": "str",  # Optional.
                    "next": "str",  # Optional.
                    "prev": "str"  # Optional.
                }
            },
            "meta": {
                "page": 0,  # Optional.
                "pages": 0,  # Optional.
                "total": 0  # Optional.
            },
            "resources": [
                {
                    "id": "str",  # Optional. Unique identifier
                      for the suppressed resource.
                    "resource_id": "str",  # Optional. Unique
                      identifier for the resource suppressed.
                    "resource_type": "str",  # Optional. Resource
                      type for the resource suppressed.
                    "rule_name": "str",  # Optional.
                      Human-readable rule name for the suppressed rule.
                    "rule_uuid": "str"  # Optional. Unique
                      identifier for the suppressed rule.
                }
            ]
        }
    },
    "tier_coverage": {
        "str": {
            "resources": [
                "str"  # Optional. Dictionary of
                  <components"u00b71kv233f"u00b7schemas"u00b7settings"u00b7properties"u00b7tier_coverage"u00b7additionalproperties>.
            ],
            "tags": [
                "str"  # Optional. Dictionary of
                  <components"u00b71kv233f"u00b7schemas"u00b7settings"u00b7properties"u00b7tier_coverage"u00b7additionalproperties>.
            ]
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_settings_plan(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_settings_plan(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Plan.

To update CSPM plan coverage, send a PUT request to /v2/security/settings/plan.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "tier_coverage": {
        "str": {
            "resources": [
                "str"  # Optional. The URNs of resources to scan for
                  the tier.
            ],
            "tags": [
                "str"  # Optional. Resource tags to scan for the
                  tier.
            ]
        }
    }
}

# response body for status code(s): 200
response == {
    "tier_coverage": {
        "str": {
            "resources": [
                "str"  # Optional. Dictionary of
                  <components"u00b7143qzo9"u00b7responses"u00b7tier_coverage"u00b7content"u00b7application-json"u00b7schema"u00b7properties"u00b7tier_coverage"u00b7additionalproperties>.
            ],
            "tags": [
                "str"  # Optional. Dictionary of
                  <components"u00b7143qzo9"u00b7responses"u00b7tier_coverage"u00b7content"u00b7application-json"u00b7schema"u00b7properties"u00b7tier_coverage"u00b7additionalproperties>.
            ]
        }
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.SizesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s sizes attribute.

list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Droplet Sizes.

To list all of available Droplet sizes, send a GET request to /v2/sizes. The response will be a JSON object with a key called sizes. The value of this will be an array of size objects each of which contain the standard size attributes.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "sizes": [
        {
            "available": True,  # Default value is True. This is a
              boolean value that represents whether new Droplets can be created with
              this size.
            "description": "str",  # A string describing the class of
              Droplets created from this size. For example: Basic, General Purpose,
              CPU-Optimized, Memory-Optimized, or Storage-Optimized. Required.
            "disk": 0,  # The amount of disk space set aside for Droplets
              of this size. The value is represented in gigabytes. Required.
            "memory": 0,  # The amount of RAM allocated to Droplets
              created of this size. The value is represented in megabytes. Required.
            "price_hourly": 0.0,  # This describes the price of the
              Droplet size as measured hourly. The value is measured in US dollars.
              Required.
            "price_monthly": 0.0,  # This attribute describes the monthly
              cost of this Droplet size if the Droplet is kept for an entire month. The
              value is measured in US dollars. Required.
            "regions": [
                "str"  # An array containing the region slugs where
                  this size is available for Droplet creates. Required.
            ],
            "slug": "str",  # A human-readable string that is used to
              uniquely identify each size. Required.
            "transfer": 0.0,  # The amount of transfer bandwidth that is
              available for Droplets created in this size. This only counts traffic on
              the public interface. The value is given in terabytes. Required.
            "vcpus": 0,  # The number of CPUs allocated to Droplets of
              this size. Required.
            "disk_info": [
                {
                    "size": {
                        "amount": 0,  # Optional. The amount
                          of space allocated to the disk.
                        "unit": "str"  # Optional. The unit
                          of measure for the disk size.
                    },
                    "type": "str"  # Optional. The type of disk.
                      All Droplets contain a ``local`` disk. Additionally, GPU Droplets
                      can also have a ``scratch`` disk for non-persistent data. Known
                      values are: "local" and "scratch".
                }
            ],
            "gpu_info": {
                "count": 0,  # Optional. The number of GPUs allocated
                  to the Droplet.
                "model": "str",  # Optional. The model of the GPU.
                "vram": {
                    "amount": 0,  # Optional. The amount of VRAM
                      allocated to the GPU.
                    "unit": "str"  # Optional. The unit of
                      measure for the VRAM.
                }
            }
        }
    ],
    "links": {
        "pages": {}
    }
}
class pydo.operations.SnapshotsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s snapshots attribute.

delete(snapshot_id: MutableMapping[str, Any], **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Snapshot.

Both Droplet and volume snapshots are managed through the /v2/snapshots/ endpoint. To delete a snapshot, send a DELETE request to /v2/snapshots/$SNAPSHOT_ID.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:

snapshot_id (JSON) – Either the ID of an existing snapshot. This will be an integer for a Droplet snapshot or a string for a volume snapshot. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(snapshot_id: MutableMapping[str, Any], **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Snapshot.

To retrieve information about a snapshot, send a GET request to /v2/snapshots/$SNAPSHOT_ID.

The response will be a JSON object with a key called snapshot. The value of this will be an snapshot object containing the standard snapshot attributes.

Parameters:

snapshot_id (JSON) – Either the ID of an existing snapshot. This will be an integer for a Droplet snapshot or a string for a volume snapshot. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "snapshot": {
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the snapshot was created.
          Required.
        "min_disk_size": 0,  # The minimum size in GB required for a volume
          or Droplet to use this snapshot. Required.
        "name": "str",  # A human-readable name for the snapshot. Required.
        "regions": [
            "str"  # An array of the regions that the snapshot is
              available in. The regions are represented by their identifying slug
              values. Required.
        ],
        "resource_id": "str",  # The unique identifier for the resource that
          the snapshot originated from. Required.
        "resource_type": "str",  # The type of resource that the snapshot
          originated from. Required. Known values are: "droplet" and "volume".
        "size_gigabytes": 0.0,  # The billable size of the snapshot in
          gigabytes. Required.
        "tags": [
            "str"  # An array of Tags the snapshot has been tagged
              with.:code:`<br>`:code:`<br>`Requires ``tag:read`` scope. Required.
        ]
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, resource_type: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All Snapshots.

To list all of the snapshots available on your account, send a GET request to /v2/snapshots.

The response will be a JSON object with a key called snapshots. This will be set to an array of snapshot objects, each of which will contain the standard snapshot attributes.

Filtering Results by Resource Type

It’s possible to request filtered results by including certain query parameters.

List Droplet Snapshots

To retrieve only snapshots based on Droplets, include the resource_type query parameter set to droplet. For example, /v2/snapshots?resource_type=droplet.

List Volume Snapshots

To retrieve only snapshots based on volumes, include the resource_type query parameter set to volume. For example, /v2/snapshots?resource_type=volume.

keyword per_page:

Number of items returned per page. Default value is 20.

paramtype per_page:

int

keyword page:

Which ‘page’ of paginated results to return. Default value is 1.

paramtype page:

int

keyword resource_type:

Used to filter snapshots by a resource type. Known values are: “droplet” and “volume”. Default value is None.

paramtype resource_type:

str

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "snapshots": [
        {
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the snapshot
              was created. Required.
            "min_disk_size": 0,  # The minimum size in GB required for a
              volume or Droplet to use this snapshot. Required.
            "name": "str",  # A human-readable name for the snapshot.
              Required.
            "regions": [
                "str"  # An array of the regions that the snapshot is
                  available in. The regions are represented by their identifying slug
                  values. Required.
            ],
            "resource_id": "str",  # The unique identifier for the
              resource that the snapshot originated from. Required.
            "resource_type": "str",  # The type of resource that the
              snapshot originated from. Required. Known values are: "droplet" and
              "volume".
            "size_gigabytes": 0.0,  # The billable size of the snapshot
              in gigabytes. Required.
            "tags": [
                "str"  # An array of Tags the snapshot has been
                  tagged with.:code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
                  Required.
            ]
        }
    ]
}
class pydo.operations.SpacesKeyOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s spaces_key attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Spaces Access Key.

To create a new Spaces Access Key, send a POST request to /v2/spaces/keys. At the moment, you cannot mix a fullaccess permission with scoped permissions. A fullaccess permission will be prioritized if fullaccess and scoped permissions are both added.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "access_key": "str",  # Optional. The Access Key ID used to access a bucket.
    "created_at": "2020-02-20 00:00:00",  # Optional. The date and time the key
      was created.
    "grants": [
        {
            "bucket": "str",  # The name of the bucket. Required.
            "permission": "str"  # The permission to grant to the user.
              Possible values are ``read``"" , ``readwrite``"" , ``fullaccess``"" , or
              an empty string. Required.
        }
    ],
    "name": "str"  # Optional. The access key's name.
}

# response body for status code(s): 201
response == {
    "key": {
        "access_key": "str",  # Optional. The Access Key ID used to access a
          bucket.
        "created_at": "2020-02-20 00:00:00",  # Optional. The date and time
          the key was created.
        "grants": [
            {
                "bucket": "str",  # The name of the bucket. Required.
                "permission": "str"  # The permission to grant to the
                  user. Possible values are ``read``"" , ``readwrite``"" ,
                  ``fullaccess``"" , or an empty string. Required.
            }
        ],
        "name": "str",  # Optional. The access key's name.
        "secret_key": "str"  # Optional. The secret key used to access the
          bucket. We return secret keys only once upon creation. Make sure to copy the
          key and securely store it.
    }
}
# response body for status code(s): 400
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(access_key: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Spaces Access Key.

To delete a Spaces Access Key, send a DELETE request to /v2/spaces/keys/$ACCESS_KEY.

A successful request will return a 204 No Content status code.

Parameters:

access_key (str) – The access key’s ID. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(access_key: str, **kwargs: Any) MutableMapping[str, Any]

Get a Spaces Access Key.

To get a Spaces Access Key, send a GET request to /v2/spaces/keys/$ACCESS_KEY.

A successful request will return the Access Key.

Parameters:

access_key (str) – The access key’s ID. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "keys": [
        {
            "access_key": "str",  # Optional. The Access Key ID used to
              access a bucket.
            "created_at": "2020-02-20 00:00:00",  # Optional. The date
              and time the key was created.
            "grants": [
                {
                    "bucket": "str",  # The name of the bucket.
                      Required.
                    "permission": "str"  # The permission to
                      grant to the user. Possible values are ``read``"" ,
                      ``readwrite``"" , ``fullaccess``"" , or an empty string.
                      Required.
                }
            ],
            "name": "str"  # Optional. The access key's name.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, sort: str = 'created_at', sort_direction: str = 'desc', name: Optional[str] = None, bucket: Optional[str] = None, permission: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List Spaces Access Keys.

To list Spaces Access Key, send a GET request to /v2/spaces/keys. Sort parameter must be used with Sort Direction.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • sort (str) – The field to sort by. Default value is “created_at”.

  • sort_direction (str) – The direction to sort by. Possible values are asc or desc. Default value is “desc”.

  • name (str) – The access key’s name. Default value is None.

  • bucket (str) – The bucket’s name. Default value is None.

  • permission (str) – The permission of the access key. Possible values are read, readwrite, fullaccess, or an empty string. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "keys": [
        {
            "access_key": "str",  # Optional. The Access Key ID used to
              access a bucket.
            "created_at": "2020-02-20 00:00:00",  # Optional. The date
              and time the key was created.
            "grants": [
                {
                    "bucket": "str",  # The name of the bucket.
                      Required.
                    "permission": "str"  # The permission to
                      grant to the user. Possible values are ``read``"" ,
                      ``readwrite``"" , ``fullaccess``"" , or an empty string.
                      Required.
                }
            ],
            "name": "str"  # Optional. The access key's name.
        }
    ],
    "links": {
        "pages": {}
    }
}
patch(access_key: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(access_key: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Spaces Access Keys.

To update Spaces Access Key, send a PUT or PATCH request to /v2/spaces/keys/$ACCESS_KEY. At the moment, you cannot convert a fullaccess key to a scoped key or vice versa. You can only update the name of the key.

Parameters:
  • access_key (str) – The access key’s ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "access_key": "str",  # Optional. The Access Key ID used to access a bucket.
    "created_at": "2020-02-20 00:00:00",  # Optional. The date and time the key
      was created.
    "grants": [
        {
            "bucket": "str",  # The name of the bucket. Required.
            "permission": "str"  # The permission to grant to the user.
              Possible values are ``read``"" , ``readwrite``"" , ``fullaccess``"" , or
              an empty string. Required.
        }
    ],
    "name": "str"  # Optional. The access key's name.
}

# response body for status code(s): 200
response == {
    "key": {
        "access_key": "str",  # Optional. The Access Key ID used to access a
          bucket.
        "created_at": "2020-02-20 00:00:00",  # Optional. The date and time
          the key was created.
        "grants": [
            {
                "bucket": "str",  # The name of the bucket. Required.
                "permission": "str"  # The permission to grant to the
                  user. Possible values are ``read``"" , ``readwrite``"" ,
                  ``fullaccess``"" , or an empty string. Required.
            }
        ],
        "name": "str"  # Optional. The access key's name.
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(access_key: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(access_key: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update Spaces Access Keys.

To update Spaces Access Key, send a PUT or PATCH request to /v2/spaces/keys/$ACCESS_KEY. At the moment, you cannot convert a fullaccess key to a scoped key or vice versa. You can only update the name of the key.

Parameters:
  • access_key (str) – The access key’s ID. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "access_key": "str",  # Optional. The Access Key ID used to access a bucket.
    "created_at": "2020-02-20 00:00:00",  # Optional. The date and time the key
      was created.
    "grants": [
        {
            "bucket": "str",  # The name of the bucket. Required.
            "permission": "str"  # The permission to grant to the user.
              Possible values are ``read``"" , ``readwrite``"" , ``fullaccess``"" , or
              an empty string. Required.
        }
    ],
    "name": "str"  # Optional. The access key's name.
}

# response body for status code(s): 200
response == {
    "key": {
        "access_key": "str",  # Optional. The Access Key ID used to access a
          bucket.
        "created_at": "2020-02-20 00:00:00",  # Optional. The date and time
          the key was created.
        "grants": [
            {
                "bucket": "str",  # The name of the bucket. Required.
                "permission": "str"  # The permission to grant to the
                  user. Possible values are ``read``"" , ``readwrite``"" ,
                  ``fullaccess``"" , or an empty string. Required.
            }
        ],
        "name": "str"  # Optional. The access key's name.
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.SshKeysOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s ssh_keys attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New SSH Key.

To add a new SSH public key to your DigitalOcean account, send a POST request to /v2/account/keys. Set the name attribute to the name you wish to use and the public_key attribute to the full public key you are adding.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # A human-readable display name for this key, used to easily
      identify the SSH keys when they are displayed. Required.
    "public_key": "str",  # The entire public key string that was uploaded.
      Embedded into the root user's ``authorized_keys`` file if you include this key
      during Droplet creation. Required.
    "fingerprint": "str",  # Optional. A unique identifier that differentiates
      this key from other keys using  a format that SSH recognizes. The fingerprint is
      created when the key is added to your account.
    "id": 0  # Optional. A unique identification number for this key. Can be used
      to embed a  specific SSH key into a Droplet.
}

# response body for status code(s): 201
response == {
    "ssh_key": {
        "name": "str",  # A human-readable display name for this key, used to
          easily identify the SSH keys when they are displayed. Required.
        "public_key": "str",  # The entire public key string that was
          uploaded. Embedded into the root user's ``authorized_keys`` file if you
          include this key during Droplet creation. Required.
        "fingerprint": "str",  # Optional. A unique identifier that
          differentiates this key from other keys using  a format that SSH recognizes.
          The fingerprint is created when the key is added to your account.
        "id": 0  # Optional. A unique identification number for this key. Can
          be used to embed a  specific SSH key into a Droplet.
    }
}
delete(ssh_key_identifier: MutableMapping[str, Any], **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an SSH Key.

To destroy a public SSH key that you have in your account, send a DELETE request to /v2/account/keys/$KEY_ID or /v2/account/keys/$KEY_FINGERPRINT. A 204 status will be returned, indicating that the action was successful and that the response body is empty.

Parameters:

ssh_key_identifier (JSON) – Either the ID or the fingerprint of an existing SSH key. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(ssh_key_identifier: MutableMapping[str, Any], **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing SSH Key.

To get information about a key, send a GET request to /v2/account/keys/$KEY_ID or /v2/account/keys/$KEY_FINGERPRINT. The response will be a JSON object with the key ssh_key and value an ssh_key object which contains the standard ssh_key attributes.

Parameters:

ssh_key_identifier (JSON) – Either the ID or the fingerprint of an existing SSH key. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "ssh_key": {
        "name": "str",  # A human-readable display name for this key, used to
          easily identify the SSH keys when they are displayed. Required.
        "public_key": "str",  # The entire public key string that was
          uploaded. Embedded into the root user's ``authorized_keys`` file if you
          include this key during Droplet creation. Required.
        "fingerprint": "str",  # Optional. A unique identifier that
          differentiates this key from other keys using  a format that SSH recognizes.
          The fingerprint is created when the key is added to your account.
        "id": 0  # Optional. A unique identification number for this key. Can
          be used to embed a  specific SSH key into a Droplet.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All SSH Keys.

To list all of the keys in your account, send a GET request to /v2/account/keys. The response will be a JSON object with a key set to ssh_keys. The value of this will be an array of ssh_key objects, each of which contains the standard ssh_key attributes.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "ssh_keys": [
        {
            "name": "str",  # A human-readable display name for this key,
              used to easily identify the SSH keys when they are displayed. Required.
            "public_key": "str",  # The entire public key string that was
              uploaded. Embedded into the root user's ``authorized_keys`` file if you
              include this key during Droplet creation. Required.
            "fingerprint": "str",  # Optional. A unique identifier that
              differentiates this key from other keys using  a format that SSH
              recognizes. The fingerprint is created when the key is added to your
              account.
            "id": 0  # Optional. A unique identification number for this
              key. Can be used to embed a  specific SSH key into a Droplet.
        }
    ]
}
update(ssh_key_identifier: JSON, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(ssh_key_identifier: JSON, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an SSH Key’s Name.

To update the name of an SSH key, send a PUT request to either /v2/account/keys/$SSH_KEY_ID or /v2/account/keys/$SSH_KEY_FINGERPRINT. Set the name attribute to the new name you want to use.

Parameters:
  • ssh_key_identifier (JSON) – Either the ID or the fingerprint of an existing SSH key. Required.

  • body (JSON or IO[bytes]) – Set the name attribute to the new name you want to use. Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # Optional. A human-readable display name for this key, used
      to easily identify the SSH keys when they are displayed.
}

# response body for status code(s): 200
response == {
    "ssh_key": {
        "name": "str",  # A human-readable display name for this key, used to
          easily identify the SSH keys when they are displayed. Required.
        "public_key": "str",  # The entire public key string that was
          uploaded. Embedded into the root user's ``authorized_keys`` file if you
          include this key during Droplet creation. Required.
        "fingerprint": "str",  # Optional. A unique identifier that
          differentiates this key from other keys using  a format that SSH recognizes.
          The fingerprint is created when the key is added to your account.
        "id": 0  # Optional. A unique identification number for this key. Can
          be used to embed a  specific SSH key into a Droplet.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.TagsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s tags attribute.

assign_resources(tag_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
assign_resources(tag_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Tag a Resource.

Resources can be tagged by sending a POST request to /v2/tags/$TAG_NAME/resources with an array of json objects containing resource_id and resource_type attributes.

Currently only tagging of Droplets, Databases, Images, Volumes, and Volume Snapshots is supported. resource_type is expected to be the string droplet, database, image, volume or volume_snapshot. resource_id is expected to be the ID of the resource as a string.

In order to tag a resource, you must have both tag:create and <resource type>:update scopes. For example, to tag a Droplet, you must have tag:create and droplet:update.

Parameters:
  • tag_id (str) – The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "resources": [
        {
            "resource_id": "str",  # Optional. The identifier of a
              resource.
            "resource_type": "str"  # Optional. The type of the resource.
              Known values are: "droplet", "image", "volume", and "volume_snapshot".
        }
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Tag.

To create a tag you can send a POST request to /v2/tags with a name attribute.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # Optional. The name of the tag. Tags may contain letters,
      numbers, colons, dashes, and underscores. There is a limit of 255 characters per
      tag.  **Note:** Tag names are case stable, which means the capitalization you use
      when you first create a tag is canonical.  When working with tags in the API, you
      must use the tag's canonical capitalization. For example, if you create a tag
      named "PROD", the URL to add that tag to a resource would be
      ``https://api.digitalocean.com/v2/tags/PROD/resources`` (not
      ``/v2/tags/prod/resources``"" ).  Tagged resources in the control panel will
      always display the canonical capitalization. For example, if you create a tag
      named "PROD", you can tag resources in the control panel by entering "prod". The
      tag will still display with its canonical capitalization, "PROD".
    "resources": {
        "count": 0,  # Optional. The number of tagged objects for this type
          of resource.
        "databases": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "last_tagged_uri": "str"  # Optional. The URI for the last
              tagged object for this type of resource.
        },
        "droplets": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "last_tagged_uri": "str"  # Optional. The URI for the last
              tagged object for this type of resource.
        },
        "imgages": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "last_tagged_uri": "str"  # Optional. The URI for the last
              tagged object for this type of resource.
        },
        "last_tagged_uri": "str",  # Optional. The URI for the last tagged
          object for this type of resource.
        "volume_snapshots": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "last_tagged_uri": "str"  # Optional. The URI for the last
              tagged object for this type of resource.
        },
        "volumes": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "last_tagged_uri": "str"  # Optional. The URI for the last
              tagged object for this type of resource.
        }
    }
}

# response body for status code(s): 201
response == {
    "tag": {
        "name": "str",  # Optional. The name of the tag. Tags may contain
          letters, numbers, colons, dashes, and underscores. There is a limit of 255
          characters per tag.  **Note:** Tag names are case stable, which means the
          capitalization you use when you first create a tag is canonical.  When
          working with tags in the API, you must use the tag's canonical
          capitalization. For example, if you create a tag named "PROD", the URL to add
          that tag to a resource would be
          ``https://api.digitalocean.com/v2/tags/PROD/resources`` (not
          ``/v2/tags/prod/resources``"" ).  Tagged resources in the control panel will
          always display the canonical capitalization. For example, if you create a tag
          named "PROD", you can tag resources in the control panel by entering "prod".
          The tag will still display with its canonical capitalization, "PROD".
        "resources": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "databases": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "droplets": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "imgages": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "last_tagged_uri": "str",  # Optional. The URI for the last
              tagged object for this type of resource.
            "volume_snapshots": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "volumes": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            }
        }
    }
}
# response body for status code(s): 400
response == {
    "error": "str",  # A message providing information about the error. Required.
    "root_causes": [
        "str"  # A list of underlying causes for the error, including details
          to help  resolve it when possible. Required.
    ],
    "messages": [
        "str"  # Optional. A list of error messages.
    ]
}
delete(tag_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Tag.

A tag can be deleted by sending a DELETE request to /v2/tags/$TAG_NAME. Deleting a tag also untags all the resources that have previously been tagged by the Tag.

Parameters:

tag_id (str) – The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(tag_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve a Tag.

To retrieve an individual tag, you can send a GET request to /v2/tags/$TAG_NAME.

This endpoint will only return tagged resources that you are authorized to see. For example, to see tagged Droplets, include the droplet:read scope.

Parameters:

tag_id (str) – The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "tag": {
        "name": "str",  # Optional. The name of the tag. Tags may contain
          letters, numbers, colons, dashes, and underscores. There is a limit of 255
          characters per tag.  **Note:** Tag names are case stable, which means the
          capitalization you use when you first create a tag is canonical.  When
          working with tags in the API, you must use the tag's canonical
          capitalization. For example, if you create a tag named "PROD", the URL to add
          that tag to a resource would be
          ``https://api.digitalocean.com/v2/tags/PROD/resources`` (not
          ``/v2/tags/prod/resources``"" ).  Tagged resources in the control panel will
          always display the canonical capitalization. For example, if you create a tag
          named "PROD", you can tag resources in the control panel by entering "prod".
          The tag will still display with its canonical capitalization, "PROD".
        "resources": {
            "count": 0,  # Optional. The number of tagged objects for
              this type of resource.
            "databases": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "droplets": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "imgages": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "last_tagged_uri": "str",  # Optional. The URI for the last
              tagged object for this type of resource.
            "volume_snapshots": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            },
            "volumes": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "last_tagged_uri": "str"  # Optional. The URI for the
                  last tagged object for this type of resource.
            }
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Tags.

To list all of your tags, you can send a GET request to /v2/tags.

This endpoint will only return tagged resources that you are authorized to see (e.g. Droplets will only be returned if you have droplet:read).

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "tags": [
        {
            "name": "str",  # Optional. The name of the tag. Tags may
              contain letters, numbers, colons, dashes, and underscores. There is a
              limit of 255 characters per tag.  **Note:** Tag names are case stable,
              which means the capitalization you use when you first create a tag is
              canonical.  When working with tags in the API, you must use the tag's
              canonical capitalization. For example, if you create a tag named "PROD",
              the URL to add that tag to a resource would be
              ``https://api.digitalocean.com/v2/tags/PROD/resources`` (not
              ``/v2/tags/prod/resources``"" ).  Tagged resources in the control panel
              will always display the canonical capitalization. For example, if you
              create a tag named "PROD", you can tag resources in the control panel by
              entering "prod". The tag will still display with its canonical
              capitalization, "PROD".
            "resources": {
                "count": 0,  # Optional. The number of tagged objects
                  for this type of resource.
                "databases": {
                    "count": 0,  # Optional. The number of tagged
                      objects for this type of resource.
                    "last_tagged_uri": "str"  # Optional. The URI
                      for the last tagged object for this type of resource.
                },
                "droplets": {
                    "count": 0,  # Optional. The number of tagged
                      objects for this type of resource.
                    "last_tagged_uri": "str"  # Optional. The URI
                      for the last tagged object for this type of resource.
                },
                "imgages": {
                    "count": 0,  # Optional. The number of tagged
                      objects for this type of resource.
                    "last_tagged_uri": "str"  # Optional. The URI
                      for the last tagged object for this type of resource.
                },
                "last_tagged_uri": "str",  # Optional. The URI for
                  the last tagged object for this type of resource.
                "volume_snapshots": {
                    "count": 0,  # Optional. The number of tagged
                      objects for this type of resource.
                    "last_tagged_uri": "str"  # Optional. The URI
                      for the last tagged object for this type of resource.
                },
                "volumes": {
                    "count": 0,  # Optional. The number of tagged
                      objects for this type of resource.
                    "last_tagged_uri": "str"  # Optional. The URI
                      for the last tagged object for this type of resource.
                }
            }
        }
    ]
}
unassign_resources(tag_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]
unassign_resources(tag_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) Optional[JSON]

Untag a Resource.

Resources can be untagged by sending a DELETE request to /v2/tags/$TAG_NAME/resources with an array of json objects containing resource_id and resource_type attributes.

Currently only untagging of Droplets, Databases, Images, Volumes, and Volume Snapshots is supported. resource_type is expected to be the string droplet, database, image, volume or volume_snapshot. resource_id is expected to be the ID of the resource as a string.

In order to untag a resource, you must have both tag:delete and <resource type>:update scopes. For example, to untag a Droplet, you must have tag:delete and droplet:update.

Parameters:
  • tag_id (str) – The name of the tag. Tags may contain letters, numbers, colons, dashes, and underscores. There is a limit of 255 characters per tag. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "resources": [
        {
            "resource_id": "str",  # Optional. The identifier of a
              resource.
            "resource_type": "str"  # Optional. The type of the resource.
              Known values are: "droplet", "image", "volume", and "volume_snapshot".
        }
    ]
}

# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.UptimeOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s uptime attribute.

create_alert(check_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_alert(check_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Alert.

To create an Uptime alert, send a POST request to /v2/uptime/checks/$CHECK_ID/alerts specifying the attributes in the table below in the JSON body.

Parameters:
  • check_id (str) – A unique identifier for a check. Required.

  • body (JSON or IO[bytes]) – The ‘’type’’ field dictates the type of alert, and hence what type of value to pass into the threshold property. Type | Description | Threshold Value —–|-------------|——————– latency | alerts on the response latency | milliseconds down | alerts on a target registering as down in any region | N/A (Not required) down_global | alerts on a target registering as down globally | N/A (Not required) ssl_expiry | alerts on a SSL certificate expiring within $threshold days | days. Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "comparison": "str",  # Optional. The comparison operator used against the
      alert's threshold. Known values are: "greater_than" and "less_than".
    "id": "str",  # Optional. A unique ID that can be used to identify and
      reference the alert.
    "name": "str",  # Optional. A human-friendly display name.
    "notifications": {
        "email": [
            "str"  # An email to notify on an alert trigger. The Email
              has to be one that is verified on that DigitalOcean account. Required.
        ],
        "slack": [
            {
                "channel": "str",  # Slack channel to notify of an
                  alert trigger. Required.
                "url": "str"  # Slack Webhook URL. Required.
            }
        ]
    },
    "period": "str",  # Optional. Period of time the threshold must be exceeded
      to trigger the alert. Known values are: "2m", "3m", "5m", "10m", "15m", "30m",
      and "1h".
    "threshold": 0,  # Optional. The threshold at which the alert will enter a
      trigger state. The specific threshold is dependent on the alert type.
    "type": "str"  # Optional. The type of alert. Known values are: "latency",
      "down", "down_global", and "ssl_expiry".
}

# response body for status code(s): 201
response == {
    "alert": {
        "comparison": "str",  # Optional. The comparison operator used
          against the alert's threshold. Known values are: "greater_than" and
          "less_than".
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the alert.
        "name": "str",  # Optional. A human-friendly display name.
        "notifications": {
            "email": [
                "str"  # An email to notify on an alert trigger. The
                  Email has to be one that is verified on that DigitalOcean account.
                  Required.
            ],
            "slack": [
                {
                    "channel": "str",  # Slack channel to notify
                      of an alert trigger. Required.
                    "url": "str"  # Slack Webhook URL. Required.
                }
            ]
        },
        "period": "str",  # Optional. Period of time the threshold must be
          exceeded to trigger the alert. Known values are: "2m", "3m", "5m", "10m",
          "15m", "30m", and "1h".
        "threshold": 0,  # Optional. The threshold at which the alert will
          enter a trigger state. The specific threshold is dependent on the alert type.
        "type": "str"  # Optional. The type of alert. Known values are:
          "latency", "down", "down_global", and "ssl_expiry".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
create_check(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_check(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Check.

To create an Uptime check, send a POST request to /v2/uptime/checks specifying the attributes in the table below in the JSON body.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "enabled": True,  # Optional. Default value is True. A boolean value
      indicating whether the check is enabled/disabled.
    "name": "str",  # Optional. A human-friendly display name.
    "regions": [
        "str"  # Optional. An array containing the selected regions to
          perform healthchecks from.
    ],
    "target": "str",  # Optional. The endpoint to perform healthchecks on.
    "type": "str"  # Optional. The type of health check to perform. Known values
      are: "ping", "http", and "https".
}

# response body for status code(s): 201
response == {
    "check": {
        "enabled": True,  # Optional. Default value is True. A boolean value
          indicating whether the check is enabled/disabled.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the check.
        "name": "str",  # Optional. A human-friendly display name.
        "regions": [
            "str"  # Optional. An array containing the selected regions
              to perform healthchecks from.
        ],
        "target": "str",  # Optional. The endpoint to perform healthchecks
          on.
        "type": "str"  # Optional. The type of health check to perform. Known
          values are: "ping", "http", and "https".
    }
}
delete_alert(check_id: str, alert_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete an Alert.

To delete an Uptime alert, send a DELETE request to /v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID. A 204 status code with no body will be returned in response to a successful request.

Parameters:
  • check_id (str) – A unique identifier for a check. Required.

  • alert_id (str) – A unique identifier for an alert. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_check(check_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Check.

To delete an Uptime check, send a DELETE request to /v2/uptime/checks/$CHECK_ID. A 204 status code with no body will be returned in response to a successful request.

Deleting a check will also delete alerts associated with the check.

Parameters:

check_id (str) – A unique identifier for a check. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_alert(check_id: str, alert_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Alert.

To show information about an existing alert, send a GET request to /v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID.

Parameters:
  • check_id (str) – A unique identifier for a check. Required.

  • alert_id (str) – A unique identifier for an alert. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "alert": {
        "comparison": "str",  # Optional. The comparison operator used
          against the alert's threshold. Known values are: "greater_than" and
          "less_than".
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the alert.
        "name": "str",  # Optional. A human-friendly display name.
        "notifications": {
            "email": [
                "str"  # An email to notify on an alert trigger. The
                  Email has to be one that is verified on that DigitalOcean account.
                  Required.
            ],
            "slack": [
                {
                    "channel": "str",  # Slack channel to notify
                      of an alert trigger. Required.
                    "url": "str"  # Slack Webhook URL. Required.
                }
            ]
        },
        "period": "str",  # Optional. Period of time the threshold must be
          exceeded to trigger the alert. Known values are: "2m", "3m", "5m", "10m",
          "15m", "30m", and "1h".
        "threshold": 0,  # Optional. The threshold at which the alert will
          enter a trigger state. The specific threshold is dependent on the alert type.
        "type": "str"  # Optional. The type of alert. Known values are:
          "latency", "down", "down_global", and "ssl_expiry".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_check(check_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Check.

To show information about an existing check, send a GET request to /v2/uptime/checks/$CHECK_ID.

Parameters:

check_id (str) – A unique identifier for a check. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "check": {
        "enabled": True,  # Optional. Default value is True. A boolean value
          indicating whether the check is enabled/disabled.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the check.
        "name": "str",  # Optional. A human-friendly display name.
        "regions": [
            "str"  # Optional. An array containing the selected regions
              to perform healthchecks from.
        ],
        "target": "str",  # Optional. The endpoint to perform healthchecks
          on.
        "type": "str"  # Optional. The type of health check to perform. Known
          values are: "ping", "http", and "https".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_check_state(check_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve Check State.

To show information about an existing check’s state, send a GET request to /v2/uptime/checks/$CHECK_ID/state.

Parameters:

check_id (str) – A unique identifier for a check. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "state": {
        "previous_outage": {
            "duration_seconds": 0,  # Optional.
            "ended_at": "str",  # Optional.
            "region": "str",  # Optional.
            "started_at": "str"  # Optional.
        },
        "regions": {
            "eu_west": {
                "status": "str",  # Optional. Known values are:
                  "DOWN", "UP", and "CHECKING".
                "status_changed_at": "str",  # Optional. A map of
                  region to regional state.
                "thirty_day_uptime_percentage": 0.0  # Optional. A
                  map of region to regional state.
            },
            "us_east": {
                "status": "str",  # Optional. Known values are:
                  "DOWN", "UP", and "CHECKING".
                "status_changed_at": "str",  # Optional. A map of
                  region to regional state.
                "thirty_day_uptime_percentage": 0.0  # Optional. A
                  map of region to regional state.
            }
        }
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_alerts(check_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Alerts.

To list all of the alerts for an Uptime check, send a GET request to /v2/uptime/checks/$CHECK_ID/alerts.

Parameters:
  • check_id (str) – A unique identifier for a check. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "alerts": [
        {
            "comparison": "str",  # Optional. The comparison operator
              used against the alert's threshold. Known values are: "greater_than" and
              "less_than".
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the alert.
            "name": "str",  # Optional. A human-friendly display name.
            "notifications": {
                "email": [
                    "str"  # An email to notify on an alert
                      trigger. The Email has to be one that is verified on that
                      DigitalOcean account. Required.
                ],
                "slack": [
                    {
                        "channel": "str",  # Slack channel to
                          notify of an alert trigger. Required.
                        "url": "str"  # Slack Webhook URL.
                          Required.
                    }
                ]
            },
            "period": "str",  # Optional. Period of time the threshold
              must be exceeded to trigger the alert. Known values are: "2m", "3m",
              "5m", "10m", "15m", "30m", and "1h".
            "threshold": 0,  # Optional. The threshold at which the alert
              will enter a trigger state. The specific threshold is dependent on the
              alert type.
            "type": "str"  # Optional. The type of alert. Known values
              are: "latency", "down", "down_global", and "ssl_expiry".
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_checks(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Checks.

To list all of the Uptime checks on your account, send a GET request to /v2/uptime/checks.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "checks": [
        {
            "enabled": True,  # Optional. Default value is True. A
              boolean value indicating whether the check is enabled/disabled.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the check.
            "name": "str",  # Optional. A human-friendly display name.
            "regions": [
                "str"  # Optional. An array containing the selected
                  regions to perform healthchecks from.
            ],
            "target": "str",  # Optional. The endpoint to perform
              healthchecks on.
            "type": "str"  # Optional. The type of health check to
              perform. Known values are: "ping", "http", and "https".
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_alert(check_id: str, alert_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_alert(check_id: str, alert_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update an Alert.

To update the settings of an Uptime alert, send a PUT request to /v2/uptime/checks/$CHECK_ID/alerts/$ALERT_ID.

Parameters:
  • check_id (str) – A unique identifier for a check. Required.

  • alert_id (str) – A unique identifier for an alert. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "comparison": "str",  # Optional. The comparison operator used against the
      alert's threshold. Known values are: "greater_than" and "less_than".
    "name": "str",  # Optional. A human-friendly display name.
    "notifications": {
        "email": [
            "str"  # An email to notify on an alert trigger. The Email
              has to be one that is verified on that DigitalOcean account. Required.
        ],
        "slack": [
            {
                "channel": "str",  # Slack channel to notify of an
                  alert trigger. Required.
                "url": "str"  # Slack Webhook URL. Required.
            }
        ]
    },
    "period": "str",  # Optional. Period of time the threshold must be exceeded
      to trigger the alert. Known values are: "2m", "3m", "5m", "10m", "15m", "30m",
      and "1h".
    "threshold": 0,  # Optional. The threshold at which the alert will enter a
      trigger state. The specific threshold is dependent on the alert type.
    "type": "str"  # Optional. The type of alert. Known values are: "latency",
      "down", "down_global", and "ssl_expiry".
}

# response body for status code(s): 200
response == {
    "alert": {
        "comparison": "str",  # Optional. The comparison operator used
          against the alert's threshold. Known values are: "greater_than" and
          "less_than".
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the alert.
        "name": "str",  # Optional. A human-friendly display name.
        "notifications": {
            "email": [
                "str"  # An email to notify on an alert trigger. The
                  Email has to be one that is verified on that DigitalOcean account.
                  Required.
            ],
            "slack": [
                {
                    "channel": "str",  # Slack channel to notify
                      of an alert trigger. Required.
                    "url": "str"  # Slack Webhook URL. Required.
                }
            ]
        },
        "period": "str",  # Optional. Period of time the threshold must be
          exceeded to trigger the alert. Known values are: "2m", "3m", "5m", "10m",
          "15m", "30m", and "1h".
        "threshold": 0,  # Optional. The threshold at which the alert will
          enter a trigger state. The specific threshold is dependent on the alert type.
        "type": "str"  # Optional. The type of alert. Known values are:
          "latency", "down", "down_global", and "ssl_expiry".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update_check(check_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update_check(check_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a Check.

To update the settings of an Uptime check, send a PUT request to /v2/uptime/checks/$CHECK_ID.

Parameters:
  • check_id (str) – A unique identifier for a check. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "enabled": True,  # Optional. Default value is True. A boolean value
      indicating whether the check is enabled/disabled.
    "name": "str",  # Optional. A human-friendly display name.
    "regions": [
        "str"  # Optional. An array containing the selected regions to
          perform healthchecks from.
    ],
    "target": "str",  # Optional. The endpoint to perform healthchecks on.
    "type": "str"  # Optional. The type of health check to perform. Known values
      are: "ping", "http", and "https".
}

# response body for status code(s): 200
response == {
    "check": {
        "enabled": True,  # Optional. Default value is True. A boolean value
          indicating whether the check is enabled/disabled.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the check.
        "name": "str",  # Optional. A human-friendly display name.
        "regions": [
            "str"  # Optional. An array containing the selected regions
              to perform healthchecks from.
        ],
        "target": "str",  # Optional. The endpoint to perform healthchecks
          on.
        "type": "str"  # Optional. The type of health check to perform. Known
          values are: "ping", "http", and "https".
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.VolumeActionsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s volume_actions attribute.

get(volume_id: str, action_id: int, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Volume Action.

To retrieve the status of a volume action, send a GET request to /v2/volumes/$VOLUME_ID/actions/$ACTION_ID.

Parameters:
  • volume_id (str) – The ID of the block storage volume. Required.

  • action_id (int) – A unique numeric ID that can be used to identify and reference an action. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "attach_volume" to represent the state
          of a volume attach action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(volume_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Actions for a Volume.

To retrieve all actions that have been executed on a volume, send a GET request to /v2/volumes/$VOLUME_ID/actions.

Parameters:
  • volume_id (str) – The ID of the block storage volume. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "actions": [
        {
            "completed_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was completed.
            "id": 0,  # Optional. A unique numeric ID that can be used to
              identify and reference an action.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": "str",  # Optional. A human-readable string
              that is used as a unique identifier for each region.
            "resource_id": 0,  # Optional.
            "resource_type": "str",  # Optional. The type of resource
              that the action is associated with.
            "started_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the action was initiated.
            "status": "in-progress",  # Optional. Default value is
              "in-progress". The current status of the action. This can be
              "in-progress", "completed", or "errored". Known values are:
              "in-progress", "completed", and "errored".
            "type": "str"  # Optional. This is the type of action that
              the object represents. For example, this could be "attach_volume" to
              represent the state of a volume attach action.
        }
    ],
    "links": {
        "pages": {}
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post(body: JSON, *, per_page: int = 20, page: int = 1, content_type: str = 'application/json', **kwargs: Any) JSON
post(body: IO[bytes], *, per_page: int = 20, page: int = 1, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate A Block Storage Action By Volume Name.

To initiate an action on a block storage volume by Name, send a POST request to ~/v2/volumes/actions. The body should contain the appropriate attributes for the respective action.

Attach a Block Storage Volume to a Droplet

Attribute

Details

type

This must be attach

volume_name

The name of the block storage volume

droplet_id

Set to the Droplet’s ID

region

Set to the slug representing the region where the volume is located

Each volume may only be attached to a single Droplet. However, up to fifteen volumes may be attached to a Droplet at a time. Pre-formatted volumes will be automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 when attached. On older Droplets, additional configuration is required.

Remove a Block Storage Volume from a Droplet

Attribute

Details

type

This must be detach

volume_name

The name of the block storage volume

droplet_id

Set to the Droplet’s ID

region

Set to the slug representing the region where the volume is located.

param body:

Is either a JSON type or a IO[bytes] type. Required.

type body:

JSON or IO[bytes]

keyword per_page:

Number of items returned per page. Default value is 20.

paramtype per_page:

int

keyword page:

Which ‘page’ of paginated results to return. Default value is 1.

paramtype page:

int

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 202
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "attach_volume" to represent the state
          of a volume attach action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
post_by_id(volume_id: str, body: JSON, *, per_page: int = 20, page: int = 1, content_type: str = 'application/json', **kwargs: Any) JSON
post_by_id(volume_id: str, body: IO[bytes], *, per_page: int = 20, page: int = 1, content_type: str = 'application/json', **kwargs: Any) JSON

Initiate A Block Storage Action By Volume Id.

To initiate an action on a block storage volume by Id, send a POST request to ~/v2/volumes/$VOLUME_ID/actions. The body should contain the appropriate attributes for the respective action.

Attach a Block Storage Volume to a Droplet

Attribute

Details

type

This must be attach

droplet_id

Set to the Droplet’s ID

region

Set to the slug representing the region where the volume is located

Each volume may only be attached to a single Droplet. However, up to fifteen volumes may be attached to a Droplet at a time. Pre-formatted volumes will be automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 when attached. On older Droplets, additional configuration is required.

Remove a Block Storage Volume from a Droplet

Attribute

Details

type

This must be detach

droplet_id

Set to the Droplet’s ID

region

Set to the slug representing the region where the volume is located

Resize a Volume

Attribute

Details

type

This must be resize

size_gigabytes

The new size of the block storage volume in GiB (1024^3)

region

Set to the slug representing the region where the volume is located

Volumes may only be resized upwards. The maximum size for a volume is 16TiB.

param volume_id:

The ID of the block storage volume. Required.

type volume_id:

str

param body:

Is either a JSON type or a IO[bytes] type. Required.

type body:

JSON or IO[bytes]

keyword per_page:

Number of items returned per page. Default value is 20.

paramtype per_page:

int

keyword page:

Which ‘page’ of paginated results to return. Default value is 1.

paramtype page:

int

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 202
response == {
    "action": {
        "completed_at": "2020-02-20 00:00:00",  # Optional. A time value
          given in ISO8601 combined date and time format that represents when the
          action was completed.
        "id": 0,  # Optional. A unique numeric ID that can be used to
          identify and reference an action.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": "str",  # Optional. A human-readable string that is
          used as a unique identifier for each region.
        "resource_id": 0,  # Optional.
        "resource_type": "str",  # Optional. The type of resource that the
          action is associated with.
        "started_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the action was
          initiated.
        "status": "in-progress",  # Optional. Default value is "in-progress".
          The current status of the action. This can be "in-progress", "completed", or
          "errored". Known values are: "in-progress", "completed", and "errored".
        "type": "str"  # Optional. This is the type of action that the object
          represents. For example, this could be "attach_volume" to represent the state
          of a volume attach action.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.VolumeSnapshotsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s volume_snapshots attribute.

create(volume_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(volume_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create Snapshot from a Volume.

To create a snapshot from a volume, sent a POST request to /v2/volumes/$VOLUME_ID/snapshots.

Parameters:
  • volume_id (str) – The ID of the block storage volume. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # A human-readable name for the volume snapshot. Required.
    "tags": [
        "str"  # Optional. A flat array of tag names as strings to be applied
          to the resource. Tag names may be for either existing or new tags.
          :code:`<br>`:code:`<br>`Requires ``tag:create`` scope.
    ]
}

# response body for status code(s): 201
response == {
    "snapshot": {
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the snapshot was created.
          Required.
        "min_disk_size": 0,  # The minimum size in GB required for a volume
          or Droplet to use this snapshot. Required.
        "name": "str",  # A human-readable name for the snapshot. Required.
        "regions": [
            "str"  # An array of the regions that the snapshot is
              available in. The regions are represented by their identifying slug
              values. Required.
        ],
        "resource_id": "str",  # The unique identifier for the resource that
          the snapshot originated from. Required.
        "resource_type": "str",  # The type of resource that the snapshot
          originated from. Required. Known values are: "droplet" and "volume".
        "size_gigabytes": 0.0,  # The billable size of the snapshot in
          gigabytes. Required.
        "tags": [
            "str"  # An array of Tags the snapshot has been tagged
              with.:code:`<br>`:code:`<br>`Requires ``tag:read`` scope. Required.
        ]
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_by_id(snapshot_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Volume Snapshot.

To delete a volume snapshot, send a DELETE request to /v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID.

A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.

Parameters:

snapshot_id (str) – The unique identifier for the snapshot. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get_by_id(snapshot_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Volume Snapshot.

To retrieve the details of a snapshot that has been created from a volume, send a GET request to /v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID.

Parameters:

snapshot_id (str) – The unique identifier for the snapshot. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "snapshot": {
        "created_at": "2020-02-20 00:00:00",  # A time value given in ISO8601
          combined date and time format that represents when the snapshot was created.
          Required.
        "min_disk_size": 0,  # The minimum size in GB required for a volume
          or Droplet to use this snapshot. Required.
        "name": "str",  # A human-readable name for the snapshot. Required.
        "regions": [
            "str"  # An array of the regions that the snapshot is
              available in. The regions are represented by their identifying slug
              values. Required.
        ],
        "resource_id": "str",  # The unique identifier for the resource that
          the snapshot originated from. Required.
        "resource_type": "str",  # The type of resource that the snapshot
          originated from. Required. Known values are: "droplet" and "volume".
        "size_gigabytes": 0.0,  # The billable size of the snapshot in
          gigabytes. Required.
        "tags": [
            "str"  # An array of Tags the snapshot has been tagged
              with.:code:`<br>`:code:`<br>`Requires ``tag:read`` scope. Required.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(volume_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List Snapshots for a Volume.

To retrieve the snapshots that have been created from a volume, send a GET request to /v2/volumes/$VOLUME_ID/snapshots.

Parameters:
  • volume_id (str) – The ID of the block storage volume. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "snapshots": [
        {
            "created_at": "2020-02-20 00:00:00",  # A time value given in
              ISO8601 combined date and time format that represents when the snapshot
              was created. Required.
            "min_disk_size": 0,  # The minimum size in GB required for a
              volume or Droplet to use this snapshot. Required.
            "name": "str",  # A human-readable name for the snapshot.
              Required.
            "regions": [
                "str"  # An array of the regions that the snapshot is
                  available in. The regions are represented by their identifying slug
                  values. Required.
            ],
            "resource_id": "str",  # The unique identifier for the
              resource that the snapshot originated from. Required.
            "resource_type": "str",  # The type of resource that the
              snapshot originated from. Required. Known values are: "droplet" and
              "volume".
            "size_gigabytes": 0.0,  # The billable size of the snapshot
              in gigabytes. Required.
            "tags": [
                "str"  # An array of Tags the snapshot has been
                  tagged with.:code:`<br>`:code:`<br>`Requires ``tag:read`` scope.
                  Required.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.VolumesOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s volumes attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New Block Storage Volume.

To create a new volume, send a POST request to /v2/volumes. Optionally, a filesystem_type attribute may be provided in order to automatically format the volume’s filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {}

# response body for status code(s): 201
response == {
    "volume": {
        "created_at": "str",  # Optional. A time value given in ISO8601
          combined date and time format that represents when the block storage volume
          was created.
        "description": "str",  # Optional. An optional free-form text field
          to describe a block storage volume.
        "droplet_ids": [
            0  # Optional. An array containing the IDs of the Droplets
              the volume is attached to. Note that at this time, a volume can only be
              attached to a single Droplet.
        ],
        "filesystem_label": "str",  # Optional. The label currently applied
          to the filesystem.
        "filesystem_type": "str",  # Optional. The type of filesystem
          currently in-use on the volume.
        "id": "str",  # Optional. The unique identifier for the block storage
          volume.
        "name": "str",  # Optional. A human-readable name for the block
          storage volume. Must be lowercase and be composed only of numbers, letters
          and "-", up to a limit of 64 characters. The name must begin with a letter.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "size_gigabytes": 0,  # Optional. The size of the block storage
          volume in GiB (1024^3). This field does not apply  when creating a volume
          from a snapshot.
        "tags": [
            "str"  # Optional. A flat array of tag names as strings
              applied to the resource. :code:`<br>`:code:`<br>`Requires ``tag:read``
              scope.
        ]
    }
}
# response body for status code(s): 400, 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(volume_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Block Storage Volume.

To delete a block storage volume, destroying all data and removing it from your account, send a DELETE request to /v2/volumes/$VOLUME_ID. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:

volume_id (str) – The ID of the block storage volume. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete_by_name(*, name: Optional[str] = None, region: Optional[str] = None, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a Block Storage Volume by Name.

Block storage volumes may also be deleted by name by sending a DELETE request with the volume’s name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.

Parameters:
  • name (str) – The block storage volume’s name. Default value is None.

  • region (str) – The slug identifier for the region where the resource is available. Known values are: “ams1”, “ams2”, “ams3”, “blr1”, “fra1”, “lon1”, “nyc1”, “nyc2”, “nyc3”, “sfo1”, “sfo2”, “sfo3”, “sgp1”, “tor1”, and “syd1”. Default value is None.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(volume_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing Block Storage Volume.

To show information about a block storage volume, send a GET request to /v2/volumes/$VOLUME_ID.

Parameters:

volume_id (str) – The ID of the block storage volume. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "volume": {
        "created_at": "str",  # Optional. A time value given in ISO8601
          combined date and time format that represents when the block storage volume
          was created.
        "description": "str",  # Optional. An optional free-form text field
          to describe a block storage volume.
        "droplet_ids": [
            0  # Optional. An array containing the IDs of the Droplets
              the volume is attached to. Note that at this time, a volume can only be
              attached to a single Droplet.
        ],
        "filesystem_label": "str",  # Optional. The label currently applied
          to the filesystem.
        "filesystem_type": "str",  # Optional. The type of filesystem
          currently in-use on the volume.
        "id": "str",  # Optional. The unique identifier for the block storage
          volume.
        "name": "str",  # Optional. A human-readable name for the block
          storage volume. Must be lowercase and be composed only of numbers, letters
          and "-", up to a limit of 64 characters. The name must begin with a letter.
        "region": {
            "available": bool,  # This is a boolean value that represents
              whether new Droplets can be created in this region. Required.
            "features": [
                "str"  # This attribute is set to an array which
                  contains features available in this region. Required.
            ],
            "name": "str",  # The display name of the region.  This will
              be a full name that is used in the control panel and other interfaces.
              Required.
            "sizes": [
                "str"  # This attribute is set to an array which
                  contains the identifying slugs for the sizes available in this
                  region. sizes:read is required to view. Required.
            ],
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "size_gigabytes": 0,  # Optional. The size of the block storage
          volume in GiB (1024^3). This field does not apply  when creating a volume
          from a snapshot.
        "tags": [
            "str"  # Optional. A flat array of tag names as strings
              applied to the resource. :code:`<br>`:code:`<br>`Requires ``tag:read``
              scope.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, name: Optional[str] = None, region: Optional[str] = None, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All Block Storage Volumes.

To list all of the block storage volumes available on your account, send a GET request to /v2/volumes.

Filtering Results

By Region

The region may be provided as query parameter in order to restrict results to volumes available in a specific region. For example: /v2/volumes?region=nyc1

By Name

It is also possible to list volumes on your account that match a specified name. To do so, send a GET request with the volume’s name as a query parameter to /v2/volumes?name=$VOLUME_NAME. Note: You can only create one volume per region with the same name.

By Name and Region

It is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume’s name and the region slug for the region it is located in as query parameters to /v2/volumes?name=$VOLUME_NAME&region=nyc1.

keyword name:

The block storage volume’s name. Default value is None.

paramtype name:

str

keyword region:

The slug identifier for the region where the resource is available. Known values are: “ams1”, “ams2”, “ams3”, “blr1”, “fra1”, “lon1”, “nyc1”, “nyc2”, “nyc3”, “sfo1”, “sfo2”, “sfo3”, “sgp1”, “tor1”, and “syd1”. Default value is None.

paramtype region:

str

keyword per_page:

Number of items returned per page. Default value is 20.

paramtype per_page:

int

keyword page:

Which ‘page’ of paginated results to return. Default value is 1.

paramtype page:

int

return:

JSON object

rtype:

JSON

raises ~azure.core.exceptions.HttpResponseError:

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "volumes": [
        {
            "created_at": "str",  # Optional. A time value given in
              ISO8601 combined date and time format that represents when the block
              storage volume was created.
            "description": "str",  # Optional. An optional free-form text
              field to describe a block storage volume.
            "droplet_ids": [
                0  # Optional. An array containing the IDs of the
                  Droplets the volume is attached to. Note that at this time, a volume
                  can only be attached to a single Droplet.
            ],
            "filesystem_label": "str",  # Optional. The label currently
              applied to the filesystem.
            "filesystem_type": "str",  # Optional. The type of filesystem
              currently in-use on the volume.
            "id": "str",  # Optional. The unique identifier for the block
              storage volume.
            "name": "str",  # Optional. A human-readable name for the
              block storage volume. Must be lowercase and be composed only of numbers,
              letters and "-", up to a limit of 64 characters. The name must begin with
              a letter.
            "region": {
                "available": bool,  # This is a boolean value that
                  represents whether new Droplets can be created in this region.
                  Required.
                "features": [
                    "str"  # This attribute is set to an array
                      which contains features available in this region. Required.
                ],
                "name": "str",  # The display name of the region.
                  This will be a full name that is used in the control panel and other
                  interfaces. Required.
                "sizes": [
                    "str"  # This attribute is set to an array
                      which contains the identifying slugs for the sizes available in
                      this region. sizes:read is required to view. Required.
                ],
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "size_gigabytes": 0,  # Optional. The size of the block
              storage volume in GiB (1024^3). This field does not apply  when creating
              a volume from a snapshot.
            "tags": [
                "str"  # Optional. A flat array of tag names as
                  strings applied to the resource. :code:`<br>`:code:`<br>`Requires
                  ``tag:read`` scope.
            ]
        }
    ],
    "links": {
        "pages": {}
    }
}
class pydo.operations.VpcPeeringsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s vpc_peerings attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New VPC Peering.

To create a new VPC Peering, send a POST request to /v2/vpc_peerings specifying a name and a list of two VPC IDs to peer. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # Optional. The name of the VPC peering. Must be unique
      within the team and may only contain alphanumeric characters and dashes.
    "vpc_ids": [
        "str"  # Optional. An array of the two peered VPCs IDs.
    ]
}

# response body for status code(s): 202
response == {
    "vpc_peering": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC peering.
        "name": "str",  # Optional. The name of the VPC peering. Must be
          unique within the team and may only contain alphanumeric characters and
          dashes.
        "status": "str",  # Optional. The current status of the VPC peering.
          Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
        "vpc_ids": [
            "str"  # Optional. An array of the two peered VPCs IDs.
        ]
    }
}
delete(vpc_peering_id: str, **kwargs: Any) MutableMapping[str, Any]

Delete a VPC peering.

To delete a VPC peering, send a DELETE request to /v2/vpc_peerings/$VPC_PEERING_ID.

Parameters:

vpc_peering_id (str) – A unique identifier for a VPC peering. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 202
response == {
    "vpc_peering": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC peering.
        "name": "str",  # Optional. The name of the VPC peering. Must be
          unique within the team and may only contain alphanumeric characters and
          dashes.
        "status": "str",  # Optional. The current status of the VPC peering.
          Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
        "vpc_ids": [
            "str"  # Optional. An array of the two peered VPCs IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(vpc_peering_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing VPC Peering.

To show information about an existing VPC Peering, send a GET request to /v2/vpc_peerings/$VPC_PEERING_ID.

Parameters:

vpc_peering_id (str) – A unique identifier for a VPC peering. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "vpc_peering": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC peering.
        "name": "str",  # Optional. The name of the VPC peering. Must be
          unique within the team and may only contain alphanumeric characters and
          dashes.
        "status": "str",  # Optional. The current status of the VPC peering.
          Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
        "vpc_ids": [
            "str"  # Optional. An array of the two peered VPCs IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, region: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All VPC Peerings.

To list all of the VPC peerings on your account, send a GET request to /v2/vpc_peerings.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • region (str) – The slug identifier for the region where the resource is available. Known values are: “ams1”, “ams2”, “ams3”, “blr1”, “fra1”, “lon1”, “nyc1”, “nyc2”, “nyc3”, “sfo1”, “sfo2”, “sfo3”, “sgp1”, “tor1”, and “syd1”. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "vpc_peerings": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the VPC peering.
            "name": "str",  # Optional. The name of the VPC peering. Must
              be unique within the team and may only contain alphanumeric characters
              and dashes.
            "status": "str",  # Optional. The current status of the VPC
              peering. Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
            "vpc_ids": [
                "str"  # Optional. An array of the two peered VPCs
                  IDs.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch(vpc_peering_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(vpc_peering_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a VPC peering.

To update the name of a VPC peering, send a PATCH request to /v2/vpc_peerings/$VPC_PEERING_ID with the new name in the request body.

Parameters:
  • vpc_peering_id (str) – A unique identifier for a VPC peering. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # Optional. The name of the VPC peering. Must be unique within
      the team and may only contain alphanumeric characters and dashes.
}

# response body for status code(s): 200
response == {
    "vpc_peering": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC peering.
        "name": "str",  # Optional. The name of the VPC peering. Must be
          unique within the team and may only contain alphanumeric characters and
          dashes.
        "status": "str",  # Optional. The current status of the VPC peering.
          Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
        "vpc_ids": [
            "str"  # Optional. An array of the two peered VPCs IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.VpcnatgatewaysOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s vpcnatgateways attribute.

create(body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New VPC NAT Gateway.

To create a new VPC NAT gateway, send a POST request to /v2/vpc_nat_gateways setting the required attributes.

The response body will contain a JSON object with a key called vpc_nat_gateway containing the standard attributes for the new VPC NAT gateway.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The human-readable name of the VPC NAT gateway. Required.
    "region": "str",  # The region in which the VPC NAT gateway is created.
      Required. Known values are: "nyc1", "nyc2", "nyc3", "ams2", "ams3", "sfo1",
      "sfo2", "sfo3", "sgp1", "lon1", "fra1", "tor1", "blr1", "syd1", and "atl1".
    "size": 0,  # The size of the VPC NAT gateway. Required.
    "type": "str",  # The type of the VPC NAT gateway. Required. "PUBLIC"
    "vpcs": [
        {
            "vpc_uuid": "str",  # The unique identifier of the VPC to
              which the NAT gateway is attached. Required.
            "default_gateway": bool  # Optional. The classification of
              the NAT gateway as the default egress route for the VPC traffic.
        }
    ],
    "icmp_timeout_seconds": 0,  # Optional. The ICMP timeout in seconds for the
      VPC NAT gateway.
    "tcp_timeout_seconds": 0,  # Optional. The TCP timeout in seconds for the VPC
      NAT gateway.
    "udp_timeout_seconds": 0  # Optional. The UDP timeout in seconds for the VPC
      NAT gateway.
}

# response body for status code(s): 202
response == {
    "vpc_nat_gateway": {
        "name": "str",  # The human-readable name of the VPC NAT gateway.
          Required.
        "region": "str",  # The region in which the VPC NAT gateway is
          created. Required. Known values are: "nyc1", "nyc2", "nyc3", "ams2", "ams3",
          "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1", "tor1", "blr1", "syd1", and
          "atl1".
        "size": 0,  # The size of the VPC NAT gateway. Required.
        "type": "str",  # The type of the VPC NAT gateway. Required. "PUBLIC"
        "vpcs": [
            {
                "vpc_uuid": "str",  # The unique identifier of the
                  VPC to which the NAT gateway is attached. Required.
                "default_gateway": bool  # Optional. The
                  classification of the NAT gateway as the default egress route for the
                  VPC traffic.
            }
        ],
        "icmp_timeout_seconds": 0,  # Optional. The ICMP timeout in seconds
          for the VPC NAT gateway.
        "tcp_timeout_seconds": 0,  # Optional. The TCP timeout in seconds for
          the VPC NAT gateway.
        "udp_timeout_seconds": 0  # Optional. The UDP timeout in seconds for
          the VPC NAT gateway.
    }
}
delete(id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete VPC NAT Gateway.

To destroy a VPC NAT Gateway, send a DELETE request to the /v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID endpoint.

A successful response will include a 202 response code and no content.

Parameters:

id (str) – The unique identifier of the VPC NAT gateway. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing VPC NAT Gateway.

To show information about an individual VPC NAT gateway, send a GET request to /v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID.

Parameters:

id (str) – The unique identifier of the VPC NAT gateway. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "vpc_nat_gateway": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the VPC NAT
          gateway was created.
        "egresses": {
            "public_gateways": [
                {
                    "ipv4": "str"  # Optional. IPv4 address of
                      the public gateway.
                }
            ]
        },
        "icmp_timeout_seconds": 0,  # Optional. The ICMP timeout in seconds
          for the VPC NAT gateway.
        "id": "str",  # Optional. The unique identifier for the VPC NAT
          gateway. This is automatically generated upon creation.
        "name": "str",  # Optional. The human-readable name of the VPC NAT
          gateway.
        "region": "str",  # Optional. The region in which the VPC NAT gateway
          is created. Known values are: "nyc1", "nyc2", "nyc3", "ams2", "ams3", "sfo1",
          "sfo2", "sfo3", "sgp1", "lon1", "fra1", "tor1", "blr1", "syd1", and "atl1".
        "size": 0,  # Optional. The size of the VPC NAT gateway.
        "state": "str",  # Optional. The current state of the VPC NAT
          gateway. Known values are: "NEW", "PROVISIONING", "ACTIVE", "DELETING",
          "ERROR", and "INVALID".
        "tcp_timeout_seconds": 0,  # Optional. The TCP timeout in seconds for
          the VPC NAT gateway.
        "type": "str",  # Optional. The type of the VPC NAT gateway. "PUBLIC"
        "udp_timeout_seconds": 0,  # Optional. The UDP timeout in seconds for
          the VPC NAT gateway.
        "updated_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format that represents when the VPC NAT
          gateway was last updated.
        "vpcs": [
            {
                "gateway_ip": "str",  # Optional. The gateway IP
                  address of the VPC NAT gateway.
                "vpc_uuid": "str"  # Optional. The unique identifier
                  of the VPC to which the NAT gateway is attached.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, state: Optional[str] = None, region: Optional[str] = None, type: Optional[str] = None, name: Optional[str] = None, **kwargs: Any) MutableMapping[str, Any]

List All VPC NAT Gateways.

To list all VPC NAT gateways in your team, send a GET request to /v2/vpc_nat_gateways. The response body will be a JSON object with a key of vpc_nat_gateways containing an array of VPC NAT gateway objects. These each contain the standard VPC NAT gateway attributes.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

  • state (str) – The current state of the VPC NAT gateway. Known values are: “new”, “provisioning”, “active”, “deleting”, “error”, and “invalid”. Default value is None.

  • region (str) – The region where the VPC NAT gateway is located. Known values are: “nyc1”, “nyc2”, “nyc3”, “ams2”, “ams3”, “sfo1”, “sfo2”, “sfo3”, “sgp1”, “lon1”, “fra1”, “tor1”, “blr1”, “syd1”, and “atl1”. Default value is None.

  • type (str) – The type of the VPC NAT gateway. “public” Default value is None.

  • name (str) – The name of the VPC NAT gateway. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "vpc_nat_gateways": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the VPC NAT gateway was created.
            "egresses": {
                "public_gateways": [
                    {
                        "ipv4": "str"  # Optional. IPv4
                          address of the public gateway.
                    }
                ]
            },
            "icmp_timeout_seconds": 0,  # Optional. The ICMP timeout in
              seconds for the VPC NAT gateway.
            "id": "str",  # Optional. The unique identifier for the VPC
              NAT gateway. This is automatically generated upon creation.
            "name": "str",  # Optional. The human-readable name of the
              VPC NAT gateway.
            "region": "str",  # Optional. The region in which the VPC NAT
              gateway is created. Known values are: "nyc1", "nyc2", "nyc3", "ams2",
              "ams3", "sfo1", "sfo2", "sfo3", "sgp1", "lon1", "fra1", "tor1", "blr1",
              "syd1", and "atl1".
            "size": 0,  # Optional. The size of the VPC NAT gateway.
            "state": "str",  # Optional. The current state of the VPC NAT
              gateway. Known values are: "NEW", "PROVISIONING", "ACTIVE", "DELETING",
              "ERROR", and "INVALID".
            "tcp_timeout_seconds": 0,  # Optional. The TCP timeout in
              seconds for the VPC NAT gateway.
            "type": "str",  # Optional. The type of the VPC NAT gateway.
              "PUBLIC"
            "udp_timeout_seconds": 0,  # Optional. The UDP timeout in
              seconds for the VPC NAT gateway.
            "updated_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format that represents when
              the VPC NAT gateway was last updated.
            "vpcs": [
                {
                    "gateway_ip": "str",  # Optional. The gateway
                      IP address of the VPC NAT gateway.
                    "vpc_uuid": "str"  # Optional. The unique
                      identifier of the VPC to which the NAT gateway is attached.
                }
            ]
        }
    ]
}
update(id: str, body: Optional[JSON] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(id: str, body: Optional[IO[bytes]] = None, *, content_type: str = 'application/json', **kwargs: Any) JSON

Update VPC NAT Gateway.

To update the configuration of an existing VPC NAT Gateway, send a PUT request to /v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID. The request must contain a full representation of the VPC NAT Gateway including existing attributes.

Parameters:
  • id (str) – The unique identifier of the VPC NAT gateway. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The human-readable name of the VPC NAT gateway. Required.
    "size": 0,  # The size of the VPC NAT gateway. Required.
    "icmp_timeout_seconds": 0,  # Optional. The ICMP timeout in seconds for the
      VPC NAT gateway.
    "tcp_timeout_seconds": 0,  # Optional. The TCP timeout in seconds for the VPC
      NAT gateway.
    "udp_timeout_seconds": 0,  # Optional. The UDP timeout in seconds for the VPC
      NAT gateway.
    "vpcs": [
        {
            "default_gateway": bool,  # Optional. The classification of
              the NAT gateway as the default egress route for the VPC traffic.
            "vpc_uuid": "str"  # Optional. The unique identifier of the
              VPC to which the NAT gateway is attached.
        }
    ]
}

# response body for status code(s): 200
response == {
    "vpc_nat_gateway": {
        "name": "str",  # The human-readable name of the VPC NAT gateway.
          Required.
        "size": 0,  # The size of the VPC NAT gateway. Required.
        "icmp_timeout_seconds": 0,  # Optional. The ICMP timeout in seconds
          for the VPC NAT gateway.
        "tcp_timeout_seconds": 0,  # Optional. The TCP timeout in seconds for
          the VPC NAT gateway.
        "udp_timeout_seconds": 0,  # Optional. The UDP timeout in seconds for
          the VPC NAT gateway.
        "vpcs": [
            {
                "default_gateway": bool,  # Optional. The
                  classification of the NAT gateway as the default egress route for the
                  VPC traffic.
                "vpc_uuid": "str"  # Optional. The unique identifier
                  of the VPC to which the NAT gateway is attached.
            }
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
class pydo.operations.VpcsOperations(*args, **kwargs)

Bases: object

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through GeneratedClient’s vpcs attribute.

create(body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create(body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a New VPC.

To create a VPC, send a POST request to /v2/vpcs specifying the attributes in the table below in the JSON body.

Note: If you do not currently have a VPC network in a specific datacenter region, the first one that you create will be set as the default for that region. The default VPC for a region cannot be changed or deleted.

Parameters:

body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "description": "str",  # Optional. A free-form text field for describing the
      VPC's purpose. It may be a maximum of 255 characters.
    "ip_range": "str",  # Optional. The range of IP addresses in the VPC in CIDR
      notation. Network ranges cannot overlap with other networks in the same account
      and must be in range of private addresses as defined in RFC1918. It may not be
      smaller than ``/28`` nor larger than ``/16``. If no IP range is specified, a
      ``/20`` network range is generated that won't conflict with other VPC networks in
      your account.
    "name": "str",  # Optional. The name of the VPC. Must be unique and may only
      contain alphanumeric characters, dashes, and periods.
    "region": "str"  # Optional. The slug identifier for the region where the VPC
      will be created.
}

# response body for status code(s): 201
response == {
    "vpc": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "default": bool,  # Optional. A boolean value indicating whether or
          not the VPC is the default network for the region. All applicable resources
          are placed into the default VPC network unless otherwise specified during
          their creation. The ``default`` field cannot be unset from ``true``. If you
          want to set a new default VPC network, update the ``default`` field of
          another VPC network in the same region. The previous network's ``default``
          field will be set to ``false`` when a new default VPC has been defined.
        "description": "str",  # Optional. A free-form text field for
          describing the VPC's purpose. It may be a maximum of 255 characters.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC.
        "ip_range": "str",  # Optional. The range of IP addresses in the VPC
          in CIDR notation. Network ranges cannot overlap with other networks in the
          same account and must be in range of private addresses as defined in RFC1918.
          It may not be smaller than ``/28`` nor larger than ``/16``. If no IP range is
          specified, a ``/20`` network range is generated that won't conflict with
          other VPC networks in your account.
        "name": "str",  # Optional. The name of the VPC. Must be unique and
          may only contain alphanumeric characters, dashes, and periods.
        "region": "str",  # Optional. The slug identifier for the region
          where the VPC will be created.
        "urn": "str"  # Optional. The uniform resource name (URN) for the
          resource in the format do:resource_type:resource_id.
    }
}
create_peerings(vpc_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_peerings(vpc_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Create a Peering with a VPC.

To create a new VPC peering for a given VPC, send a POST request to /v2/vpcs/$VPC_ID/peerings.

Parameters:
  • vpc_id (str) – A unique identifier for a VPC. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str",  # The name of the VPC peering. Must be unique and may only
      contain alphanumeric characters, dashes, and periods. Required.
    "vpc_id": "str"  # The ID of the VPC to peer with. Required.
}

# response body for status code(s): 202
response == {
    "peering": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC peering.
        "name": "str",  # Optional. The name of the VPC peering. Must be
          unique within the team and may only contain alphanumeric characters and
          dashes.
        "status": "str",  # Optional. The current status of the VPC peering.
          Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
        "vpc_ids": [
            "str"  # Optional. An array of the two peered VPCs IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
delete(vpc_id: str, **kwargs: Any) Optional[MutableMapping[str, Any]]

Delete a VPC.

To delete a VPC, send a DELETE request to /v2/vpcs/$VPC_ID. A 204 status code with no body will be returned in response to a successful request.

The default VPC for a region can not be deleted. Additionally, a VPC can only be deleted if it does not contain any member resources. Attempting to delete a region’s default VPC or a VPC that still has members will result in a 403 Forbidden error response.

Parameters:

vpc_id (str) – A unique identifier for a VPC. Required.

Returns:

JSON object or None

Return type:

JSON or None

Raises:

HttpResponseError

Example:
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
get(vpc_id: str, **kwargs: Any) MutableMapping[str, Any]

Retrieve an Existing VPC.

To show information about an existing VPC, send a GET request to /v2/vpcs/$VPC_ID.

Parameters:

vpc_id (str) – A unique identifier for a VPC. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "vpc": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "default": bool,  # Optional. A boolean value indicating whether or
          not the VPC is the default network for the region. All applicable resources
          are placed into the default VPC network unless otherwise specified during
          their creation. The ``default`` field cannot be unset from ``true``. If you
          want to set a new default VPC network, update the ``default`` field of
          another VPC network in the same region. The previous network's ``default``
          field will be set to ``false`` when a new default VPC has been defined.
        "description": "str",  # Optional. A free-form text field for
          describing the VPC's purpose. It may be a maximum of 255 characters.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC.
        "ip_range": "str",  # Optional. The range of IP addresses in the VPC
          in CIDR notation. Network ranges cannot overlap with other networks in the
          same account and must be in range of private addresses as defined in RFC1918.
          It may not be smaller than ``/28`` nor larger than ``/16``. If no IP range is
          specified, a ``/20`` network range is generated that won't conflict with
          other VPC networks in your account.
        "name": "str",  # Optional. The name of the VPC. Must be unique and
          may only contain alphanumeric characters, dashes, and periods.
        "region": "str",  # Optional. The slug identifier for the region
          where the VPC will be created.
        "urn": "str"  # Optional. The uniform resource name (URN) for the
          resource in the format do:resource_type:resource_id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list(*, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List All VPCs.

To list all of the VPCs on your account, send a GET request to /v2/vpcs.

Parameters:
  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "vpcs": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format.
            "default": bool,  # Optional. A boolean value indicating
              whether or not the VPC is the default network for the region. All
              applicable resources are placed into the default VPC network unless
              otherwise specified during their creation. The ``default`` field cannot
              be unset from ``true``. If you want to set a new default VPC network,
              update the ``default`` field of another VPC network in the same region.
              The previous network's ``default`` field will be set to ``false`` when a
              new default VPC has been defined.
            "description": "str",  # Optional. A free-form text field for
              describing the VPC's purpose. It may be a maximum of 255 characters.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the VPC.
            "ip_range": "str",  # Optional. The range of IP addresses in
              the VPC in CIDR notation. Network ranges cannot overlap with other
              networks in the same account and must be in range of private addresses as
              defined in RFC1918. It may not be smaller than ``/28`` nor larger than
              ``/16``. If no IP range is specified, a ``/20`` network range is
              generated that won't conflict with other VPC networks in your account.
            "name": "str",  # Optional. The name of the VPC. Must be
              unique and may only contain alphanumeric characters, dashes, and periods.
            "region": "str",  # Optional. The slug identifier for the
              region where the VPC will be created.
            "urn": "str"  # Optional. The uniform resource name (URN) for
              the resource in the format do:resource_type:resource_id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_members(vpc_id: str, *, resource_type: Optional[str] = None, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List the Member Resources of a VPC.

To list all of the resources that are members of a VPC, send a GET request to /v2/vpcs/$VPC_ID/members.

To only list resources of a specific type that are members of the VPC, included a resource_type query parameter. For example, to only list Droplets in the VPC, send a GET request to /v2/vpcs/$VPC_ID/members?resource_type=droplet.

Only resources that you are authorized to see will be returned (e.g. to see Droplets, you must have droplet:read).

Parameters:
  • vpc_id (str) – A unique identifier for a VPC. Required.

  • resource_type (str) – Used to filter VPC members by a resource type. Default value is None.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "members": [
        {
            "created_at": "str",  # Optional. A time value given in
              ISO8601 combined date and time format that represents when the resource
              was created.
            "name": "str",  # Optional. The name of the resource.
            "urn": "str"  # Optional. The uniform resource name (URN) for
              the resource in the format do:resource_type:resource_id.
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
list_peerings(vpc_id: str, *, per_page: int = 20, page: int = 1, **kwargs: Any) MutableMapping[str, Any]

List the Peerings of a VPC.

To list all of a VPC’s peerings, send a GET request to /v2/vpcs/$VPC_ID/peerings.

Parameters:
  • vpc_id (str) – A unique identifier for a VPC. Required.

  • per_page (int) – Number of items returned per page. Default value is 20.

  • page (int) – Which ‘page’ of paginated results to return. Default value is 1.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    },
    "links": {
        "pages": {}
    },
    "peerings": [
        {
            "created_at": "2020-02-20 00:00:00",  # Optional. A time
              value given in ISO8601 combined date and time format.
            "id": "str",  # Optional. A unique ID that can be used to
              identify and reference the VPC peering.
            "name": "str",  # Optional. The name of the VPC peering. Must
              be unique within the team and may only contain alphanumeric characters
              and dashes.
            "status": "str",  # Optional. The current status of the VPC
              peering. Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
            "vpc_ids": [
                "str"  # Optional. An array of the two peered VPCs
                  IDs.
            ]
        }
    ]
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch(vpc_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch(vpc_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Partially Update a VPC.

To update a subset of information about a VPC, send a PATCH request to /v2/vpcs/$VPC_ID.

Parameters:
  • vpc_id (str) – A unique identifier for a VPC. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "default": bool,  # Optional. A boolean value indicating whether or not the
      VPC is the default network for the region. All applicable resources are placed
      into the default VPC network unless otherwise specified during their creation.
      The ``default`` field cannot be unset from ``true``. If you want to set a new
      default VPC network, update the ``default`` field of another VPC network in the
      same region. The previous network's ``default`` field will be set to ``false``
      when a new default VPC has been defined.
    "description": "str",  # Optional. A free-form text field for describing the
      VPC's purpose. It may be a maximum of 255 characters.
    "name": "str"  # Optional. The name of the VPC. Must be unique and may only
      contain alphanumeric characters, dashes, and periods.
}

# response body for status code(s): 200
response == {
    "vpc": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "default": bool,  # Optional. A boolean value indicating whether or
          not the VPC is the default network for the region. All applicable resources
          are placed into the default VPC network unless otherwise specified during
          their creation. The ``default`` field cannot be unset from ``true``. If you
          want to set a new default VPC network, update the ``default`` field of
          another VPC network in the same region. The previous network's ``default``
          field will be set to ``false`` when a new default VPC has been defined.
        "description": "str",  # Optional. A free-form text field for
          describing the VPC's purpose. It may be a maximum of 255 characters.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC.
        "ip_range": "str",  # Optional. The range of IP addresses in the VPC
          in CIDR notation. Network ranges cannot overlap with other networks in the
          same account and must be in range of private addresses as defined in RFC1918.
          It may not be smaller than ``/28`` nor larger than ``/16``. If no IP range is
          specified, a ``/20`` network range is generated that won't conflict with
          other VPC networks in your account.
        "name": "str",  # Optional. The name of the VPC. Must be unique and
          may only contain alphanumeric characters, dashes, and periods.
        "region": "str",  # Optional. The slug identifier for the region
          where the VPC will be created.
        "urn": "str"  # Optional. The uniform resource name (URN) for the
          resource in the format do:resource_type:resource_id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
patch_peerings(vpc_id: str, vpc_peering_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
patch_peerings(vpc_id: str, vpc_peering_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a VPC Peering.

To update the name of a VPC peering in a particular VPC, send a PATCH request to /v2/vpcs/$VPC_ID/peerings/$VPC_PEERING_ID with the new name in the request body.

Parameters:
  • vpc_id (str) – A unique identifier for a VPC. Required.

  • vpc_peering_id (str) – A unique identifier for a VPC peering. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "name": "str"  # Optional. The name of the VPC peering. Must be unique within
      the team and may only contain alphanumeric characters and dashes.
}

# response body for status code(s): 200
response == {
    "peering": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC peering.
        "name": "str",  # Optional. The name of the VPC peering. Must be
          unique within the team and may only contain alphanumeric characters and
          dashes.
        "status": "str",  # Optional. The current status of the VPC peering.
          Known values are: "PROVISIONING", "ACTIVE", and "DELETING".
        "vpc_ids": [
            "str"  # Optional. An array of the two peered VPCs IDs.
        ]
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}
update(vpc_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
update(vpc_id: str, body: IO[bytes], *, content_type: str = 'application/json', **kwargs: Any) JSON

Update a VPC.

To update information about a VPC, send a PUT request to /v2/vpcs/$VPC_ID.

Parameters:
  • vpc_id (str) – A unique identifier for a VPC. Required.

  • body (JSON or IO[bytes]) – Is either a JSON type or a IO[bytes] type. Required.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# JSON input template you can fill out and use as your body input.
body = {
    "default": bool,  # Optional. A boolean value indicating whether or not the
      VPC is the default network for the region. All applicable resources are placed
      into the default VPC network unless otherwise specified during their creation.
      The ``default`` field cannot be unset from ``true``. If you want to set a new
      default VPC network, update the ``default`` field of another VPC network in the
      same region. The previous network's ``default`` field will be set to ``false``
      when a new default VPC has been defined.
    "description": "str",  # Optional. A free-form text field for describing the
      VPC's purpose. It may be a maximum of 255 characters.
    "name": "str"  # Optional. The name of the VPC. Must be unique and may only
      contain alphanumeric characters, dashes, and periods.
}

# response body for status code(s): 200
response == {
    "vpc": {
        "created_at": "2020-02-20 00:00:00",  # Optional. A time value given
          in ISO8601 combined date and time format.
        "default": bool,  # Optional. A boolean value indicating whether or
          not the VPC is the default network for the region. All applicable resources
          are placed into the default VPC network unless otherwise specified during
          their creation. The ``default`` field cannot be unset from ``true``. If you
          want to set a new default VPC network, update the ``default`` field of
          another VPC network in the same region. The previous network's ``default``
          field will be set to ``false`` when a new default VPC has been defined.
        "description": "str",  # Optional. A free-form text field for
          describing the VPC's purpose. It may be a maximum of 255 characters.
        "id": "str",  # Optional. A unique ID that can be used to identify
          and reference the VPC.
        "ip_range": "str",  # Optional. The range of IP addresses in the VPC
          in CIDR notation. Network ranges cannot overlap with other networks in the
          same account and must be in range of private addresses as defined in RFC1918.
          It may not be smaller than ``/28`` nor larger than ``/16``. If no IP range is
          specified, a ``/20`` network range is generated that won't conflict with
          other VPC networks in your account.
        "name": "str",  # Optional. The name of the VPC. Must be unique and
          may only contain alphanumeric characters, dashes, and periods.
        "region": "str",  # Optional. The slug identifier for the region
          where the VPC will be created.
        "urn": "str"  # Optional. The uniform resource name (URN) for the
          resource in the format do:resource_type:resource_id.
    }
}
# response body for status code(s): 404
response == {
    "id": "str",  # A short identifier corresponding to the HTTP status code
      returned. For  example, the ID for a response returning a 404 status code would
      be "not_found.". Required.
    "message": "str",  # A message providing additional information about the
      error, including  details to help resolve it when possible. Required.
    "request_id": "str"  # Optional. Optionally, some endpoints may include a
      request ID that should be  provided when reporting bugs or opening support
      tickets to help  identify the issue.
}