/// <summary> /// The New Border Gateway Protocol Peering operation creates a new /// Border Gateway Protocol Peering /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </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 Border Gateway Protocol /// Peering operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static ExpressRouteOperationResponse BeginNew(this IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BorderGatewayProtocolPeeringNewParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IBorderGatewayProtocolPeeringOperations)s).BeginNewAsync(serviceKey, accessType, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The Remove Border Gateway Protocol Peering operation deletes an /// existing border gateway protocol peering. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. Service key associated with the border gateway protocol /// peering to be deleted. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <param name='peerAddressType'> /// Required. Whether the BGP Peer Address Type to deleted is IPv4, /// IPv6 or All. /// </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 IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeerAddressType peerAddressType) { return(Task.Factory.StartNew((object s) => { return ((IBorderGatewayProtocolPeeringOperations)s).RemoveAsync(serviceKey, accessType, peerAddressType); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// The Get Express Route operation status gets information on the /// status of Express Route operations in Windows Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </param> /// <param name='operationId'> /// Required. The id of the operation. /// </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 GetOperationStatus(this IBorderGatewayProtocolPeeringOperations operations, string operationId) { return(Task.Factory.StartNew((object s) => { return ((IBorderGatewayProtocolPeeringOperations)s).GetOperationStatusAsync(operationId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the ExpressRouteManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> private ExpressRouteManagementClient(HttpClient httpClient) : base(httpClient) { this._borderGatewayProtocolPeerings = new BorderGatewayProtocolPeeringOperations(this); this._crossConnections = new CrossConnectionOperations(this); this._dedicatedCircuitLinks = new DedicatedCircuitLinkOperations(this); this._dedicatedCircuits = new DedicatedCircuitOperations(this); this._dedicatedCircuitServiceProviders = new DedicatedCircuitServiceProviderOperations(this); this._apiVersion = "2011-10-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Initializes a new instance of the ExpressRouteManagementClient /// class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public ExpressRouteManagementClient(HttpClient httpClient) : base(httpClient) { this._authorizedDedicatedCircuits = new AuthorizedDedicatedCircuitOperations(this); this._borderGatewayProtocolPeerings = new BorderGatewayProtocolPeeringOperations(this); this._crossConnections = new CrossConnectionOperations(this); this._dedicatedCircuitLinkAuthorizationMicrosoftIds = new DedicatedCircuitLinkAuthorizationMicrosoftIdOperations(this); this._dedicatedCircuitLinkAuthorizations = new DedicatedCircuitLinkAuthorizationOperations(this); this._dedicatedCircuitLinks = new DedicatedCircuitLinkOperations(this); this._dedicatedCircuits = new DedicatedCircuitOperations(this); this._dedicatedCircuitPeeringArpInfo = new DedicatedCircuitPeeringArpInfoOperations(this); this._dedicatedCircuitPeeringRouteTableInfo = new DedicatedCircuitPeeringRouteTableInfoOperations(this); this._dedicatedCircuitPeeringRouteTableSummary = new DedicatedCircuitPeeringRouteTableSummaryOperations(this); this._dedicatedCircuitServiceProviders = new DedicatedCircuitServiceProviderOperations(this); this._dedicatedCircuitStats = new DedicatedCircuitStatsOperations(this); this._apiVersion = "2011-10-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// The New Border Gateway Protocol Peering operation creates a new /// Border Gateway Protocol Peering /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </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 Border Gateway Protocol /// Peering operation. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <ExpressRouteOperationResponse> BeginNewAsync(this IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BorderGatewayProtocolPeeringNewParameters parameters) { return(operations.BeginNewAsync(serviceKey, accessType, parameters, CancellationToken.None)); }
/// <summary> /// The Remove Border Gateway Protocol Peering operation deletes an /// existing border gateway protocol peering. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </param> /// <param name='serviceKey'> /// Required. Service key associated with the border gateway protocol /// peering to be deleted. /// </param> /// <param name='accessType'> /// Required. Whether the peering is private or public. /// </param> /// <param name='peerAddressType'> /// Required. Whether the BGP Peer Address Type to deleted is IPv4, /// IPv6 or All. /// </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 IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BgpPeerAddressType peerAddressType) { return(operations.RemoveAsync(serviceKey, accessType, peerAddressType, CancellationToken.None)); }
/// <summary> /// The Get Express Route operation status gets information on the /// status of Express Route operations in Windows Azure. (see /// http://msdn.microsoft.com/en-us/library/windowsazure/jj154112.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </param> /// <param name='operationId'> /// Required. The id of the operation. /// </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> GetOperationStatusAsync(this IBorderGatewayProtocolPeeringOperations operations, string operationId) { return(operations.GetOperationStatusAsync(operationId, CancellationToken.None)); }
/// <summary> /// The Get Border Gateway Protocol 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.IBorderGatewayProtocolPeeringOperations. /// </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 Border Gateway Protocol Peering Operation Response. /// </returns> public static Task <BorderGatewayProtocolPeeringGetResponse> GetAsync(this IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType) { return(operations.GetAsync(serviceKey, accessType, CancellationToken.None)); }
/// <summary> /// The Update Border Gateway Protocol Peering operation updates an /// existing border gateway protocol peering or creates a new one if /// one doesn't exist. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.ExpressRoute.IBorderGatewayProtocolPeeringOperations. /// </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 Border Gateway Protocol /// Peering operation. /// </param> /// <returns> /// The Get Border Gateway Protocol Peering Operation Response. /// </returns> public static Task <BorderGatewayProtocolPeeringGetResponse> UpdateAsync(this IBorderGatewayProtocolPeeringOperations operations, string serviceKey, BgpPeeringAccessType accessType, BorderGatewayProtocolPeeringUpdateParameters parameters) { return(operations.UpdateAsync(serviceKey, accessType, parameters, CancellationToken.None)); }