/// <summary> /// Gets the specified peering for the ExpressRouteCrossConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='crossConnectionName'> /// The name of the ExpressRouteCrossConnection. /// </param> /// <param name='peeringName'> /// The name of the peering. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ExpressRouteCrossConnectionPeeringInner> GetAsync(this IExpressRouteCrossConnectionPeeringsOperations operations, string resourceGroupName, string crossConnectionName, string peeringName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, crossConnectionName, peeringName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes the specified peering from the ExpressRouteCrossConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='crossConnectionName'> /// The name of the ExpressRouteCrossConnection. /// </param> /// <param name='peeringName'> /// The name of the peering. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IExpressRouteCrossConnectionPeeringsOperations operations, string resourceGroupName, string crossConnectionName, string peeringName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, crossConnectionName, peeringName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets all peerings in a specified ExpressRouteCrossConnection. /// </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 <ExpressRouteCrossConnectionPeeringInner> > ListNextAsync(this IExpressRouteCrossConnectionPeeringsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Deletes the specified peering from the ExpressRouteCrossConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='crossConnectionName'> /// The name of the ExpressRouteCrossConnection. /// </param> /// <param name='peeringName'> /// The name of the peering. /// </param> public static void Delete(this IExpressRouteCrossConnectionPeeringsOperations operations, string resourceGroupName, string crossConnectionName, string peeringName) { operations.DeleteAsync(resourceGroupName, crossConnectionName, peeringName).GetAwaiter().GetResult(); }
/// <summary> /// Gets all peerings in a specified ExpressRouteCrossConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='crossConnectionName'> /// The name of the ExpressRouteCrossConnection. /// </param> public static IPage <ExpressRouteCrossConnectionPeering> List(this IExpressRouteCrossConnectionPeeringsOperations operations, string resourceGroupName, string crossConnectionName) { return(operations.ListAsync(resourceGroupName, crossConnectionName).GetAwaiter().GetResult()); }
/// <summary> /// Gets all peerings in a specified ExpressRouteCrossConnection. /// </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 <ExpressRouteCrossConnectionPeering> ListNext(this IExpressRouteCrossConnectionPeeringsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a peering in the specified ExpressRouteCrossConnection. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='crossConnectionName'> /// The name of the ExpressRouteCrossConnection. /// </param> /// <param name='peeringName'> /// The name of the peering. /// </param> /// <param name='peeringParameters'> /// Parameters supplied to the create or update ExpressRouteCrossConnection /// peering operation. /// </param> public static ExpressRouteCrossConnectionPeering BeginCreateOrUpdate(this IExpressRouteCrossConnectionPeeringsOperations operations, string resourceGroupName, string crossConnectionName, string peeringName, ExpressRouteCrossConnectionPeering peeringParameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).GetAwaiter().GetResult()); }