Esempio n. 1
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
        }
Esempio n. 2
0
        /// <summary>Snippet for DeleteMetricDescriptorAsync</summary>
        public async Task DeleteMetricDescriptorAsync_RequestObject()
        {
            // Snippet: DeleteMetricDescriptorAsync(DeleteMetricDescriptorRequest,CallSettings)
            // Create client
            MetricServiceClient metricServiceClient = await MetricServiceClient.CreateAsync();

            // Initialize request argument(s)
            DeleteMetricDescriptorRequest request = new DeleteMetricDescriptorRequest
            {
                MetricDescriptorName = new MetricDescriptorName("[PROJECT]", "[METRIC_DESCRIPTOR]"),
            };
            // Make the request
            await metricServiceClient.DeleteMetricDescriptorAsync(request);

            // End snippet
        }
Esempio n. 3
0
 public async Task DeleteMetricAsync(String metricId)
 {
     await _client.DeleteMetricDescriptorAsync($"projects/{_googleProjectId}/metricDescriptors/{metricId}");
 }