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 }
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 }