Method: sinks.update

Updates a sink. This method replaces the following fields in the existing sink with values from the new sink: destination, and filter. The updated sink might also have a new writerIdentity; see the uniqueWriterIdentity field.

HTTP request

PUT https://logging.googleapis.com/v2/{sinkName=*/*/sinks/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
sinkName

string

Required. The full resource name of the sink to update, including the parent resource and the sink identifier:

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

Example: "projects/my-project-id/sinks/my-sink-id".

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

  • logging.sinks.update

Query parameters

Parameters
uniqueWriterIdentity

boolean

Optional. See sinks.create for a description of this field. When updating a sink, the effect of this field on the value of writerIdentity in the updated sink depends on both the old and new values of this field:

  • If the old and new values of this field are both false or both true, then there is no change to the sink's writerIdentity.
  • If the old value is false and the new value is true, then writerIdentity is changed to a unique service account.
  • It is an error if the old value is true and the new value is set to false or defaulted to false.

updateMask

string (FieldMask format)

Optional. Field mask that specifies the fields in sink that need an update. A sink field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.

An empty updateMask is temporarily treated as using the following mask for backwards compatibility purposes: destination,filter,includeChildren At some point in the future, behavior will be removed and specifying an empty updateMask will be an error.

For a detailed FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask

Example: updateMask=filter.

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of LogSink.

Response body

If successful, the response body contains an 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!

Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Logging