Skip to main content

AppSpecServicesItem

Struct AppSpecServicesItem 

Source
pub struct AppSpecServicesItem {
Show 24 fields pub autoscaling: Option<AppSpecServicesItemAutoscaling>, pub bitbucket: Option<AppSpecServicesItemBitbucket>, pub build_command: Option<String>, pub cors: Option<AppSpecServicesItemCors>, pub dockerfile_path: Option<String>, pub environment_slug: Option<String>, pub envs: Vec<AppSpecServicesItemEnvsItem>, pub git: Option<AppSpecServicesItemGit>, pub github: Option<AppSpecServicesItemGithub>, pub gitlab: Option<AppSpecServicesItemGitlab>, pub health_check: Option<AppSpecServicesItemHealthCheck>, pub http_port: Option<NonZeroU64>, pub image: Option<AppSpecServicesItemImage>, pub instance_count: NonZeroU64, pub instance_size_slug: Option<AppSpecServicesItemInstanceSizeSlug>, pub internal_ports: Vec<i64>, pub liveness_health_check: Option<AppSpecServicesItemLivenessHealthCheck>, pub log_destinations: Vec<ConfigurationsForExternalLogging>, pub name: AppSpecServicesItemName, pub protocol: Option<AppSpecServicesItemProtocol>, pub routes: Vec<ACriterionForRoutingHttpTrafficToAComponent>, pub run_command: Option<String>, pub source_dir: Option<String>, pub termination: Option<AppSpecServicesItemTermination>,
}
Expand description

AppSpecServicesItem

JSON schema
{
 "allOf": [
   {
     "type": "object",
     "properties": {
       "bitbucket": {
         "type": "object",
         "properties": {
           "branch": {
             "description": "The name of the branch to use",
             "examples": [
               "main"
             ],
             "type": "string"
           },
           "deploy_on_push": {
             "description": "Whether to automatically deploy new commits made to the repo",
             "examples": [
               true
             ],
             "type": "boolean"
           },
           "repo": {
             "description": "The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang`",
             "examples": [
               "digitalocean/sample-golang"
             ],
             "type": "string"
           }
         }
       },
       "build_command": {
         "description": "An optional build command to run while building this component from source.",
         "examples": [
           "npm run build"
         ],
         "type": "string"
       },
       "dockerfile_path": {
         "description": "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.",
         "examples": [
           "path/to/Dockerfile"
         ],
         "type": "string"
       },
       "environment_slug": {
         "description": "An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/).",
         "examples": [
           "node-js"
         ],
         "type": "string"
       },
       "envs": {
         "description": "A list of environment variables made available to the component.",
         "type": "array",
         "items": {
           "type": "object",
           "required": [
             "key"
           ],
           "properties": {
             "key": {
               "description": "The variable name",
               "examples": [
                 "BASE_URL"
               ],
               "type": "string",
               "pattern": "^[_A-Za-z][_A-Za-z0-9]*$"
             },
             "scope": {
               "description": "- 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",
               "default": "RUN_AND_BUILD_TIME",
               "examples": [
                 "BUILD_TIME"
               ],
               "type": "string",
               "enum": [
                 "UNSET",
                 "RUN_TIME",
                 "BUILD_TIME",
                 "RUN_AND_BUILD_TIME"
               ]
             },
             "type": {
               "description": "- GENERAL: A plain-text environment variable\n- SECRET: A secret encrypted environment variable",
               "default": "GENERAL",
               "examples": [
                 "GENERAL"
               ],
               "type": "string",
               "enum": [
                 "GENERAL",
                 "SECRET"
               ]
             },
             "value": {
               "description": "The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used.",
               "examples": [
                 "http://example.com"
               ],
               "type": "string"
             }
           }
         }
       },
       "git": {
         "type": "object",
         "properties": {
           "branch": {
             "description": "The name of the branch to use",
             "examples": [
               "main"
             ],
             "type": "string"
           },
           "repo_clone_url": {
             "description": "The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git`",
             "examples": [
               "https://github.com/digitalocean/sample-golang.git"
             ],
             "type": "string"
           }
         }
       },
       "github": {
         "type": "object",
         "properties": {
           "branch": {
             "description": "The name of the branch to use",
             "examples": [
               "main"
             ],
             "type": "string"
           },
           "deploy_on_push": {
             "description": "Whether to automatically deploy new commits made to the repo",
             "examples": [
               true
             ],
             "type": "boolean"
           },
           "repo": {
             "description": "The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang`",
             "examples": [
               "digitalocean/sample-golang"
             ],
             "type": "string"
           }
         }
       },
       "gitlab": {
         "type": "object",
         "properties": {
           "branch": {
             "description": "The name of the branch to use",
             "examples": [
               "main"
             ],
             "type": "string"
           },
           "deploy_on_push": {
             "description": "Whether to automatically deploy new commits made to the repo",
             "examples": [
               true
             ],
             "type": "boolean"
           },
           "repo": {
             "description": "The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang`",
             "examples": [
               "digitalocean/sample-golang"
             ],
             "type": "string"
           }
         }
       },
       "image": {
         "type": "object",
         "properties": {
           "deploy_on_push": {
             "type": "object",
             "properties": {
               "enabled": {
                 "description": "Whether to automatically deploy new images. Can only be used for images hosted in DOCR and can only be used with an image tag, not a specific digest.",
                 "examples": [
                   true
                 ],
                 "type": "boolean"
               }
             }
           },
           "digest": {
             "description": "The image digest. Cannot be specified if tag is provided.",
             "examples": [
               "sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac"
             ],
             "type": "string"
           },
           "registry": {
             "description": "The registry name. Must be left empty for the `DOCR` registry type.",
             "examples": [
               "registry.hub.docker.com"
             ],
             "type": "string"
           },
           "registry_credentials": {
             "description": "The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used.\n- \"$username:$access_token\" for registries of type `DOCKER_HUB`.\n- \"$username:$access_token\" for registries of type `GHCR`.",
             "examples": [
               "my-dockerhub-username:dckr_pat_the_access_token"
             ],
             "type": "string"
           },
           "registry_type": {
             "description": "- DOCKER_HUB: The DockerHub container registry type.\n- DOCR: The DigitalOcean container registry type.\n- GHCR: The Github container registry type.",
             "examples": [
               "DOCR"
             ],
             "type": "string",
             "enum": [
               "DOCKER_HUB",
               "DOCR",
               "GHCR"
             ]
           },
           "repository": {
             "description": "The repository name.",
             "examples": [
               "origin/master"
             ],
             "type": "string"
           },
           "tag": {
             "description": "The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided.",
             "default": "latest",
             "examples": [
               "latest"
             ],
             "type": "string"
           }
         }
       },
       "log_destinations": {
         "description": "A list of configured log forwarding destinations.",
         "type": "array",
         "items": {
           "title": "Configurations for external logging.",
           "type": "object",
           "required": [
             "name"
           ],
           "properties": {
             "datadog": {
               "description": "DataDog configuration.",
               "type": "object",
               "required": [
                 "api_key"
               ],
               "properties": {
                 "api_key": {
                   "description": "Datadog API key.",
                   "examples": [
                     "abcdefghijklmnopqrstuvwxyz0123456789"
                   ],
                   "type": "string"
                 },
                 "endpoint": {
                   "description": "Datadog HTTP log intake endpoint.",
                   "examples": [
                     "https://mydatadogendpoint.com"
                   ],
                   "type": "string"
                 }
               }
             },
             "logtail": {
               "description": "Logtail configuration.",
               "type": "object",
               "required": [
                 "endpoint"
               ],
               "properties": {
                 "token": {
                   "description": "Logtail token.",
                   "examples": [
                     "abcdefghijklmnopqrstuvwxyz0123456789"
                   ],
                   "type": "string"
                 }
               }
             },
             "name": {
               "examples": [
                 "my_log_destination"
               ],
               "type": "string",
               "maxLength": 42,
               "minLength": 2,
               "pattern": "^[A-Za-z0-9()\\[\\]'\"][-A-Za-z0-9_. \\/()\\[\\]]{0,40}[A-Za-z0-9()\\[\\]'\"]$"
             },
             "open_search": {
               "description": "OpenSearch configuration.",
               "type": "object",
               "properties": {
                 "basic_auth": {
                   "description": "Configure Username and/or Password for Basic authentication.",
                   "type": "object",
                   "properties": {
                     "password": {
                       "description": "Password for user defined in User. Is required when `endpoint` is set.\nCannot be set if using a DigitalOcean DBaaS OpenSearch cluster.",
                       "examples": [
                         "password1"
                       ],
                       "type": "string"
                     },
                     "user": {
                       "description": "Username to authenticate with. Only required when `endpoint` is set.\nDefaults to `doadmin` when `cluster_name` is set.",
                       "examples": [
                         "apps_user"
                       ],
                       "type": "string"
                     }
                   }
                 },
                 "cluster_name": {
                   "description": "The name of a DigitalOcean DBaaS OpenSearch cluster to use as a log forwarding destination.\nCannot be specified if `endpoint` is also specified.",
                   "examples": [
                     "my-opensearch-cluster"
                   ],
                   "type": "string"
                 },
                 "endpoint": {
                   "description": "OpenSearch API Endpoint. Only HTTPS is supported. Format: https://\\<host\\>:\\<port\\>.\nCannot be specified if `cluster_name` is also specified.",
                   "examples": [
                     "https://example.com:9300"
                   ],
                   "type": "string"
                 },
                 "index_name": {
                   "description": "The index name to use for the logs. If not set, the default index name is \"logs\".",
                   "default": "logs",
                   "examples": [
                     "logs"
                   ],
                   "type": "string"
                 }
               }
             },
             "papertrail": {
               "description": "Papertrail configuration.",
               "type": "object",
               "required": [
                 "endpoint"
               ],
               "properties": {
                 "endpoint": {
                   "description": "Papertrail syslog endpoint.",
                   "examples": [
                     "https://mypapertrailendpoint.com"
                   ],
                   "type": "string"
                 }
               }
             }
           }
         }
       },
       "name": {
         "description": "The name. Must be unique across all components within the same app.",
         "examples": [
           "api"
         ],
         "type": "string",
         "maxLength": 32,
         "minLength": 2,
         "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$"
       },
       "run_command": {
         "description": "An optional run command to override the component's default.",
         "examples": [
           "bin/api"
         ],
         "type": "string"
       },
       "source_dir": {
         "description": "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.",
         "examples": [
           "path/to/dir"
         ],
         "type": "string"
       }
     }
   },
   {
     "type": "object",
     "properties": {
       "instance_count": {
         "description": "The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used.",
         "default": 1,
         "examples": [
           2
         ],
         "type": "integer",
         "format": "int64",
         "minimum": 1.0
       },
       "instance_size_slug": {
         "description": "The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb`",
         "examples": [
           "apps-s-1vcpu-0.5gb"
         ],
         "oneOf": [
           {
             "title": "Size slug",
             "default": "apps-s-1vcpu-0.5gb",
             "examples": [
               "apps-s-1vcpu-0.5gb"
             ],
             "type": "string",
             "enum": [
               "apps-s-1vcpu-0.5gb",
               "apps-s-1vcpu-1gb-fixed",
               "apps-s-1vcpu-1gb",
               "apps-s-1vcpu-2gb",
               "apps-s-2vcpu-4gb",
               "apps-d-1vcpu-0.5gb",
               "apps-d-1vcpu-1gb",
               "apps-d-1vcpu-2gb",
               "apps-d-1vcpu-4gb",
               "apps-d-2vcpu-4gb",
               "apps-d-2vcpu-8gb",
               "apps-d-4vcpu-8gb",
               "apps-d-4vcpu-16gb",
               "apps-d-8vcpu-32gb"
             ]
           },
           {
             "title": "Deprecated",
             "description": "Deprecated size slugs for legacy plans. We strongly encourage customers\nto use the new plans when creating or upgrading apps.\n",
             "deprecated": true,
             "examples": [
               "basic-xxs"
             ],
             "type": "string",
             "enum": [
               "basic-xxs",
               "basic-xs",
               "basic-s",
               "basic-m",
               "professional-xs",
               "professional-s",
               "professional-m",
               "professional-1l",
               "professional-l",
               "professional-xl"
             ]
           }
         ]
       }
     }
   },
   {
     "type": "object",
     "required": [
       "name"
     ],
     "properties": {
       "autoscaling": {
         "allOf": [
           {
             "description": "Configuration for automatically scaling this component based on metrics.",
             "type": "object",
             "properties": {
               "max_instance_count": {
                 "description": "The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances.",
                 "examples": [
                   3
                 ],
                 "type": "integer",
                 "format": "uint32",
                 "maximum": 250.0,
                 "minimum": 1.0
               },
               "metrics": {
                 "description": "The metrics that the component is scaled on.",
                 "type": "object",
                 "properties": {
                   "cpu": {
                     "description": "Settings for scaling the component based on CPU utilization.",
                     "type": "object",
                     "properties": {
                       "percent": {
                         "description": "The average target CPU utilization for the component.",
                         "default": 80,
                         "examples": [
                           75
                         ],
                         "type": "integer",
                         "format": "uint32",
                         "maximum": 100.0,
                         "minimum": 1.0
                       }
                     }
                   }
                 }
               },
               "min_instance_count": {
                 "description": "The minimum amount of instances for this component.",
                 "examples": [
                   2
                 ],
                 "type": "integer",
                 "format": "uint32",
                 "minimum": 1.0
               }
             }
           },
           {
             "type": "object",
             "properties": {
               "metrics": {
                 "type": "object",
                 "properties": {
                   "request_duration": {
                     "description": "Settings for scaling the component based on request duration.",
                     "type": "object",
                     "properties": {
                       "p95_milliseconds": {
                         "description": "The p95 target request duration in milliseconds for the component.",
                         "examples": [
                           500
                         ],
                         "type": "integer",
                         "format": "uint32",
                         "minimum": 1.0
                       }
                     }
                   },
                   "requests_per_second": {
                     "description": "Settings for scaling the component based on requests per second.",
                     "type": "object",
                     "properties": {
                       "per_instance": {
                         "description": "The target number of requests per second per instance for the component.",
                         "examples": [
                           100
                         ],
                         "type": "integer",
                         "format": "uint32",
                         "minimum": 1.0
                       }
                     }
                   }
                 }
               }
             }
           }
         ]
       },
       "cors": {
         "allOf": [
           {
             "type": "object",
             "properties": {
               "allow_credentials": {
                 "description": "Whether browsers should expose the response to the client-side JavaScript code when the request’s credentials mode is include. This configures the `Access-Control-Allow-Credentials` header.",
                 "examples": [
                   false
                 ],
                 "type": "boolean"
               },
               "allow_headers": {
                 "description": "The set of allowed HTTP request headers. This configures the `Access-Control-Allow-Headers` header.",
                 "examples": [
                   [
                     "Content-Type",
                     "X-Custom-Header"
                   ]
                 ],
                 "type": "array",
                 "items": {
                   "type": "string"
                 }
               },
               "allow_methods": {
                 "description": "The set of allowed HTTP methods. This configures the `Access-Control-Allow-Methods` header.",
                 "examples": [
                   [
                     "GET",
                     "OPTIONS",
                     "POST",
                     "PUT",
                     "PATCH",
                     "DELETE"
                   ]
                 ],
                 "type": "array",
                 "items": {
                   "type": "string"
                 }
               },
               "allow_origins": {
                 "description": "The set of allowed CORS origins.",
                 "examples": [
                   [
                     {
                       "exact": "https://www.example.com"
                     },
                     {
                       "regex": "^.*example.com"
                     }
                   ]
                 ],
                 "type": "array",
                 "items": {
                   "type": "object",
                   "properties": {
                     "exact": {
                       "description": "Exact string match. Only 1 of `exact`, `prefix`, or `regex` must be set. An empty string is a valid value and will be serialized explicitly rather than being omitted from the payload.",
                       "examples": [
                         "https://www.example.com"
                       ],
                       "type": [
                         "string",
                         "null"
                       ],
                       "maxLength": 256
                     },
                     "prefix": {
                       "description": "Prefix-based match. Only 1 of `exact`, `prefix`, or `regex` must be set.",
                       "deprecated": true,
                       "examples": [
                         "https://www.example.com"
                       ],
                       "type": [
                         "string",
                         "null"
                       ],
                       "maxLength": 256
                     },
                     "regex": {
                       "description": "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>",
                       "examples": [
                         "^.*example.com"
                       ],
                       "type": "string",
                       "maxLength": 256,
                       "minLength": 1
                     }
                   }
                 }
               },
               "expose_headers": {
                 "description": "The set of HTTP response headers that browsers are allowed to access. This configures the `Access-Control-Expose-Headers` header.",
                 "examples": [
                   [
                     "Content-Encoding",
                     "X-Custom-Header"
                   ]
                 ],
                 "type": "array",
                 "items": {
                   "type": "string"
                 }
               },
               "max_age": {
                 "description": "An optional duration specifying how long browsers can cache the results of a preflight request. This configures the `Access-Control-Max-Age` header.",
                 "examples": [
                   "5h30m"
                 ],
                 "type": "string"
               }
             }
           },
           {
             "description": "(Deprecated - Use Ingress Rules instead)."
           },
           {
             "deprecated": true
           }
         ]
       },
       "health_check": {
         "type": "object",
         "properties": {
           "failure_threshold": {
             "description": "The number of failed health checks before considered unhealthy.",
             "examples": [
               2
             ],
             "type": "integer",
             "format": "int32"
           },
           "http_path": {
             "description": "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.",
             "examples": [
               "/health"
             ],
             "type": "string"
           },
           "initial_delay_seconds": {
             "description": "The number of seconds to wait before beginning health checks.",
             "examples": [
               30
             ],
             "type": "integer",
             "format": "int32"
           },
           "period_seconds": {
             "description": "The number of seconds to wait between health checks.",
             "examples": [
               60
             ],
             "type": "integer",
             "format": "int32"
           },
           "port": {
             "description": "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.",
             "examples": [
               80
             ],
             "type": "integer",
             "format": "int64",
             "maximum": 65535.0,
             "minimum": 1.0
           },
           "success_threshold": {
             "description": "The number of successful health checks before considered healthy.",
             "examples": [
               3
             ],
             "type": "integer",
             "format": "int32"
           },
           "timeout_seconds": {
             "description": "The number of seconds after which the check times out.",
             "examples": [
               45
             ],
             "type": "integer",
             "format": "int32"
           }
         }
       },
       "http_port": {
         "description": "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.",
         "examples": [
           3000
         ],
         "type": "integer",
         "format": "int64",
         "maximum": 65535.0,
         "minimum": 1.0
       },
       "internal_ports": {
         "description": "The ports on which this service will listen for internal traffic.",
         "examples": [
           [
             80,
             443
           ]
         ],
         "type": "array",
         "items": {
           "type": "integer",
           "format": "int64"
         }
       },
       "liveness_health_check": {
         "type": "object",
         "properties": {
           "failure_threshold": {
             "description": "The number of failed health checks before considered unhealthy.",
             "examples": [
               18
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 50.0,
             "minimum": 1.0
           },
           "http_path": {
             "description": "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.",
             "examples": [
               "/health"
             ],
             "type": "string"
           },
           "initial_delay_seconds": {
             "description": "The number of seconds to wait before beginning health checks.",
             "examples": [
               30
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 3600.0,
             "minimum": 0.0
           },
           "period_seconds": {
             "description": "The number of seconds to wait between health checks.",
             "examples": [
               10
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 300.0,
             "minimum": 1.0
           },
           "port": {
             "description": "The port on which the health check will be performed.",
             "examples": [
               80
             ],
             "type": "integer",
             "format": "int64",
             "maximum": 65535.0,
             "minimum": 1.0
           },
           "success_threshold": {
             "description": "The number of successful health checks before considered healthy.",
             "examples": [
               1
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 1.0,
             "minimum": 1.0
           },
           "timeout_seconds": {
             "description": "The number of seconds after which the check times out.",
             "examples": [
               1
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 120.0,
             "minimum": 1.0
           }
         }
       },
       "protocol": {
         "description": "The protocol which the service uses to serve traffic on the http_port.\n\n- `HTTP`: The app is serving the HTTP protocol. Default.\n- `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c).\n",
         "examples": [
           "HTTP"
         ],
         "type": "string",
         "enum": [
           "HTTP",
           "HTTP2"
         ]
       },
       "routes": {
         "description": "(Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component.",
         "deprecated": true,
         "type": "array",
         "items": {
           "title": "A criterion for routing HTTP traffic to a component.",
           "type": "object",
           "properties": {
             "path": {
               "description": "(Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app.",
               "examples": [
                 "/api"
               ],
               "type": "string"
             },
             "preserve_path_prefix": {
               "description": "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`.",
               "examples": [
                 true
               ],
               "type": "boolean"
             }
           }
         }
       },
       "termination": {
         "type": "object",
         "properties": {
           "drain_seconds": {
             "description": "The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. (Default 15)",
             "examples": [
               15
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 110.0,
             "minimum": 1.0
           },
           "grace_period_seconds": {
             "description": "The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120)",
             "examples": [
               120
             ],
             "type": "integer",
             "format": "int32",
             "maximum": 600.0,
             "minimum": 1.0
           }
         }
       }
     }
   }
 ]
}

Fields§

§autoscaling: Option<AppSpecServicesItemAutoscaling>§bitbucket: Option<AppSpecServicesItemBitbucket>§build_command: Option<String>

An optional build command to run while building this component from source.

§cors: Option<AppSpecServicesItemCors>§dockerfile_path: Option<String>

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: Option<String>

An environment slug describing the type of this app. For a full list, please refer to the product documentation.

§envs: Vec<AppSpecServicesItemEnvsItem>

A list of environment variables made available to the component.

§git: Option<AppSpecServicesItemGit>§github: Option<AppSpecServicesItemGithub>§gitlab: Option<AppSpecServicesItemGitlab>§health_check: Option<AppSpecServicesItemHealthCheck>§http_port: Option<NonZeroU64>

The internal port on which this service’s run command will listen. Default: 8080 If there is not an environment variable with the name PORT, one will be automatically added with its value set to the value of this field.

§image: Option<AppSpecServicesItemImage>§instance_count: NonZeroU64

The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used.

§instance_size_slug: Option<AppSpecServicesItemInstanceSizeSlug>

The instance size to use for this component. Default: apps-s-1vcpu-0.5gb

§internal_ports: Vec<i64>

The ports on which this service will listen for internal traffic.

§liveness_health_check: Option<AppSpecServicesItemLivenessHealthCheck>§log_destinations: Vec<ConfigurationsForExternalLogging>

A list of configured log forwarding destinations.

§name: AppSpecServicesItemName

The name. Must be unique across all components within the same app.

§protocol: Option<AppSpecServicesItemProtocol>

The protocol which the service uses to serve traffic on the http_port.

  • HTTP: The app is serving the HTTP protocol. Default.
  • HTTP2: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c).
§routes: Vec<ACriterionForRoutingHttpTrafficToAComponent>

(Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component.

§run_command: Option<String>

An optional run command to override the component’s default.

§source_dir: Option<String>

An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo.

§termination: Option<AppSpecServicesItemTermination>

Trait Implementations§

Source§

impl Clone for AppSpecServicesItem

Source§

fn clone(&self) -> AppSpecServicesItem

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AppSpecServicesItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AppSpecServicesItem

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&AppSpecServicesItem> for AppSpecServicesItem

Source§

fn from(value: &AppSpecServicesItem) -> Self

Converts to this type from the input type.
Source§

impl Serialize for AppSpecServicesItem

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more