コード例 #1
0
 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
 }
コード例 #2
0
        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
        }