/// <summary> /// Create or replace an existing environment. This operation can take a while /// to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the environment. /// </param> /// <param name='dtlEnvironment'> /// An environment, which is essentially an ARM template deployment. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DtlEnvironment> BeginCreateOrUpdateAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, DtlEnvironment dtlEnvironment, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, labName, userName, name, dtlEnvironment, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create or replace an existing environment. This operation can take a while /// to complete. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='userName'> /// The name of the user profile. /// </param> /// <param name='name'> /// The name of the environment. /// </param> /// <param name='dtlEnvironment'> /// An environment, which is essentially an ARM template deployment. /// </param> public static DtlEnvironment BeginCreateOrUpdate(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, DtlEnvironment dtlEnvironment) { return(operations.BeginCreateOrUpdateAsync(resourceGroupName, labName, userName, name, dtlEnvironment).GetAwaiter().GetResult()); }