MetricsQueryClient.GetMetricDefinitionsAsync 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 definitions for a particular resource and metric namespace.
public virtual Azure.AsyncPageable<Azure.Monitor.Query.Models.MetricDefinition> GetMetricDefinitionsAsync (string resourceId, string metricsNamespace, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMetricDefinitionsAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Monitor.Query.Models.MetricDefinition>
override this.GetMetricDefinitionsAsync : string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Monitor.Query.Models.MetricDefinition>
Public Overridable Function GetMetricDefinitionsAsync (resourceId As String, metricsNamespace As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of MetricDefinition)
Parameters
- resourceId
- String
The resource name.
For example:
<code data-dev-comment-type="c">/subscriptions/<subscription_id>/resourceGroups/<resource_group_name>/providers/<resource_provider>/<resource></code>,<br /><code data-dev-comment-type="c">/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Storage/storageAccounts/mystorage</code>,<br /><code data-dev-comment-type="c">/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/resource-group/providers/Microsoft.Compute/virtualMachines/myvm</code><br />
- metricsNamespace
- String
The metric namespace.
For example: Microsoft.OperationalInsights/workspaces
.
- cancellationToken
- CancellationToken
The CancellationToken to use.
Returns
A pageable collection of metric definitions.
Applies to
Współpracuj z nami w serwisie GitHub
Źródło tej zawartości można znaleźć w witrynie GitHub, gdzie można również tworzyć i przeglądać problemy i żądania ściągnięcia. Więcej informacji znajdziesz w naszym przewodniku dla współtwórców.
Azure SDK for .NET