public void GetMetricDescriptor() { // Snippet: GetMetricDescriptor(string,CallSettings) // Create client MetricServiceClient metricServiceClient = MetricServiceClient.Create(); // Initialize request argument(s) string formattedName = MetricServiceClient.FormatMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]"); // Make the request MetricDescriptor response = metricServiceClient.GetMetricDescriptor(formattedName); // End snippet }
public async Task DeleteMetricDescriptorAsync() { // Snippet: DeleteMetricDescriptorAsync(string,CallSettings) // Additional: DeleteMetricDescriptorAsync(string,CancellationToken) // Create client MetricServiceClient metricServiceClient = MetricServiceClient.Create(); // Initialize request argument(s) string formattedName = MetricServiceClient.FormatMetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]"); // Make the request await metricServiceClient.DeleteMetricDescriptorAsync(formattedName); // End snippet }