Skip to main content

scopes

Creates, updates, deletes, gets or lists a scopes resource.

Overview

Namescopes
TypeResource
Idgoogle.observability.scopes

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Name of the resource. The format is: projects/{project}/locations/{location}/scopes/{scope} The {location} field must be set to global. The {scope} field must be set to _Default.
logScopestringRequired. The full resource name of the LogScope. For example: //logging.googleapis.com/projects/myproject/locations/global/logScopes/my-log-scope
traceScopestringRequired. The resource name of the TraceScope. For example: projects/myproject/locations/global/traceScopes/my-trace-scope
updateTimestring (google-datetime)Output only. Update timestamp. Note: The Update timestamp for the default scope is initially unset.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, scopesIdGets details of a single Scope.
patchupdateprojectsId, locationsId, scopesIdupdateMaskUpdates the parameters of a single Scope.

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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
scopesIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single Scope.

SELECT
name,
logScope,
traceScope,
updateTime
FROM google.observability.scopes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND scopesId = '{{ scopesId }}' -- required;

UPDATE examples

Updates the parameters of a single Scope.

UPDATE google.observability.scopes
SET
data__name = '{{ name }}',
data__logScope = '{{ logScope }}',
data__traceScope = '{{ traceScope }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND scopesId = '{{ scopesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
logScope,
traceScope,
updateTime;