public async Task DeleteLogMetricAsync() { // Snippet: DeleteLogMetricAsync(string,CallSettings) // Additional: DeleteLogMetricAsync(string,CancellationToken) // Create client MetricsServiceV2Client metricsServiceV2Client = MetricsServiceV2Client.Create(); // Initialize request argument(s) string formattedMetricName = MetricsServiceV2Client.FormatMetricName("[PROJECT]", "[METRIC]"); // Make the request await metricsServiceV2Client.DeleteLogMetricAsync(formattedMetricName); // End snippet }
/// <summary>Snippet for DeleteLogMetricAsync</summary> public async Task DeleteLogMetricAsync() { // Snippet: DeleteLogMetricAsync(MetricNameOneof,CallSettings) // Additional: DeleteLogMetricAsync(MetricNameOneof,CancellationToken) // Create client MetricsServiceV2Client metricsServiceV2Client = await MetricsServiceV2Client.CreateAsync(); // Initialize request argument(s) MetricNameOneof metricName = MetricNameOneof.From(new MetricName("[PROJECT]", "[METRIC]")); // Make the request await metricsServiceV2Client.DeleteLogMetricAsync(metricName); // End snippet }
/// <summary>Snippet for DeleteLogMetricAsync</summary> public async Task DeleteLogMetricResourceNamesAsync() { // Snippet: DeleteLogMetricAsync(LogMetricName, CallSettings) // Additional: DeleteLogMetricAsync(LogMetricName, CancellationToken) // Create client MetricsServiceV2Client metricsServiceV2Client = await MetricsServiceV2Client.CreateAsync(); // Initialize request argument(s) LogMetricName metricName = LogMetricName.FromProjectMetric("[PROJECT]", "[METRIC]"); // Make the request await metricsServiceV2Client.DeleteLogMetricAsync(metricName); // End snippet }
/// <summary>Snippet for DeleteLogMetricAsync</summary> public async Task DeleteLogMetricAsync() { // Snippet: DeleteLogMetricAsync(string, CallSettings) // Additional: DeleteLogMetricAsync(string, CancellationToken) // Create client MetricsServiceV2Client metricsServiceV2Client = await MetricsServiceV2Client.CreateAsync(); // Initialize request argument(s) string metricName = "projects/[PROJECT]/metrics/[METRIC]"; // Make the request await metricsServiceV2Client.DeleteLogMetricAsync(metricName); // End snippet }
public async Task DeleteLogMetricAsync_RequestObject() { // Snippet: DeleteLogMetricAsync(DeleteLogMetricRequest,CallSettings) // Create client MetricsServiceV2Client metricsServiceV2Client = await MetricsServiceV2Client.CreateAsync(); // Initialize request argument(s) DeleteLogMetricRequest request = new DeleteLogMetricRequest { MetricNameAsMetricNameOneof = MetricNameOneof.From(new MetricName("[PROJECT]", "[METRIC]")), }; // Make the request await metricsServiceV2Client.DeleteLogMetricAsync(request); // End snippet }
/// <summary>Snippet for DeleteLogMetricAsync</summary> public async Task DeleteLogMetricRequestObjectAsync() { // Snippet: DeleteLogMetricAsync(DeleteLogMetricRequest, CallSettings) // Additional: DeleteLogMetricAsync(DeleteLogMetricRequest, CancellationToken) // Create client MetricsServiceV2Client metricsServiceV2Client = await MetricsServiceV2Client.CreateAsync(); // Initialize request argument(s) DeleteLogMetricRequest request = new DeleteLogMetricRequest { MetricNameAsLogMetricName = LogMetricName.FromProjectMetric("[PROJECT]", "[METRIC]"), }; // Make the request await metricsServiceV2Client.DeleteLogMetricAsync(request); // End snippet }