public updateLogMetric ( string $metricName, google\logging\v2\LogMetric $metric, array $optionalArgs = [] ) : google\logging\v2\LogMetric | ||
$metricName | string | The resource name of the metric to update: "projects/[PROJECT_ID]/metrics/[METRIC_ID]" The updated metric must be provided in the request and it's `name` field must be the same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is created. |
$metric | google\logging\v2\LogMetric | The updated metric. |
$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. } |
리턴 | google\logging\v2\LogMetric |
public function updateLogMetric($metricName, $metric, $optionalArgs = [])
{
$request = new UpdateLogMetricRequest();
$request->setMetricName($metricName);
$request->setMetric($metric);
$mergedSettings = $this->defaultCallSettings['updateLogMetric']->merge(new CallSettings($optionalArgs));
$callable = ApiCallable::createApiCall($this->metricsServiceV2Stub, 'UpdateLogMetric', $mergedSettings, $this->descriptors['updateLogMetric']);
return $callable($request, [], ['call_credentials_callback' => $this->createCredentialsCallback()]);
}