Method: billingAccounts.sinks.create

Creates a sink that exports specified log entries to a destination. The export of newly-ingested log entries begins immediately, unless the sink's writerIdentity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink.

HTTP request

POST https://logging.googleapis.com/v2/{parent=billingAccounts/*}/sinks

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The resource in which to create the sink:

"projects/[PROJECT_ID]"
"organizations/[ORGANIZATION_ID]"
"billingAccounts/[BILLING_ACCOUNT_ID]"
"folders/[FOLDER_ID]"

Examples: "projects/my-logging-project", "organizations/123456789".

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

  • logging.sinks.create

Query parameters

Parameters
uniqueWriterIdentity

boolean

Optional. Determines the kind of IAM identity returned as writerIdentity in the new sink. If this value is omitted or set to false, and if the sink's parent is a project, then the value returned as writerIdentity is the same group or service account used by Logging before the addition of writer identities to this API. The sink's destination must be in the same project as the sink itself.

If this field is set to true, or if the sink is owned by a non-project resource such as an organization, then the value of writerIdentity will be a unique service account used only for exports from the new sink. For more information, see writerIdentity in LogSink.

Request body

The request body contains an instance of LogSink.

Response body

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

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.

Try it!

¿Te sirvió esta página? Envíanos tu opinión:

Enviar comentarios sobre…