Google\Cloud\Logging\V2\ConfigServiceV2Client::getSink PHP Method

getSink() public method

Sample code: try { $configServiceV2Client = new ConfigServiceV2Client(); $formattedSinkName = ConfigServiceV2Client::formatSinkName("[PROJECT]", "[SINK]"); $response = $configServiceV2Client->getSink($formattedSinkName); } finally { if (isset($configServiceV2Client)) { $configServiceV2Client->close(); } }
public getSink ( string $sinkName, array $optionalArgs = [] ) : google\logging\v2\LogSink
$sinkName string Required. The resource name of the sink to return: "projects/[PROJECT_ID]/sinks/[SINK_ID]" "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
$optionalArgs array { Optional. @type \Google\GAX\RetrySettings $retrySettings Retry settings to use for this call. If present, then $timeoutMillis is ignored. @type int $timeoutMillis Timeout to use for this call. Only used if $retrySettings is not set. }
return google\logging\v2\LogSink
    public function getSink($sinkName, $optionalArgs = [])
    {
        $request = new GetSinkRequest();
        $request->setSinkName($sinkName);
        $mergedSettings = $this->defaultCallSettings['getSink']->merge(new CallSettings($optionalArgs));
        $callable = ApiCallable::createApiCall($this->configServiceV2Stub, 'GetSink', $mergedSettings, $this->descriptors['getSink']);
        return $callable($request, [], ['call_credentials_callback' => $this->createCredentialsCallback()]);
    }