/// <summary> /// The Create Affinity Group operation creates a new affinity group /// for the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715317.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Create Affinity Group /// operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse Create(this IAffinityGroupOperations operations, AffinityGroupCreateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IAffinityGroupOperations)s).CreateAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The List Affinity Groups operation lists the affinity groups /// associated with the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <returns> /// The List Affinity Groups operation response. /// </returns> public static AffinityGroupListResponse List(this IAffinityGroupOperations operations) { return(Task.Factory.StartNew((object s) => { return ((IAffinityGroupOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The Delete Affinity Group operation deletes an affinity group in /// the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715314.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='affinityGroupName'> /// Required. The name of the affinity group. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static AzureOperationResponse Delete(this IAffinityGroupOperations operations, string affinityGroupName) { return(Task.Factory.StartNew((object s) => { return ((IAffinityGroupOperations)s).DeleteAsync(affinityGroupName); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the ManagementClient class. /// </summary> private ManagementClient() : base() { this._affinityGroups = new AffinityGroupOperations(this); this._locations = new LocationOperations(this); this._managementCertificates = new ManagementCertificateOperations(this); this._roleSizes = new RoleSizeOperations(this); this._subscriptions = new SubscriptionOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the ManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> private ManagementClient(HttpClient httpClient) : base(httpClient) { this._affinityGroups = new AffinityGroupOperations(this); this._locations = new LocationOperations(this); this._managementCertificates = new ManagementCertificateOperations(this); this._roleSizes = new RoleSizeOperations(this); this._subscriptions = new SubscriptionOperations(this); this._apiVersion = "2014-05-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the ManagementClient class. /// </summary> public ManagementClient() : base() { this._affinityGroups = new AffinityGroupOperations(this); this._locations = new LocationOperations(this); this._managementCertificates = new ManagementCertificateOperations(this); this._roleSizes = new RoleSizeOperations(this); this._subscriptions = new SubscriptionOperations(this); this._subscriptionServicePrincipals = new SubscriptionServicePrincipalOperations(this); this._apiVersion = "2018-06-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The Create Affinity Group operation creates a new affinity group /// for the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715317.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='parameters'> /// Parameters supplied to the Create Affinity Group operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse Create(this IAffinityGroupOperations operations, AffinityGroupCreateParameters parameters) { try { return(operations.CreateAsync(parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The List Affinity Groups operation lists the affinity groups /// associated with the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <returns> /// The List Affinity Groups operation response. /// </returns> public static AffinityGroupListResponse List(this IAffinityGroupOperations operations) { try { return(operations.ListAsync().Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Get Affinity Group Properties operation returns the system /// properties associated with the specified affinity group. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='affinityGroupName'> /// The name of the desired affinity group as returned by the name /// element of the List Affinity Groups operation. /// </param> /// <returns> /// The Get Affinity Group operation response. /// </returns> public static AffinityGroupGetResponse Get(this IAffinityGroupOperations operations, string affinityGroupName) { try { return(operations.GetAsync(affinityGroupName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Create Affinity Group operation creates a new affinity group /// for the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715317.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='parameters'> /// Parameters supplied to the Create Affinity Group operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> CreateAsync(this IAffinityGroupOperations operations, AffinityGroupCreateParameters parameters) { return(operations.CreateAsync(parameters, CancellationToken.None)); }
/// <summary> /// The Update Affinity Group operation updates the label and/or the /// description for an affinity group for the specified subscription. /// (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715316.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='affinityGroupName'> /// The name of your affinity group. /// </param> /// <param name='parameters'> /// Parameters supplied to the Update Affinity Group operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> UpdateAsync(this IAffinityGroupOperations operations, string affinityGroupName, AffinityGroupUpdateParameters parameters) { return(operations.UpdateAsync(affinityGroupName, parameters, CancellationToken.None)); }
/// <summary> /// The List Affinity Groups operation lists the affinity groups /// associated with the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460797.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <returns> /// The List Affinity Groups operation response. /// </returns> public static Task <AffinityGroupListResponse> ListAsync(this IAffinityGroupOperations operations) { return(operations.ListAsync(CancellationToken.None)); }
/// <summary> /// The Get Affinity Group Properties operation returns the system /// properties associated with the specified affinity group. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='affinityGroupName'> /// The name of the desired affinity group as returned by the name /// element of the List Affinity Groups operation. /// </param> /// <returns> /// The Get Affinity Group operation response. /// </returns> public static Task <AffinityGroupGetResponse> GetAsync(this IAffinityGroupOperations operations, string affinityGroupName) { return(operations.GetAsync(affinityGroupName, CancellationToken.None)); }
/// <summary> /// The Delete Affinity Group operation deletes an affinity group in /// the specified subscription. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/gg715314.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.IAffinityGroupOperations. /// </param> /// <param name='affinityGroupName'> /// The name of your affinity group. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> DeleteAsync(this IAffinityGroupOperations operations, string affinityGroupName) { return(operations.DeleteAsync(affinityGroupName, CancellationToken.None)); }