Method: projects.locations.logScopes.create

Creates a log scope.

HTTP request

POST https://logging.googleapis.com/v2/{parent=projects/*/locations/*}/logScopes

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent project in which to create the log scope

"projects/[PROJECT_ID]/locations/[LOCATION_ID]"

For example:

"projects/my-project/locations/global"

Authorization requires the following IAM permission on the specified resource parent:

  • logging.logScopes.create

Query parameters

Parameters
logScopeId

string

Required. A client-assigned identifier such as "log-scope". Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.

Request body

The request body contains an instance of LogScope.

Response body

If successful, the response body contains a newly created instance of LogScope.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/logging.admin
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.