Method: projects.locations.backends.traffic.patch
Stay organized with collections
Save and categorize content based on your preferences.
Updates a backend's traffic.
HTTP request
PATCH https://firebaseapphosting.googleapis.com/v1beta/{traffic.name=projects/*/locations/*/backends/*/traffic}
The URL uses gRPC Transcoding syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the service error catalog
Path parameters
Parameters |
traffic.name |
string
Identifier. The resource name of the backend's traffic. Format: projects/{project}/locations/{locationId}/backends/{backendId}/traffic .
|
Query parameters
Parameters |
updateMask |
string (FieldMask format)
Optional. Field mask is used to specify the fields to be overwritten in the traffic resource by the update. The fields specified in the updateMask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo" .
|
requestId |
string
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
|
validateOnly |
boolean
Optional. Indicates that the request should be validated, without persisting the request or updating any resources.
|
Request body
The request body contains an instance of Traffic
.
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the OAuth 2.0 Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
firebaseapphosting.traffic.update
For more information, see the IAM documentation.
See also Firebase App Hosting's IAM Permissions and Predefined IAM Roles.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-04-04 UTC.
[null,null,["Last updated 2025-04-04 UTC."],[],[],null,["# Method: projects.locations.backends.traffic.patch\n\nUpdates a backend's traffic.\n\n### HTTP request\n\n`PATCH https://firebaseapphosting.googleapis.com/v1beta/{traffic.name=projects/*/locations/*/backends/*/traffic}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax. To know more about valid error responses that can be thrown by this HTTP request, please refer to the [service error catalog](/docs/reference/apphosting/rest/v1beta/errors)\n\n### Path parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| `traffic.name` | `string` Identifier. The resource name of the backend's traffic. Format: `projects/{project}/locations/{locationId}/backends/{backendId}/traffic`. |\n\n### Query parameters\n\n| Parameters ||\n|----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `updateMask` | `string (`[FieldMask](https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask)` format)` Optional. Field mask is used to specify the fields to be overwritten in the traffic resource by the update. The fields specified in the updateMask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n| `requestId` | `string` Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000). |\n| `validateOnly` | `boolean` Optional. Indicates that the request should be validated, without persisting the request or updating any resources. |\n\n### Request body\n\nThe request body contains an instance of [Traffic](/docs/reference/apphosting/rest/v1beta/projects.locations.backends.traffic#Traffic).\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/docs/reference/apphosting/rest/v1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `firebaseapphosting.traffic.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs).\n\nSee also Firebase App Hosting's [IAM Permissions](https://firebase.google.com/docs/projects/iam/permissions#app-hosting) and [Predefined IAM Roles](https://firebase.google.com/docs/projects/iam/roles-predefined-product)."]]