/// <summary> /// Lists metric configurations in a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='roleName'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <MonitoringMetricConfiguration> > ListAsync(this IMonitoringConfigOperations operations, string deviceName, string roleName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(deviceName, roleName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a metric configuration of a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='roleName'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static MonitoringMetricConfiguration Get(this IMonitoringConfigOperations operations, string deviceName, string roleName, string resourceGroupName) { return(operations.GetAsync(deviceName, roleName, resourceGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists metric configurations in a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <MonitoringMetricConfiguration> > ListNextAsync(this IMonitoringConfigOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists metric configurations in a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='nextPageLink'> /// The NextLink from the previous successful call to List operation. /// </param> public static IPage <MonitoringMetricConfiguration> ListNext(this IMonitoringConfigOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// deletes a new metric configuration for a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='roleName'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IMonitoringConfigOperations operations, string deviceName, string roleName, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, roleName, resourceGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// deletes a new metric configuration for a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='roleName'> /// The role name. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static void BeginDelete(this IMonitoringConfigOperations operations, string deviceName, string roleName, string resourceGroupName) { operations.BeginDeleteAsync(deviceName, roleName, resourceGroupName).GetAwaiter().GetResult(); }
/// <summary> /// Creates a new metric configuration or updates an existing one for a role. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='deviceName'> /// The device name. /// </param> /// <param name='roleName'> /// The role name. /// </param> /// <param name='monitoringMetricConfiguration'> /// The metric configuration. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> public static MonitoringMetricConfiguration BeginCreateOrUpdate(this IMonitoringConfigOperations operations, string deviceName, string roleName, MonitoringMetricConfiguration monitoringMetricConfiguration, string resourceGroupName) { return(operations.BeginCreateOrUpdateAsync(deviceName, roleName, monitoringMetricConfiguration, resourceGroupName).GetAwaiter().GetResult()); }