|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: Backend |
| 16 | +description: A Backend is the primary resource of App Hosting. |
| 17 | +base_url: projects/{{project}}/locations/{{location}}/backends |
| 18 | +update_mask: true |
| 19 | +self_link: projects/{{project}}/locations/{{location}}/backends/{{backend_id}} |
| 20 | +create_url: projects/{{project}}/locations/{{location}}/backends?backendId={{backend_id}} |
| 21 | +# Always forces deletion because the child resource default `Domain` is always present. |
| 22 | +delete_url: projects/{{project}}/locations/{{location}}/backends/{{backend_id}}?force=true |
| 23 | +update_verb: PATCH |
| 24 | +id_format: projects/{{project}}/locations/{{location}}/backends/{{backend_id}} |
| 25 | +import_format: |
| 26 | + - "projects/{{project}}/locations/{{location}}/backends/{{backend_id}}" |
| 27 | + - "{{project}}/{{location}}/{{backend_id}}" |
| 28 | + - "{{location}}/{{backend_id}}" |
| 29 | +examples: |
| 30 | + - name: firebase_app_hosting_backend_minimal |
| 31 | + primary_resource_id: example |
| 32 | + vars: |
| 33 | + backend_id: "mini" |
| 34 | + test_env_vars: |
| 35 | + project_id: "PROJECT_NAME" |
| 36 | + - name: firebase_app_hosting_backend_full |
| 37 | + primary_resource_id: example |
| 38 | + vars: |
| 39 | + backend_id: "full" |
| 40 | + test_env_vars: |
| 41 | + project_id: "PROJECT_NAME" |
| 42 | + - name: firebase_app_hosting_backend_github |
| 43 | + primary_resource_id: example |
| 44 | + vars: |
| 45 | + backend_id: "my-backend-gh" |
| 46 | + test_env_vars: |
| 47 | + project_id: "PROJECT_NAME" |
| 48 | + exclude_test: true # Can't establish a Github connection in automated tests. |
| 49 | +autogen_async: true |
| 50 | +async: |
| 51 | + operation: |
| 52 | + timeouts: |
| 53 | + insert_minutes: 20 |
| 54 | + update_minutes: 20 |
| 55 | + delete_minutes: 20 |
| 56 | + base_url: "{{op_id}}" |
| 57 | + actions: |
| 58 | + - create |
| 59 | + - delete |
| 60 | + - update |
| 61 | + type: OpAsync |
| 62 | + result: |
| 63 | + resource_inside_response: true |
| 64 | + include_project: false |
| 65 | +autogen_status: QmFja2VuZA== |
| 66 | +parameters: |
| 67 | + - name: location |
| 68 | + type: String |
| 69 | + description: The canonical IDs of a Google Cloud location such as "us-east1". |
| 70 | + immutable: true |
| 71 | + url_param_only: true |
| 72 | + required: true |
| 73 | + - name: backendId |
| 74 | + type: String |
| 75 | + description: |- |
| 76 | + Id of the backend. Also used as the service ID for Cloud Run, and as part |
| 77 | + of the default domain name. |
| 78 | + immutable: true |
| 79 | + url_param_only: true |
| 80 | + required: true |
| 81 | +properties: |
| 82 | + - name: servingLocality |
| 83 | + type: Enum |
| 84 | + description: |- |
| 85 | + Immutable. Specifies how App Hosting will serve the content for this backend. It will |
| 86 | + either be contained to a single region (REGIONAL_STRICT) or allowed to use |
| 87 | + App Hosting's global-replicated serving infrastructure (GLOBAL_ACCESS). |
| 88 | + enum_values: |
| 89 | + - "REGIONAL_STRICT" |
| 90 | + - "GLOBAL_ACCESS" |
| 91 | + immutable: true |
| 92 | + required: true |
| 93 | + - name: appId |
| 94 | + type: String |
| 95 | + description: |- |
| 96 | + The [ID of a Web |
| 97 | + App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id) |
| 98 | + associated with the backend. |
| 99 | + required: true |
| 100 | + - name: serviceAccount |
| 101 | + type: String |
| 102 | + description: |- |
| 103 | + The name of the service account used for Cloud Build and Cloud Run. |
| 104 | + Should have the role roles/firebaseapphosting.computeRunner |
| 105 | + or equivalent permissions. |
| 106 | + required: true |
| 107 | + - name: annotations |
| 108 | + type: KeyValueAnnotations |
| 109 | + description: |- |
| 110 | + Unstructured key value map that may be set by external tools to |
| 111 | + store and arbitrary metadata. They are not queryable and should be |
| 112 | + preserved when modifying objects. |
| 113 | + - name: displayName |
| 114 | + type: String |
| 115 | + description: Human-readable name. 63 character limit. |
| 116 | + - name: environment |
| 117 | + type: String |
| 118 | + description: |- |
| 119 | + The environment name of the backend, used to load environment variables |
| 120 | + from environment specific configuration. |
| 121 | + - name: labels |
| 122 | + type: KeyValueLabels |
| 123 | + description: |- |
| 124 | + Unstructured key value map that can be used to organize and categorize |
| 125 | + objects. |
| 126 | + - name: etag |
| 127 | + type: Fingerprint |
| 128 | + description: |- |
| 129 | + Server-computed checksum based on other values; may be sent |
| 130 | + on update or delete to ensure operation is done on expected resource. |
| 131 | + output: true |
| 132 | + - name: name |
| 133 | + type: String |
| 134 | + description: |- |
| 135 | + Identifier. The resource name of the backend. |
| 136 | +
|
| 137 | + Format: |
| 138 | +
|
| 139 | + `projects/{project}/locations/{locationId}/backends/{backendId}`. |
| 140 | + output: true |
| 141 | + - name: createTime |
| 142 | + type: Time |
| 143 | + description: Time at which the backend was created. |
| 144 | + output: true |
| 145 | + - name: deleteTime |
| 146 | + type: Time |
| 147 | + description: Time at which the backend was deleted. |
| 148 | + output: true |
| 149 | + - name: updateTime |
| 150 | + type: Time |
| 151 | + description: Time at which the backend was last updated. |
| 152 | + output: true |
| 153 | + - name: uid |
| 154 | + type: String |
| 155 | + description: System-assigned, unique identifier. |
| 156 | + output: true |
| 157 | + - name: uri |
| 158 | + type: String |
| 159 | + description: The primary URI to communicate with the backend. |
| 160 | + output: true |
| 161 | + - name: codebase |
| 162 | + type: NestedObject |
| 163 | + description: |- |
| 164 | + The connection to an external source repository to watch for event-driven |
| 165 | + updates to the backend. |
| 166 | + properties: |
| 167 | + - name: repository |
| 168 | + type: String |
| 169 | + description: |- |
| 170 | + The resource name for the Developer Connect |
| 171 | + [`gitRepositoryLink`](https://cloud.google.com/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks) |
| 172 | + connected to this backend, in the format: |
| 173 | +
|
| 174 | + projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{repositoryLink} |
| 175 | + required: true |
| 176 | + - name: rootDirectory |
| 177 | + type: String |
| 178 | + description: |- |
| 179 | + If `repository` is provided, the directory relative to the root of the |
| 180 | + repository to use as the root for the deployed web app. |
| 181 | + - name: managedResources |
| 182 | + type: Array |
| 183 | + description: A list of the resources managed by this backend. |
| 184 | + output: true |
| 185 | + item_type: |
| 186 | + type: NestedObject |
| 187 | + properties: |
| 188 | + - name: runService |
| 189 | + type: NestedObject |
| 190 | + output: true |
| 191 | + description: |- |
| 192 | + A managed Cloud Run |
| 193 | + [`service`](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#resource:-service). |
| 194 | + properties: |
| 195 | + - name: service |
| 196 | + type: String |
| 197 | + output: true |
| 198 | + description: |- |
| 199 | + The name of the Cloud Run |
| 200 | + [`service`](https://cloud.google.com/run/docs/reference/rest/v2/projects.locations.services#resource:-service), |
| 201 | + in the format: |
| 202 | +
|
| 203 | + projects/{project}/locations/{location}/services/{serviceId} |
0 commit comments