PyDo — DigitalOcean’s Python library

pydo is a Python client library for DigitalOceans’s HTTP API.

Installation

Install from PyPI:

pip install pydo

Initialization

pydo must be initialized with pydo.client(). A DigitalOcean API Token is required. The token can be passed explicitly to pydo.client() or defined as environment variables DIGITALOCEAN_TOKEN.

Here’s an example of initializing the PyDo Client:

from pydo import Client

client = Client(token="<DIGITALOCEAN_TOKEN>")
pydo.Client(token: str, *, timeout: int = 120, **kwargs)

The official DigitalOcean Python client

Parameters:

Example

Find below a working example for GET a ssh_key (per this http request) and printing the ID associated with the ssh key. If you’d like to try out this quick example, you can follow these instructions to add ssh keys to your DO account:

from pydo import Client

client = Client(token="<YOUR-API-TOKEN>")

ssh_keys_resp = client.ssh_keys.list()
for k in ssh_keys_resp["ssh_keys"]:
   print(f"ID: {k['id']}, NAME: {k['name']}, FINGERPRINT: {k['fingerprint']}")

The above code snippet should output the following:

ID: 123456, NAME: my_test_ssh_key, FINGERPRINT: 5c:74:7e:60:28:69:34:ca:dd:74:67:c3:f3:00:7f:fe
ID: 123457, NAME: my_prod_ssh_key, FINGERPRINT: eb:76:c7:2a:d3:3e:80:5d:ef:2e:ca:86:d7:79:94:0d

You can find a more thorough example of using the PyDo client here. The example walks through the process of creating a droplet with a specified ssh key, creating a volume, and then attaching the volume to the droplet.

Pagination

Below is an example on handling pagination. One must parse the URL to find the next page:

resp = self.client.ssh_keys.list(per_page=50, page=page)
pages = resp.links.pages
   if 'next' in pages.keys():
         parsed_url = urlparse(pages['next'])
         page = parse_qs(parsed_url.query)['page'][0]
   else:
         paginated = False

pydo.Client Usage

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. 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. Required.
        "name": "str",  # Optional. The display name for the current user.
        "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.
        "team": {
            "name": "str",  # Optional. The name for the current team.
            "uuid": "str"  # Optional. The unique universal identifier
              for the current team.
        },
        "uuid": "str"  # The unique universal identifier for the current
          user. Required.
    }
}
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": {},  # 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": {},  # This attribute is set to an array which
              contains the identifying slugs for the sizes available in this region.
              Required.
            "slug": "str"  # A human-readable string that is used as a
              unique identifier for each region. Required.
        },
        "region_slug": {},  # Optional. Any object.
        "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 == {
    "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": {},  # 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": {},  # This attribute is set to an array
                  which contains the identifying slugs for the sizes available in this
                  region. Required.
                "slug": "str"  # A human-readable string that is used
                  as a unique identifier for each region. Required.
            },
            "region_slug": {},  # Optional. Any object.
            "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": {}
    },
    "meta": {
        "total": 0  # Optional. Number of objects returned by the request.
    }
}
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, *, 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) – Is either a model type or a IO type. Required.

  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# 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",
              "FUNCTIONS_ACTIVATION_COUNT", "FUNCTIONS_AVERAGE_DURATION_MS",
              "FUNCTIONS_ERROR_RATE_PER_MINUTE", "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
              "FUNCTIONS_ERROR_COUNT", and "FUNCTIONS_GB_RATE_PER_SECOND".
            "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:"n"n``message_base`` = "Building
                      service""n``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:"n"n``message_base`` = "Building
                      service""n``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": {
            "databases": [
                {
                    "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"n* PG: PostgreSQL"n* REDIS: Redis.
                      Known values are: "UNSET", "MYSQL", "PG", and "REDIS".
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould be
                      ``domain.com``.
                }
            ],
            "functions": [
                {
                    "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",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", and
                              "FUNCTIONS_GB_RATE_PER_SECOND".
                            "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".
                        }
                    ],
                    "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.
                                "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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                                    "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": {
                            "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": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY: Indicates a job
                      that runs before an app deployment."n* POST_DEPLOY: Indicates a
                      job that runs after an app deployment."n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ],
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon", and
              "syd".
            "services": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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"nIf 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                }
            ],
            "static_sites": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                              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.
                }
            ],
            "workers": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ]
        },
        "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.
}
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, *, 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) – Is either a model type or a IO type. Required.

  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

Returns:

JSON object

Return type:

JSON

Raises:

HttpResponseError

Example:
# response body for status code(s): 200
response == {
    "app": {
        "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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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.
        "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould 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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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. The ID of the project the app is
          assigned to. This will be empty if there is a lookup failure.
        "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.
        },
        "spec": {
            "databases": [
                {
                    "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"n* PG: PostgreSQL"n* REDIS: Redis.
                      Known values are: "UNSET", "MYSQL", "PG", and "REDIS".
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould be
                      ``domain.com``.
                }
            ],
            "functions": [
                {
                    "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",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", and
                              "FUNCTIONS_GB_RATE_PER_SECOND".
                            "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".
                        }
                    ],
                    "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.
                                "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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                                    "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": {
                            "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": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY: Indicates a job
                      that runs before an app deployment."n* POST_DEPLOY: Indicates a
                      job that runs after an app deployment."n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ],
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon", and
              "syd".
            "services": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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"nIf 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                }
            ],
            "static_sites": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                              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.
                }
            ],
            "workers": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ]
        },
        "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.
    }
}
create_deployment(app_id: str, body: JSON, *, content_type: str = 'application/json', **kwargs: Any) JSON
create_deployment(app_id: str, body: IO, *, 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) – Is either a model type or a IO type. Required.

  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

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:"n"n``message_base`` = "Building
                      service""n``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:"n"n``message_base`` = "Building
                      service""n``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": {
            "databases": [
                {
                    "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"n* PG: PostgreSQL"n* REDIS: Redis.
                      Known values are: "UNSET", "MYSQL", "PG", and "REDIS".
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould be
                      ``domain.com``.
                }
            ],
            "functions": [
                {
                    "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",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", and
                              "FUNCTIONS_GB_RATE_PER_SECOND".
                            "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".
                        }
                    ],
                    "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.
                                "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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                                    "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": {
                            "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": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY: Indicates a job
                      that runs before an app deployment."n* POST_DEPLOY: Indicates a
                      job that runs after an app deployment."n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ],
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon", and
              "syd".
            "services": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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"nIf 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                }
            ],
            "static_sites": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                              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.
                }
            ],
            "workers": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ]
        },
        "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, *, 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) – Is either a model type or a IO type. Required.

  • content_type (str) – Body Parameter content-type. Known values are: ‘application/json’. Default value is None.

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:"n"n``message_base`` = "Building
                      service""n``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:"n"n``message_base`` = "Building
                      service""n``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": {
            "databases": [
                {
                    "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"n* PG: PostgreSQL"n* REDIS: Redis.
                      Known values are: "UNSET", "MYSQL", "PG", and "REDIS".
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould be
                      ``domain.com``.
                }
            ],
            "functions": [
                {
                    "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",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", and
                              "FUNCTIONS_GB_RATE_PER_SECOND".
                            "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".
                        }
                    ],
                    "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.
                                "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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                                    "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": {
                            "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": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "kind": "UNSPECIFIED",  # Optional. Default
                      value is "UNSPECIFIED". * UNSPECIFIED: Default job type, will
                      auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY: Indicates a job
                      that runs before an app deployment."n* POST_DEPLOY: Indicates a
                      job that runs after an app deployment."n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ],
            "name": "str",  # The name of the app. Must be unique across
              all apps in the same account. Required.
            "region": "str",  # Optional. The slug form of the
              geographical origin of the app. Default: ``nearest available``. Known
              values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon", and
              "syd".
            "services": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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"nIf 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "internal_ports": [
                        0  # Optional. The ports on which
                          this service will listen for internal traffic.
                    ],
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # Optional. The name. Must be
                      unique across all components within the same app.
                    "routes": [
                        {
                            "path": "str",  # Optional.
                              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.
                }
            ],
            "static_sites": [
                {
                    "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.
                                "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                              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.
                }
            ],
            "workers": [
                {
                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "registry": "str",  # Optional. The
                          registry name. Must be left empty for the ``DOCR`` registry
                          type.
                        "registry_type": "str",  # Optional.
                          * DOCKER_HUB: The DockerHub container registry type."n* DOCR:
                          The DigitalOcean container registry type. Known values are:
                          "DOCKER_HUB" and "DOCR".
                        "repository": "str",  # Optional. The
                          repository name.
                        "tag": "latest"  # Optional. Default
                          value is "latest". The repository tag. Defaults to ``latest``
                          if not provided.
                    },
                    "instance_count": 1,  # Optional. Default
                      value is 1. The amount of instances that this component should be
                      scaled to. Default: 1.
                    "instance_size_slug": "basic-xxs",  #
                      Optional. Default value is "basic-xxs". The instance size to use
                      for this component. Default: ``basic-xxs``. Known values are:
                      "basic-xxs", "basic-xs", "basic-s", "basic-m", "professional-xs",
                      "professional-s", "professional-m", "professional-1l",
                      "professional-l", and "professional-xl".
                    "log_destinations": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "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.
                }
            ]
        },
        "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": {
        "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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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.
        "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould 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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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:"n"n``message_base`` = "Building
                          service""n``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:"n"n``message_base`` = "Building
                          service""n``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": {
                "databases": [
                    {
                        "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"n* PG: PostgreSQL"n*
                          REDIS: Redis. Known values are: "UNSET", "MYSQL", "PG", and
                          "REDIS".
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "production": bool,  # Optional.
                          Whether this is a production or dev database.
                        "version": "str"  # Optional. The
                          version of the database engine.
                    }
                ],
                "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"n*
                          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."n*
                          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"nPlatform to automatically manage it for you, set this to
                          the name of the"ndomain on your account."n"nFor example, If
                          the domain you are adding is ``app.domain.com``"" , the
                          zone"ncould be ``domain.com``.
                    }
                ],
                "functions": [
                    {
                        "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",
                                  "FUNCTIONS_ACTIVATION_COUNT",
                                  "FUNCTIONS_AVERAGE_DURATION_MS",
                                  "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                                  "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                                  "FUNCTIONS_ERROR_COUNT", and
                                  "FUNCTIONS_GB_RATE_PER_SECOND".
                                "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".
                            }
                        ],
                        "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.
                                    "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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # The name. Must be
                          unique across all components within the same app. Required.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
"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": {
                                "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": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "kind": "UNSPECIFIED",  # Optional.
                          Default value is "UNSPECIFIED". * UNSPECIFIED: Default job
                          type, will auto-complete to POST_DEPLOY kind."n* PRE_DEPLOY:
                          Indicates a job that runs before an app deployment."n*
                          POST_DEPLOY: Indicates a job that runs after an app
                          deployment."n* 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ],
                "name": "str",  # The name of the app. Must be unique
                  across all apps in the same account. Required.
                "region": "str",  # Optional. The slug form of the
                  geographical origin of the app. Default: ``nearest available``. Known
                  values are: "ams", "nyc", "fra", "sfo", "sgp", "blr", "tor", "lon",
                  and "syd".
                "services": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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"nIf 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "internal_ports": [
                            0  # Optional. The ports on
                              which this service will listen for internal traffic.
                        ],
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "papertrail": {
                                "endpoint": "str"  #
                                  Papertrail syslog endpoint. Required.
                            }
                        },
                        "name": "str",  # Optional. The name.
                          Must be unique across all components within the same app.
                        "routes": [
                            {
                                "path": "str",  #
                                  Optional. 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.
                    }
                ],
                "static_sites": [
                    {
                        "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.
                                    "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not 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": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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. 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.
                    }
                ],
                "workers": [
                    {
                        "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://www.digitalocean.com/docs/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"n* BUILD_TIME: Made available only at
                                  build-time"n* 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"n* 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": {
                            "registry": "str",  #
                              Optional. The registry name. Must be left empty for the
                              ``DOCR`` registry type.
                            "registry_type": "str",  #
                              Optional. * DOCKER_HUB: The DockerHub container registry
                              type."n* DOCR: The DigitalOcean container registry type.
                              Known values are: "DOCKER_HUB" and "DOCR".
                            "repository": "str",  #
                              Optional. The repository name.
                            "tag": "latest"  # Optional.
                              Default value is "latest". The repository tag. Defaults
                              to ``latest`` if not provided.
                        },
                        "instance_count": 1,  # Optional.
                          Default value is 1. The amount of instances that this
                          component should be scaled to. Default: 1.
                        "instance_size_slug": "basic-xxs",  #
                          Optional. Default value is "basic-xxs". The instance size to
                          use for this component. Default: ``basic-xxs``. Known values
                          are: "basic-xxs", "basic-xs", "basic-s", "basic-m",
                          "professional-xs", "professional-s", "professional-m",
                          "professional-1l", "professional-l", and "professional-xl".
                        "log_destinations": {
                            "datadog": {
                                "api_key": "str",  #
                                  Datadog API key. Required.
                                "endpoint": "str"  #
                                  Optional. Datadog HTTP log intake endpoint.
                            },
                            "logtail": {
                                "token": "str"  #
                                  Optional. Logtail token.
                            },
                            "name": "str",  # Required.
                            "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.
                    }
                ]
            },
            "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. The ID of the project the app is
          assigned to. This will be empty if there is a lookup failure.
        "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.
        },
        "spec": {
            "databases": [
                {
                    "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"n* PG: PostgreSQL"n* REDIS: Redis.
                      Known values are: "UNSET", "MYSQL", "PG", and "REDIS".
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.
                    "production": bool,  # Optional. Whether this
                      is a production or dev database.
                    "version": "str"  # Optional. The version of
                      the database engine.
                }
            ],
            "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"n* 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."n* 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"nPlatform to
                      automatically manage it for you, set this to the name of
                      the"ndomain on your account."n"nFor example, If the domain you
                      are adding is ``app.domain.com``"" , the zone"ncould be
                      ``domain.com``.
                }
            ],
            "functions": [
                {
                    "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",
                              "FUNCTIONS_ACTIVATION_COUNT",
                              "FUNCTIONS_AVERAGE_DURATION_MS",
                              "FUNCTIONS_ERROR_RATE_PER_MINUTE",
                              "FUNCTIONS_AVERAGE_WAIT_TIME_MS",
                              "FUNCTIONS_ERROR_COUNT", and
                              "FUNCTIONS_GB_RATE_PER_SECOND".
                            "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".
                        }
                    ],
                    "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.
                                "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"n* BUILD_TIME: Made available only at
                              build-time"n* 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"n* 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": {
                        "datadog": {
                            "api_key": "str",  # Datadog
                              API key. Required.
                            "endpoint": "str"  #
                              Optional. Datadog HTTP log intake endpoint.
                        },
                        "logtail": {
                            "token": "str"  # Optional.
                              Logtail token.
                        },
                        "name": "str",  # Required.
                        "papertrail": {
                            "endpoint": "str"  #
                              Papertrail syslog endpoint. Required.
                        }
                    },
                    "name": "str",  # The name. Must be unique
                      across all components within the same app. Required.