Exemple #1
0
 public void GetMonitoredResourceDescriptor()
 {
     // Snippet: GetMonitoredResourceDescriptor(string,CallSettings)
     // Create client
     MetricServiceClient metricServiceClient = MetricServiceClient.Create();
     // Initialize request argument(s)
     string formattedName = MetricServiceClient.FormatMonitoredResourceDescriptorName("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
     // Make the request
     MonitoredResourceDescriptor response = metricServiceClient.GetMonitoredResourceDescriptor(formattedName);
     // End snippet
 }
Exemple #2
0
        public async Task GetMonitoredResourceDescriptorAsync()
        {
            // Snippet: GetMonitoredResourceDescriptorAsync(string,CallSettings)
            // Additional: GetMonitoredResourceDescriptorAsync(string,CancellationToken)
            // Create client
            MetricServiceClient metricServiceClient = MetricServiceClient.Create();
            // Initialize request argument(s)
            string formattedName = MetricServiceClient.FormatMonitoredResourceDescriptorName("[PROJECT]", "[MONITORED_RESOURCE_DESCRIPTOR]");
            // Make the request
            MonitoredResourceDescriptor response = await metricServiceClient.GetMonitoredResourceDescriptorAsync(formattedName);

            // End snippet
        }