MetricsQueryClient.GetMetricNamespaces(String, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets metric namespaces for a particular resource.
public virtual Azure.Pageable<Azure.Monitor.Query.Models.MetricNamespace> GetMetricNamespaces (string resourceId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMetricNamespaces : string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Monitor.Query.Models.MetricNamespace>
override this.GetMetricNamespaces : string * System.Threading.CancellationToken -> Azure.Pageable<Azure.Monitor.Query.Models.MetricNamespace>
Public Overridable Function GetMetricNamespaces (resourceId As String, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of MetricNamespace)
Parameters
- resourceId
- String
The resource name.
For example:
/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource>
,/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Storage/storageAccounts/mystorage
,/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Compute/virtualMachines/myvm
- cancellationToken
- CancellationToken
The CancellationToken to use.
Returns
A pageable collection of metric namespaces.
Applies to
Azure SDK for .NET