/// <summary> /// Returns the list of all resource provider health states. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='location'> /// Name of the region /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <ServiceHealth> > ListAsync(this IServiceHealthsOperations operations, string resourceGroupName, string location, ODataQuery <ServiceHealth> odataQuery = default(ODataQuery <ServiceHealth>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, location, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the list of all resource provider health states. /// </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 <ServiceHealth> > ListNextAsync(this IServiceHealthsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the requested service health object. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='location'> /// Name of the region /// </param> /// <param name='serviceHealth'> /// Service Health name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServiceHealth> GetAsync(this IServiceHealthsOperations operations, string resourceGroupName, string location, string serviceHealth, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, location, serviceHealth, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Operations = new Operations(this); Alerts = new AlertsOperations(this); RegionHealths = new RegionHealthsOperations(this); ResourceHealths = new ResourceHealthsOperations(this); ServiceHealths = new ServiceHealthsOperations(this); BaseUri = new System.Uri("https://adminmanagement.local.azurestack.external"); ApiVersion = "2016-05-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; SerializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); }
/// <summary> /// Returns the requested service health object. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='location'> /// Name of the region /// </param> /// <param name='serviceHealth'> /// Service Health name. /// </param> public static ServiceHealth Get(this IServiceHealthsOperations operations, string resourceGroupName, string location, string serviceHealth) { return(operations.GetAsync(resourceGroupName, location, serviceHealth).GetAwaiter().GetResult()); }
/// <summary> /// Returns the list of all resource provider health states. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='location'> /// Name of the region /// </param> /// <param name='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <ServiceHealth> List(this IServiceHealthsOperations operations, string resourceGroupName, string location, ODataQuery <ServiceHealth> odataQuery = default(ODataQuery <ServiceHealth>)) { return(operations.ListAsync(resourceGroupName, location, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Returns the list of all resource provider health states. /// </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 <ServiceHealth> ListNext(this IServiceHealthsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }