/// <summary> /// Creates or updates a ManagementService gateway. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The resource group name uniquely identifies the resource group within the /// user subscriptionId. /// </param> /// <param name='gatewayName'> /// The gateway name (256 characters maximum). /// </param> /// <param name='location'> /// location of the resource /// </param> /// <param name='tags'> /// resource tags /// </param> /// <param name='autoUpgrade'> /// The autoUpgrade property gives the flexibility to gateway to auto upgrade /// itself. If properties value not specified, then we assume autoUpgrade = /// Off. Possible values include: 'On', 'Off' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GatewayResource> BeginCreateAsync(this IGatewayOperations operations, string resourceGroupName, string gatewayName, string location = default(string), object tags = default(object), AutoUpgrade?autoUpgrade = default(AutoUpgrade?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateWithHttpMessagesAsync(resourceGroupName, gatewayName, location, tags, autoUpgrade, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }