/// <summary> /// Gets the peering service prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='peeringServiceName'> /// The peering service name. /// </param> /// <param name='prefixName'> /// The prefix name. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <PeeringServicePrefix> GetAsync(this IPeeringServicePrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, peeringServiceName, prefixName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates the peering prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='peeringServiceName'> /// The peering service name. /// </param> /// <param name='prefixName'> /// The prefix name /// </param> /// <param name='peeringServicePrefix'> /// The IP prefix for an peering /// </param> public static PeeringServicePrefix CreateOrUpdate(this IPeeringServicePrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, PeeringServicePrefix peeringServicePrefix) { return(operations.CreateOrUpdateAsync(resourceGroupName, peeringServiceName, prefixName, peeringServicePrefix).GetAwaiter().GetResult()); }
/// <summary> /// removes the peering prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='peeringServiceName'> /// The peering service name. /// </param> /// <param name='prefixName'> /// The prefix name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IPeeringServicePrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, peeringServiceName, prefixName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Gets the peering service prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='peeringServiceName'> /// The peering service name. /// </param> /// <param name='prefixName'> /// The prefix name. /// </param> public static PeeringServicePrefix Get(this IPeeringServicePrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName) { return(operations.GetAsync(resourceGroupName, peeringServiceName, prefixName).GetAwaiter().GetResult()); }
/// <summary> /// removes the peering prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name. /// </param> /// <param name='peeringServiceName'> /// The peering service name. /// </param> /// <param name='prefixName'> /// The prefix name /// </param> public static void Delete(this IPeeringServicePrefixesOperations operations, string resourceGroupName, string peeringServiceName, string prefixName) { operations.DeleteAsync(resourceGroupName, peeringServiceName, prefixName).GetAwaiter().GetResult(); }