traffic
Creates, updates, deletes, gets or lists a traffic
resource.
Overview
Name | traffic |
Type | Resource |
Id | firebase.apphosting.traffic |
Fields
The following fields are returned by SELECT
queries:
- get
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the backend's traffic. Format: projects/{project}/locations/{locationId}/backends/{backendId}/traffic . |
annotations | object | Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. |
createTime | string (google-datetime) | Output only. Time at which the backend was created. |
current | object | Output only. Current state of traffic allocation for the backend. When setting target , this field may differ for some time until the desired state is reached. (id: TrafficSet) |
etag | string | Output only. Server-computed checksum based on other values; may be sent on update or delete to ensure operation is done on expected resource. |
labels | object | Optional. Unstructured key value map that can be used to organize and categorize objects. |
reconciling | boolean | Output only. A field that, if true, indicates that the system is working to make the backend's current match the requested target list. |
rolloutPolicy | object | A rollout policy specifies how new builds and automatic deployments are created. (id: RolloutPolicy) |
target | object | Set to manually control the desired traffic for the backend. This will cause current to eventually match this value. The percentages must add up to 100%. (id: TrafficSet) |
uid | string | Output only. System-assigned, unique identifier. |
updateTime | string (google-datetime) | Output only. Time at which the backend was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backendsId | Gets information about a backend's traffic. | |
patch | update | projectsId , locationsId , backendsId | updateMask , requestId , validateOnly | Updates a backend's traffic. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
backendsId | string | |
locationsId | string | |
projectsId | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT
examples
- get
Gets information about a backend's traffic.
SELECT
name,
annotations,
createTime,
current,
etag,
labels,
reconciling,
rolloutPolicy,
target,
uid,
updateTime
FROM firebase.apphosting.traffic
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backendsId = '{{ backendsId }}' -- required;
UPDATE
examples
- patch
Updates a backend's traffic.
UPDATE firebase.apphosting.traffic
SET
data__target = '{{ target }}',
data__rolloutPolicy = '{{ rolloutPolicy }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backendsId = '{{ backendsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;