/// <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> /// List environments in a given user profile. /// </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 <DtlEnvironment> > ListNextAsync(this IEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get environment. /// </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='expand'> /// Specify the $expand query. Example: /// 'properties($select=deploymentProperties)' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <DtlEnvironment> GetAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, labName, userName, name, expand, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Modify properties of environments. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> /// <param name='environment'> /// Represents an environment instance /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <Environment> UpdateAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName, EnvironmentFragment environment, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, environment, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List environments in a given user profile. /// </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='odataQuery'> /// OData parameters to apply to the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <DtlEnvironment> > ListAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <DtlEnvironment> odataQuery = default(ODataQuery <DtlEnvironment>), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, labName, userName, odataQuery, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List environments in a given user profile. /// </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 <DtlEnvironment> ListNext(this IEnvironmentsOperations operations, string nextPageLink) { return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// List environments in a given user profile. /// </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='odataQuery'> /// OData parameters to apply to the operation. /// </param> public static IPage <DtlEnvironment> List(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, ODataQuery <DtlEnvironment> odataQuery = default(ODataQuery <DtlEnvironment>)) { return(operations.ListAsync(resourceGroupName, labName, userName, odataQuery).GetAwaiter().GetResult()); }
/// <summary> /// Delete 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='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, labName, userName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Delete 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> public static void BeginDelete(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name) { operations.BeginDeleteAsync(resourceGroupName, labName, userName, name).GetAwaiter().GetResult(); }
/// <summary> /// Modify properties of environments. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> /// <param name='environment'> /// Represents an environment instance /// </param> public static Environment Update(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName, EnvironmentFragment environment) { return(operations.UpdateAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, environment).GetAwaiter().GetResult()); }
/// <summary> /// Stops an environment by stopping all resources inside the 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='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginStopAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginStopWithHttpMessagesAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Stops an environment by stopping all resources inside the 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='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> public static void BeginStop(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName) { operations.BeginStopAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName).GetAwaiter().GetResult(); }
/// <summary> /// Resets the user password on an 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='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> /// <param name='resetPasswordPayload'> /// Represents the payload for resetting passwords. /// </param> public static void BeginResetPassword(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName, ResetPasswordPayload resetPasswordPayload) { operations.BeginResetPasswordAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, resetPasswordPayload).GetAwaiter().GetResult(); }
/// <summary> /// Resets the user password on an 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='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> /// <param name='resetPasswordPayload'> /// Represents the payload for resetting passwords. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task ResetPasswordAsync(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName, ResetPasswordPayload resetPasswordPayload, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.ResetPasswordWithHttpMessagesAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, resetPasswordPayload, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <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()); }
/// <summary> /// Get environment. /// </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='expand'> /// Specify the $expand query. Example: /// 'properties($select=deploymentProperties)' /// </param> public static DtlEnvironment Get(this IEnvironmentsOperations operations, string resourceGroupName, string labName, string userName, string name, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labName, userName, name, expand).GetAwaiter().GetResult()); }
/// <summary> /// Get environment /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. /// </param> /// <param name='labAccountName'> /// The name of the lab Account. /// </param> /// <param name='labName'> /// The name of the lab. /// </param> /// <param name='environmentSettingName'> /// The name of the environment Setting. /// </param> /// <param name='environmentName'> /// The name of the environment. /// </param> /// <param name='expand'> /// Specify the $expand query. Example: 'properties($expand=networkInterface)' /// </param> public static Environment Get(this IEnvironmentsOperations operations, string resourceGroupName, string labAccountName, string labName, string environmentSettingName, string environmentName, string expand = default(string)) { return(operations.GetAsync(resourceGroupName, labAccountName, labName, environmentSettingName, environmentName, expand).GetAwaiter().GetResult()); }