class Sinks extends Resource (View source)

The "sinks" collection of methods.

Typical usage is:

 $loggingService = new Google\Service\Logging(...);
 $sinks = $loggingService->sinks;

Methods

create(string $parent, LogSink $postBody, array $optParams = [])

Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. (sinks.create)

delete(string $sinkName, array $optParams = [])

Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. (sinks.delete)

get(string $sinkName, array $optParams = [])

Gets a sink. (sinks.get)

listSinks(string $parent, array $optParams = [])

Lists sinks. (sinks.listSinks)

update(string $sinkName, LogSink $postBody, array $optParams = [])

Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. (sinks.update)

Details

LogSink create(string $parent, LogSink $postBody, array $optParams = [])

Creates a sink that exports specified log entries to a destination. The export begins upon ingress, unless the sink's writer_identity is not permitted to write to the destination. A sink can export log entries only from the resource owning the sink. (sinks.create)

Parameters

string $parent

Required. The resource in which to create the sink: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" For examples:"projects/my-project" "organizations/123456789"

LogSink $postBody
array $optParams

Optional parameters.

Return Value

LogSink

Exceptions

Exception

LoggingEmpty delete(string $sinkName, array $optParams = [])

Deletes a sink. If the sink has a unique writer_identity, then that service account is also deleted. (sinks.delete)

Parameters

string $sinkName

Required. The full resource name of the sink to delete, 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]" For example:"projects/my- project/sinks/my-sink"

array $optParams

Optional parameters.

Return Value

LoggingEmpty

Exceptions

Exception

LogSink get(string $sinkName, array $optParams = [])

Gets a sink. (sinks.get)

Parameters

string $sinkName

Required. The resource name of the sink: "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]" For example:"projects/my- project/sinks/my-sink"

array $optParams

Optional parameters.

Return Value

LogSink

Exceptions

Exception

ListSinksResponse listSinks(string $parent, array $optParams = [])

Lists sinks. (sinks.listSinks)

Parameters

string $parent

Required. The parent resource whose sinks are to be listed: "projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"

array $optParams

Optional parameters.

Return Value

ListSinksResponse

Exceptions

Exception

LogSink update(string $sinkName, LogSink $postBody, array $optParams = [])

Updates a sink. This method replaces the values of the destination and filter fields of the existing sink with the corresponding values from the new sink.The updated sink might also have a new writer_identity; see the unique_writer_identity field. (sinks.update)

Parameters

string $sinkName

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]" For example:"projects/my- project/sinks/my-sink"

LogSink $postBody
array $optParams

Optional parameters.

Return Value

LogSink

Exceptions

Exception