public PSCustomIpPrefix ToPsCustomIpPrefix(CustomIpPrefix customIpPrefix) { var psModel = NetworkResourceManagerProfile.Mapper.Map <PSCustomIpPrefix>(customIpPrefix); psModel.Tag = TagsConversionHelper.CreateTagHashtable(customIpPrefix.Tags); return(psModel); }
/// <summary> /// Creates or updates a custom IP prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='customIpPrefixName'> /// The name of the custom IP prefix. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update custom IP prefix operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CustomIpPrefix> BeginCreateOrUpdateAsync(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, customIpPrefixName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a custom IP prefix. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='customIpPrefixName'> /// The name of the custom IP prefix. /// </param> /// <param name='parameters'> /// Parameters supplied to the create or update custom IP prefix operation. /// </param> public static CustomIpPrefix BeginCreateOrUpdate(this ICustomIPPrefixesOperations operations, string resourceGroupName, string customIpPrefixName, CustomIpPrefix parameters) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, customIpPrefixName, parameters).GetAwaiter().GetResult()); }