/// <summary> /// The Get Bgp Peering operation retrieves the bgp peering for the /// dedicated circuit with the specified service key. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. The servicee key representing the dedicated circuit. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <returns> /// The Get Bgp Peering Operation Response. /// </returns> public static BgpPeeringGetResponse Get(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType) { return(Task.Factory.StartNew((object s) => { return ((IBgpPeeringOperations)s).GetAsync(serviceKey, accessType); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The New Dedicated Circuit operation creates a new dedicated circuit. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. The service key representing the relationship between /// Azure and the customer. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the New Bgp Peering operation. /// </param> /// <returns> /// A standard express route gateway response including an HTTP status /// code and request ID. /// </returns> public static ExpressRouteOperationResponse BeginNew(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeeringNewParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IBgpPeeringOperations)s).BeginNewAsync(serviceKey, accessType, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the ExpressRouteManagementClient /// class. /// </summary> private ExpressRouteManagementClient() : base() { this._bgpPeering = new BgpPeeringOperations(this); this._crossConnection = new CrossConnectionOperations(this); this._dedicatedCircuitLink = new DedicatedCircuitLinkOperations(this); this._dedicatedCircuit = new DedicatedCircuitOperations(this); this._dedicatedCircuitServiceProvider = new DedicatedCircuitServiceProviderOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The New Dedicated Circuit operation creates a new dedicated circuit. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// The service key representing the relationship between Azure and the /// customer. /// </param> /// <param name='accessType'> /// Whether the peering is private or public. /// </param> /// <param name='parameters'> /// Parameters supplied to the New Bgp Peering operation. /// </param> /// <returns> /// A standard express route gateway response including an HTTP status /// code and request ID. /// </returns> public static ExpressRouteOperationResponse BeginNew(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeeringNewParameters parameters) { try { return(operations.BeginNewAsync(serviceKey, accessType, parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Update Bgp Peering operation updates an existing bgp peering or /// creates a new one if one doesn't exist. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// The service key representing the relationship between Azure and the /// customer. /// </param> /// <param name='accessType'> /// Whether the peering is private or public. /// </param> /// <param name='parameters'> /// Parameters supplied to the Update Bgp Peering operation. /// </param> /// <returns> /// The Get Bgp Peering Operation Response. /// </returns> public static BgpPeeringGetResponse Update(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeeringUpdateParameters parameters) { try { return(operations.UpdateAsync(serviceKey, accessType, parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Remove Bgp Peering operation deletes an existing bgp peering. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Service key associated with the bgp peering to be deleted. /// </param> /// <param name='accessType'> /// Whether the peering is private or public. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static ExpressRouteOperationStatusResponse Remove(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType) { try { return(operations.RemoveAsync(serviceKey, accessType).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The Get Bgp Peering operation retrieves the bgp peering for the /// dedicated circuit with the specified service key. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// The servicee key representing the dedicated circuit. /// </param> /// <param name='accessType'> /// Whether the peering is private or public. /// </param> /// <returns> /// The Get Bgp Peering Operation Response. /// </returns> public static BgpPeeringGetResponse Get(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType) { try { return(operations.GetAsync(serviceKey, accessType).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The New Dedicated Circuit operation creates a new dedicated circuit. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. The service key representing the relationship between /// Azure and the customer. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the New Bgp Peering operation. /// </param> /// <returns> /// A standard express route gateway response including an HTTP status /// code and request ID. /// </returns> public static Task <ExpressRouteOperationResponse> BeginNewAsync(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeeringNewParameters parameters) { return(operations.BeginNewAsync(serviceKey, accessType, parameters, CancellationToken.None)); }
/// <summary> /// The Update Bgp Peering operation updates an existing bgp peering or /// creates a new one if one doesn't exist. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. The service key representing the relationship between /// Azure and the customer. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Update Bgp Peering operation. /// </param> /// <returns> /// The Get Bgp Peering Operation Response. /// </returns> public static Task <BgpPeeringGetResponse> UpdateAsync(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeeringUpdateParameters parameters) { return(operations.UpdateAsync(serviceKey, accessType, parameters, CancellationToken.None)); }
/// <summary> /// The Remove Bgp Peering operation deletes an existing bgp peering. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. Service key associated with the bgp peering to be deleted. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <returns> /// The response body contains the status of the specified asynchronous /// operation, indicating whether it has succeeded, is inprogress, or /// has failed. Note that this status is distinct from the HTTP status /// code returned for the Get Operation Status operation itself. If /// the asynchronous operation succeeded, the response body includes /// the HTTP status code for the successful request. If the /// asynchronous operation failed, the response body includes the HTTP /// status code for the failed request, and also includes error /// information regarding the failure. /// </returns> public static Task <ExpressRouteOperationStatusResponse> RemoveAsync(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType) { return(operations.RemoveAsync(serviceKey, accessType, CancellationToken.None)); }
/// <summary> /// The Get Bgp Peering operation retrieves the bgp peering for the /// dedicated circuit with the specified service key. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBgpPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. The servicee key representing the dedicated circuit. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <returns> /// The Get Bgp Peering Operation Response. /// </returns> public static Task <BgpPeeringGetResponse> GetAsync(this IBgpPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType) { return(operations.GetAsync(serviceKey, accessType, CancellationToken.None)); }